Merge branch 'devel' into experimental
13
Readme.md
|
|
@ -3,7 +3,7 @@
|
||||||
What began as a test for importing UT vertex meshes has turned into an actual
|
What began as a test for importing UT vertex meshes has turned into an actual
|
||||||
full UT weapon and item mod.
|
full UT weapon and item mod.
|
||||||
|
|
||||||
This mod requires GZDoom 4.0.0 or later.
|
This mod requires GZDoom 4.1 or later.
|
||||||
|
|
||||||
## Currently implemented
|
## Currently implemented
|
||||||
|
|
||||||
|
|
@ -49,6 +49,8 @@ This mod requires GZDoom 4.0.0 or later.
|
||||||
toggled)
|
toggled)
|
||||||
- UT-like weapon dropping style
|
- UT-like weapon dropping style
|
||||||
- UT player classes (sound only, no models yet)
|
- UT player classes (sound only, no models yet)
|
||||||
|
- Heretic compatibility
|
||||||
|
- Spanish localization
|
||||||
|
|
||||||
## In progress
|
## In progress
|
||||||
|
|
||||||
|
|
@ -56,8 +58,12 @@ This mod requires GZDoom 4.0.0 or later.
|
||||||
- Add some more effects
|
- Add some more effects
|
||||||
- Lava/Slime footstep sounds?
|
- Lava/Slime footstep sounds?
|
||||||
- UT gore system (toggleable)
|
- UT gore system (toggleable)
|
||||||
- Heretic compatibility
|
- French localization
|
||||||
- Localization in all languages supported by the original game
|
- Italian localization
|
||||||
|
|
||||||
|
## Ideas
|
||||||
|
|
||||||
|
- Chainsaw balancing (maybe give it ammo?)
|
||||||
|
|
||||||
## Future plans
|
## Future plans
|
||||||
|
|
||||||
|
|
@ -74,6 +80,7 @@ This mod requires GZDoom 4.0.0 or later.
|
||||||
- Port some of my UT weapon mods (and maybe also some of my personal faves by
|
- Port some of my UT weapon mods (and maybe also some of my personal faves by
|
||||||
others, such as Psi Weapon Dreams)
|
others, such as Psi Weapon Dreams)
|
||||||
- Hexen compatibility ???
|
- Hexen compatibility ???
|
||||||
|
- Relics?
|
||||||
|
|
||||||
## Known bugs
|
## Known bugs
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
graphics/hud/IFlash.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
BIN
graphics/hud/ItemBelt.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
graphics/hud/ItemBoot.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
graphics/hud/ItemBox.png
Normal file
|
After Width: | Height: | Size: 144 B |
BIN
graphics/hud/ItemHbox.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
graphics/hud/ItemHbxb.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
graphics/hud/ItemInvs.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
graphics/hud/ItemLite.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
graphics/hud/ItemMbox.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
graphics/hud/ItemUdmg.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
graphics/hud/ItmArrw1.png
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
graphics/hud/ItmArrw2.png
Normal file
|
After Width: | Height: | Size: 262 B |
BIN
graphics/hud/ItmSel.png
Normal file
|
After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 639 B |
|
Before Width: | Height: | Size: 1,022 B After Width: | Height: | Size: 1,021 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
100
modeldef.misc
|
|
@ -58,6 +58,20 @@ Model "UTHealthPack"
|
||||||
FrameIndex HBOX A 0 0
|
FrameIndex HBOX A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActHealthPack"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "hbox_d.3d"
|
||||||
|
// indices start at 1 for this mesh
|
||||||
|
SurfaceSkin 0 1 "jhbox1.png"
|
||||||
|
SurfaceSkin 0 2 "fizzfull"
|
||||||
|
Scale 0.2 0.24 0.2
|
||||||
|
RollOffset -90
|
||||||
|
ZOffset 16
|
||||||
|
|
||||||
|
FrameIndex HBOX A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UTHealthBox"
|
Model "UTHealthBox"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -72,6 +86,20 @@ Model "UTHealthBox"
|
||||||
FrameIndex HBOX B 0 0
|
FrameIndex HBOX B 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActHealthBox"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "hboxbeta_d.3d"
|
||||||
|
// indices start at 1 for this mesh
|
||||||
|
SurfaceSkin 0 1 "jhboxbeta1.png"
|
||||||
|
SurfaceSkin 0 2 "fizzside"
|
||||||
|
SurfaceSkin 0 3 "fizzfull"
|
||||||
|
Scale 0.08 0.08 0.096
|
||||||
|
ZOffset 4
|
||||||
|
|
||||||
|
FrameIndex HBOX B 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UTMedBox"
|
Model "UTMedBox"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -85,6 +113,19 @@ Model "UTMedBox"
|
||||||
FrameIndex HBOX C 0 0
|
FrameIndex HBOX C 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActMedBox"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "MedBox_d.3d"
|
||||||
|
// indices start at 1 for this mesh
|
||||||
|
SurfaceSkin 0 1 "JMedBox1.png"
|
||||||
|
SurfaceSkin 0 2 "fizzfull"
|
||||||
|
Scale 0.06 0.06 0.072
|
||||||
|
ZOffset 5
|
||||||
|
|
||||||
|
FrameIndex HBOX C 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UTHealthBonus"
|
Model "UTHealthBonus"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -147,6 +188,18 @@ Model "UTShieldBelt"
|
||||||
FrameIndex BELT A 0 0
|
FrameIndex BELT A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActShieldBelt"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "ShieldBeltMeshM_d.3d"
|
||||||
|
Skin 0 "AUbelt1.png"
|
||||||
|
Scale 0.1 0.1 0.12
|
||||||
|
AngleOffset -90
|
||||||
|
ZOffset 4
|
||||||
|
|
||||||
|
FrameIndex BELT A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UDamage"
|
Model "UDamage"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -159,6 +212,18 @@ Model "UDamage"
|
||||||
FrameIndex UDAM A 0 0
|
FrameIndex UDAM A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActUDamage"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "UDamage_d.3d"
|
||||||
|
Skin 0 "GoldSkin2.png"
|
||||||
|
Scale 0.16 0.16 0.192
|
||||||
|
ZOffset 24
|
||||||
|
ROTATING
|
||||||
|
|
||||||
|
FrameIndex UDAM A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UTRedSkull"
|
Model "UTRedSkull"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -300,6 +365,18 @@ Model "UTInvisibilityX"
|
||||||
FrameIndex INVS A 0 0
|
FrameIndex INVS A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActInvisibility"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "invis2M_d.3d"
|
||||||
|
// indices start at 1 for this mesh
|
||||||
|
SurfaceSkin 0 1 "jinvis.png"
|
||||||
|
Scale 0.1 0.1 0.12
|
||||||
|
ZOffset 9
|
||||||
|
|
||||||
|
FrameIndex INVS A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UTMapRevealer"
|
Model "UTMapRevealer"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -322,6 +399,17 @@ Model "UTJumpBoots"
|
||||||
FrameIndex JBUT A 0 0
|
FrameIndex JBUT A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActJumpBoots"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "jboot_d.3d"
|
||||||
|
Skin 0 "Jlboot2.png"
|
||||||
|
Scale 0.09 0.09 0.108
|
||||||
|
ZOffset 7
|
||||||
|
|
||||||
|
FrameIndex JBUT A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "Searchlight"
|
Model "Searchlight"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -334,6 +422,18 @@ Model "Searchlight"
|
||||||
FrameIndex SLIT A 0 0
|
FrameIndex SLIT A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ActSearchlight"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "BigFlash_d.3d"
|
||||||
|
Skin 0 "JBigFlash1.png"
|
||||||
|
Scale 0.07 0.07 0.084
|
||||||
|
AngleOffset -90
|
||||||
|
ZOffset 9
|
||||||
|
|
||||||
|
FrameIndex SLIT A 0 0
|
||||||
|
}
|
||||||
|
|
||||||
Model "UTChip"
|
Model "UTChip"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ udamage/fire1 ampfire
|
||||||
udamage/fire2 ampfire2
|
udamage/fire2 ampfire2
|
||||||
udamage/drain ampout
|
udamage/drain ampout
|
||||||
trans/pickup voicesnd
|
trans/pickup voicesnd
|
||||||
|
lite/pickup fshlite1
|
||||||
misc/gibbed1 gib1
|
misc/gibbed1 gib1
|
||||||
misc/gibbed2 gib2
|
misc/gibbed2 gib2
|
||||||
misc/gibbed3 gib3
|
misc/gibbed3 gib3
|
||||||
|
|
|
||||||
BIN
sounds/FSHLITE1.ogg
Normal file
|
|
@ -138,6 +138,7 @@ Class BioLight : DynamicLight
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
SetOrigin(target.pos,true);
|
||||||
args[LIGHT_INTENSITY] = int(8*target.Scale.x);
|
args[LIGHT_INTENSITY] = int(8*target.Scale.x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -674,7 +675,7 @@ Class BioRifle : UTWeapon
|
||||||
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
double a, s;
|
double a, s;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+8.0*y-5.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+8.0*y-5.0*z;
|
||||||
Actor p;
|
Actor p;
|
||||||
if ( alt )
|
if ( alt )
|
||||||
|
|
@ -703,6 +704,7 @@ Class BioRifle : UTWeapon
|
||||||
s.A_SetRenderStyle(0.5,STYLE_AddShaded);
|
s.A_SetRenderStyle(0.5,STYLE_AddShaded);
|
||||||
UTViewSmoke(s).vvel += (FRandom[GES](0.8,1.6),FRandom[GES](-0.5,0.5),FRandom[GES](-0.5,0.5));
|
UTViewSmoke(s).vvel += (FRandom[GES](0.8,1.6),FRandom[GES](-0.5,0.5),FRandom[GES](-0.5,0.5));
|
||||||
}
|
}
|
||||||
|
invoker.charge = 0;
|
||||||
}
|
}
|
||||||
action void A_BeginCharge()
|
action void A_BeginCharge()
|
||||||
{
|
{
|
||||||
|
|
@ -753,6 +755,7 @@ Class BioRifle : UTWeapon
|
||||||
Idle:
|
Idle:
|
||||||
BIOI A 1
|
BIOI A 1
|
||||||
{
|
{
|
||||||
|
invoker.charge = 0;
|
||||||
invoker.bCharging = false;
|
invoker.bCharging = false;
|
||||||
A_CheckReload();
|
A_CheckReload();
|
||||||
A_WeaponReady();
|
A_WeaponReady();
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Class UTChainsaw : UTWeapon
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-4.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-4.0*z;
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
LineTrace(angle,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
LineTrace(angle,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
|
@ -91,7 +91,7 @@ Class UTChainsaw : UTWeapon
|
||||||
if ( initial ) invoker.FireEffect();
|
if ( initial ) invoker.FireEffect();
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-2.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-2.0*z;
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
double ang = (angle-60)+120*invoker.sawcnt;
|
double ang = (angle-60)+120*invoker.sawcnt;
|
||||||
|
|
@ -141,7 +141,7 @@ Class UTChainsaw : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-1,1),FRandom[Chainsaw](-1,1)),0.25,-0.1,2,SWING_Spring);
|
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-1,1),FRandom[Chainsaw](-1,1)),0.25,-0.1,2,SWING_Spring);
|
||||||
if ( bAlt || Random[Chainsaw](0,2) ) return;
|
if ( bAlt || Random[Chainsaw](0,2) ) return;
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+5.0*x+1.0*y-3.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+5.0*x+1.0*y-3.0*z;
|
||||||
for ( int i=0; i<5; i++ )
|
for ( int i=0; i<5; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,135 @@ Class UTHereticBlueKey : KeyBlue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Base class for items that can be activated from the inventory bar
|
// Base class for items that can be activated from the inventory bar
|
||||||
Class UTActivatable : Inventory
|
Class UTActivatable : Inventory
|
||||||
{
|
{
|
||||||
|
Class<Inventory> GiveItem;
|
||||||
|
|
||||||
|
Property GiveItem: GiveItem;
|
||||||
|
|
||||||
|
override bool Use( bool pickup )
|
||||||
|
{
|
||||||
|
if ( !Owner ) return true;
|
||||||
|
let i = GetDefaultByType(GiveItem);
|
||||||
|
if ( Owner.GiveInventory(GiveItem,i.Amount) )
|
||||||
|
{
|
||||||
|
Owner.A_PlaySound(i.PickupSound,CHAN_ITEM);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
+INVENTORY.INVBAR;
|
+INVENTORY.INVBAR;
|
||||||
|
Inventory.DefMaxAmount;
|
||||||
|
Inventory.PickupSound "misc/p_pkup";
|
||||||
|
Inventory.UseSound "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActUDamage : UTActivatable
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_UDAMAGE";
|
||||||
|
Inventory.Icon "ItemUdmg";
|
||||||
|
Inventory.PickupMessage "$I_UDAMAGE";
|
||||||
|
+COUNTITEM;
|
||||||
|
+INVENTORY.BIGPOWERUP;
|
||||||
|
UTActivatable.GiveItem "UDamage";
|
||||||
|
Inventory.RespawnTics 4200;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
UDAM A -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActShieldBelt : UTActivatable
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_SHIELDBELT";
|
||||||
|
Inventory.Icon "ItemBelt";
|
||||||
|
Inventory.PickupMessage "$I_SHIELDBELT";
|
||||||
|
+COUNTITEM;
|
||||||
|
+INVENTORY.BIGPOWERUP;
|
||||||
|
UTActivatable.GiveItem "UTShieldBelt";
|
||||||
|
Inventory.RespawnTics 2100;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
BELT A -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActInvisibility : UTActivatable
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_INVISIBILITY";
|
||||||
|
Inventory.Icon "ItemInvs";
|
||||||
|
Inventory.PickupMessage "$I_INVISIBILITY";
|
||||||
|
+COUNTITEM;
|
||||||
|
+INVENTORY.BIGPOWERUP;
|
||||||
|
UTActivatable.GiveItem "UTInvisibility";
|
||||||
|
Inventory.RespawnTics 4200;
|
||||||
|
}
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
tracer = Spawn("UTInvisibilityX",pos);
|
||||||
|
tracer.angle = angle;
|
||||||
|
tracer.target = self;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
INVS A -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActJumpBoots : UTActivatable
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_JUMPBOOTS";
|
||||||
|
Inventory.Icon "ItemBoot";
|
||||||
|
Inventory.PickupMessage "$I_JUMPBOOTS";
|
||||||
|
UTActivatable.GiveItem "UTJumpBoots";
|
||||||
|
Inventory.RespawnTics 1050;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
JBUT A -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActSearchlight : UTActivatable
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_SEARCHLIGHT";
|
||||||
|
Inventory.Icon "ItemLite";
|
||||||
|
Inventory.PickupMessage "$I_SEARCHLIGHT";
|
||||||
|
+COUNTITEM;
|
||||||
|
UTActivatable.GiveItem "Searchlight";
|
||||||
|
Inventory.RespawnTics 1050;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
SLIT A -1;
|
||||||
|
Stop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,6 +184,71 @@ Class UTActivatableHealth : HealthPickup
|
||||||
{
|
{
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
|
+INVENTORY.INVBAR;
|
||||||
|
Inventory.DefMaxAmount;
|
||||||
|
Inventory.PickupSound "misc/p_pkup";
|
||||||
|
Inventory.UseSound "misc/ut_heal";
|
||||||
|
HealthPickup.Autouse 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActHealthPack : UTActivatableHealth
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_SUPERHEALTH";
|
||||||
|
Inventory.Icon "ItemHbox";
|
||||||
|
Inventory.PickupMessage "$I_SUPERHEALTH";
|
||||||
|
+COUNTITEM;
|
||||||
|
Health 100;
|
||||||
|
Inventory.UseSound "misc/ut_keg";
|
||||||
|
Inventory.RespawnTics 3500;
|
||||||
|
HealthPickup.Autouse 2;
|
||||||
|
}
|
||||||
|
override bool Use( bool pickup )
|
||||||
|
{
|
||||||
|
return Owner.GiveBody(health,200);
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
HBOX A -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActHealthBox : UTActivatableHealth
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_HEALTHBOX";
|
||||||
|
Inventory.Icon "ItemHbxb";
|
||||||
|
Inventory.PickupMessage "$I_HEALTHBOX";
|
||||||
|
Health 50;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
HBOX B -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ActMedBox : UTActivatableHealth
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Tag "$T_MEDBOX";
|
||||||
|
Inventory.Icon "ItemMbox";
|
||||||
|
Inventory.PickupMessage "$I_MEDBOX";
|
||||||
|
Health 20;
|
||||||
|
Inventory.RespawnTics 700;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
HBOX C -1;
|
||||||
|
Stop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,68 @@ Class dt_CoordUtil
|
||||||
}
|
}
|
||||||
else return ((screenpos.x+1)*Screen.getWidth(),(-screenpos.y+1)*Screen.getHeight())*0.5, (screenpos.z<=1.0);
|
else return ((screenpos.x+1)*Screen.getWidth(),(-screenpos.y+1)*Screen.getHeight())*0.5, (screenpos.z<=1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In Tim Sweeney's own words: "transform by a pitch-yaw-roll rotation"
|
||||||
|
static Vector3, Vector3, Vector3 GetUnAxes( double pitch, double yaw, double roll )
|
||||||
|
{
|
||||||
|
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
||||||
|
Vector3 a, b, c;
|
||||||
|
// pitch and roll in gzdoom work in reverse compared to UE
|
||||||
|
pitch = -pitch;
|
||||||
|
roll = -roll;
|
||||||
|
// yaw
|
||||||
|
a = (cos(yaw),sin(yaw),0);
|
||||||
|
b = (-sin(yaw),cos(yaw),0);
|
||||||
|
c = (0,0,1);
|
||||||
|
x = (x dot a, x dot b, x dot c);
|
||||||
|
y = (y dot a, y dot b, y dot c);
|
||||||
|
z = (z dot a, z dot b, z dot c);
|
||||||
|
// pitch
|
||||||
|
a = (cos(pitch),0,sin(pitch));
|
||||||
|
b = (0,1,0);
|
||||||
|
c = (-sin(pitch),0,cos(pitch));
|
||||||
|
x = (x dot a, x dot b, x dot c);
|
||||||
|
y = (y dot a, y dot b, y dot c);
|
||||||
|
z = (z dot a, z dot b, z dot c);
|
||||||
|
// roll
|
||||||
|
a = (1,0,0);
|
||||||
|
b = (0,cos(roll),-sin(roll));
|
||||||
|
c = (0,sin(roll),cos(roll));
|
||||||
|
x = (x dot a, x dot b, x dot c);
|
||||||
|
y = (y dot a, y dot b, y dot c);
|
||||||
|
z = (z dot a, z dot b, z dot c);
|
||||||
|
return x, y, z;
|
||||||
|
}
|
||||||
|
|
||||||
|
// In Tim Sweeney's own words: "detransform by a pitch-yaw-roll rotation"
|
||||||
|
static Vector3, Vector3, Vector3 GetAxes( double pitch, double yaw, double roll )
|
||||||
|
{
|
||||||
|
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
||||||
|
Vector3 a, b, c;
|
||||||
|
// pitch and roll in gzdoom work in reverse compared to UE
|
||||||
|
pitch = -pitch;
|
||||||
|
roll = -roll;
|
||||||
|
// inverse roll
|
||||||
|
a = (1,0,0);
|
||||||
|
b = (0,cos(roll),sin(roll));
|
||||||
|
c = (0,-sin(roll),cos(roll));
|
||||||
|
x = (x dot a, x dot b, x dot c);
|
||||||
|
y = (y dot a, y dot b, y dot c);
|
||||||
|
z = (z dot a, z dot b, z dot c);
|
||||||
|
// inverse pitch
|
||||||
|
a = (cos(pitch),0,-sin(pitch));
|
||||||
|
b = (0,1,0);
|
||||||
|
c = (sin(pitch),0,cos(pitch));
|
||||||
|
x = (x dot a, x dot b, x dot c);
|
||||||
|
y = (y dot a, y dot b, y dot c);
|
||||||
|
z = (z dot a, z dot b, z dot c);
|
||||||
|
// inverse yaw
|
||||||
|
a = (cos(yaw),-sin(yaw),0);
|
||||||
|
b = (sin(yaw),cos(yaw),0);
|
||||||
|
c = (0,0,1);
|
||||||
|
x = (x dot a, x dot b, x dot c);
|
||||||
|
y = (y dot a, y dot b, y dot c);
|
||||||
|
z = (z dot a, z dot b, z dot c);
|
||||||
|
return x, y, z;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,8 @@ Class dt_Matrix4
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
// UE-like axes from rotation
|
// [deprecated] UE-like axes from rotation
|
||||||
|
// proper implementation moved to CoordUtil
|
||||||
static Vector3, Vector3, Vector3 getaxes( double pitch, double yaw, double roll )
|
static Vector3, Vector3, Vector3 getaxes( double pitch, double yaw, double roll )
|
||||||
{
|
{
|
||||||
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
||||||
|
|
|
||||||
|
|
@ -337,6 +337,7 @@ Class UTRocketLauncher : UTWeapon
|
||||||
invoker.LockedOn = false;
|
invoker.LockedOn = false;
|
||||||
}
|
}
|
||||||
if ( checktarget && !weap.bAltFire ) A_CheckTarget();
|
if ( checktarget && !weap.bAltFire ) A_CheckTarget();
|
||||||
|
invoker.special1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// refire that is ignored if there's no ammo
|
// refire that is ignored if there's no ammo
|
||||||
|
|
@ -353,6 +354,7 @@ Class UTRocketLauncher : UTWeapon
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
if ( !weap ) return;
|
if ( !weap ) return;
|
||||||
|
invoker.special1 = 0;
|
||||||
if ( weap.bAltFire ) A_PlaySound("utrl/altfire",CHAN_WEAPON);
|
if ( weap.bAltFire ) A_PlaySound("utrl/altfire",CHAN_WEAPON);
|
||||||
else A_PlaySound("utrl/fire",CHAN_WEAPON);
|
else A_PlaySound("utrl/fire",CHAN_WEAPON);
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
|
|
@ -363,9 +365,9 @@ Class UTRocketLauncher : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Eightball](0.4,-0.8),FRandom[Eightball](-0.5,0.5)),1,-0.2,Random[Eightball](3,4),SWING_Spring,Random[Eightball](2,5),Random[Eightball](2,4));
|
UTMainHandler.DoSwing(self,(FRandom[Eightball](0.4,-0.8),FRandom[Eightball](-0.5,0.5)),1,-0.2,Random[Eightball](3,4),SWING_Spring,Random[Eightball](2,5),Random[Eightball](2,4));
|
||||||
Vector3 x, y, z, x2, y2, z2;
|
Vector3 x, y, z, x2, y2, z2;
|
||||||
double a, s;
|
double a, s;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-3.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-3.0*z;
|
||||||
[x2, y2, z2] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||||
Actor p;
|
Actor p;
|
||||||
if ( weap.bAltFire )
|
if ( weap.bAltFire )
|
||||||
{
|
{
|
||||||
|
|
@ -490,6 +492,7 @@ Class UTRocketLauncher : UTWeapon
|
||||||
EBLI A 1
|
EBLI A 1
|
||||||
{
|
{
|
||||||
invoker.locktics = 0;
|
invoker.locktics = 0;
|
||||||
|
invoker.special1 = 0;
|
||||||
A_CheckReload();
|
A_CheckReload();
|
||||||
A_WeaponReady(WRF_ALLOWRELOAD);
|
A_WeaponReady(WRF_ALLOWRELOAD);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -175,14 +175,6 @@ Class Enforcer : UTWeapon
|
||||||
property ClipCount : ClipCount;
|
property ClipCount : ClipCount;
|
||||||
property SlaveClipCount : SlaveClipCount;
|
property SlaveClipCount : SlaveClipCount;
|
||||||
|
|
||||||
override void PostRender( double lbottom )
|
|
||||||
{
|
|
||||||
if ( !flak_enforcerreload ) return;
|
|
||||||
if ( !usmf ) usmf = Font.GetFont('USMALLFONT');
|
|
||||||
if ( Amount > 1 ) Screen.DrawText(usmf,Font.FindFontColor('UGreen'),Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-usmf.GetHeight()*2,String.Format("%s: %2d / 20\n%s: %2d / 20",StringTable.Localize("$M_LCLIP"),slaveclipcount,StringTable.Localize("$M_RCLIP"),clipcount));
|
|
||||||
else Screen.DrawText(usmf,Font.FindFontColor('UGreen'),Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-usmf.GetHeight(),String.Format("%s: %2d / 20",StringTable.Localize("$M_CLIP"),clipcount));
|
|
||||||
}
|
|
||||||
|
|
||||||
override bool HandlePickup( Inventory item )
|
override bool HandlePickup( Inventory item )
|
||||||
{
|
{
|
||||||
if ( item.GetClass() == GetClass() )
|
if ( item.GetClass() == GetClass() )
|
||||||
|
|
@ -324,14 +316,14 @@ Class Enforcer : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Enforcer](-0.2,-0.5),FRandom[Enforcer](-0.3,0.2)),2,0,1,SWING_Spring,0,2);
|
UTMainHandler.DoSwing(self,(FRandom[Enforcer](-0.2,-0.5),FRandom[Enforcer](-0.3,0.2)),2,0,1,SWING_Spring,0,2);
|
||||||
}
|
}
|
||||||
Vector3 x, y, z, x2, y2, z2;
|
Vector3 x, y, z, x2, y2, z2;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x;
|
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x;
|
||||||
int ydir = slave?-1:1;
|
int ydir = slave?-1:1;
|
||||||
if ( alt ) origin = origin-z*3.0+ydir*y*1.0;
|
if ( alt ) origin = origin-z*3.0+ydir*y*1.0;
|
||||||
else origin = origin-z*1.0+ydir*y*4.0;
|
else origin = origin-z*1.0+ydir*y*4.0;
|
||||||
double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?0.08:0.004);
|
double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?0.08:0.004);
|
||||||
if ( invoker.SlaveActive ) s *= 3;
|
if ( invoker.SlaveActive ) s *= 3;
|
||||||
[x2, y2, z2] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ Class ChunkLight : DynamicLight
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
SetOrigin(target.pos,true);
|
||||||
if ( isFrozen() ) return;
|
if ( isFrozen() ) return;
|
||||||
args[LIGHT_RED] = int(255*(10-target.frame)*0.1);
|
args[LIGHT_RED] = int(255*(10-target.frame)*0.1);
|
||||||
args[LIGHT_GREEN] = int(224*(10-target.frame)*0.1);
|
args[LIGHT_GREEN] = int(224*(10-target.frame)*0.1);
|
||||||
|
|
@ -483,7 +484,7 @@ Class FlakSlug : Actor
|
||||||
Spawn("SlugLight",pos);
|
Spawn("SlugLight",pos);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
double a, s;
|
double a, s;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Actor p;
|
Actor p;
|
||||||
Vector3 spawnofs;
|
Vector3 spawnofs;
|
||||||
if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8;
|
if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8;
|
||||||
|
|
@ -587,12 +588,12 @@ Class FlakCannon : UTWeapon
|
||||||
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
double a, s;
|
double a, s;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+4.0*y-3.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+4.0*y-3.0*z;
|
||||||
A_Overlay(-2,"MuzzleFlash");
|
A_Overlay(-2,"MuzzleFlash");
|
||||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||||
Vector3 offsets[8]; // vanilla adds these to each chunk
|
Vector3 offsets[8]; // vanilla adds these to each chunk
|
||||||
offsets[0] = (0,0,0);
|
offsets[0] = (0,0,0);
|
||||||
offsets[1] = -z;
|
offsets[1] = -z;
|
||||||
|
|
@ -646,7 +647,7 @@ Class FlakCannon : UTWeapon
|
||||||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
double a, s;
|
double a, s;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-3.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-3.0*z;
|
||||||
A_Overlay(-2,"MuzzleFlash");
|
A_Overlay(-2,"MuzzleFlash");
|
||||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ Class ImpactHammer : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),3,-0.8,3,SWING_Spring,3,2);
|
UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),3,-0.8,3,SWING_Spring,3,2);
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||||
double realcharge = min(1.5,invoker.chargesize);
|
double realcharge = min(1.5,invoker.chargesize);
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
|
|
@ -122,6 +122,8 @@ Class ImpactHammer : UTWeapon
|
||||||
s.vel = pvel;
|
s.vel = pvel;
|
||||||
s.scale *= 0.4;
|
s.scale *= 0.4;
|
||||||
}
|
}
|
||||||
|
invoker.chargesize = 0;
|
||||||
|
invoker.count = 0;
|
||||||
}
|
}
|
||||||
action void A_FireAltBlast()
|
action void A_FireAltBlast()
|
||||||
{
|
{
|
||||||
|
|
@ -133,7 +135,7 @@ Class ImpactHammer : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
LineTrace(angle,120,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
LineTrace(angle,120,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
|
@ -188,7 +190,7 @@ Class ImpactHammer : UTWeapon
|
||||||
{
|
{
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||||
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
|
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
|
||||||
|
|
@ -227,7 +229,12 @@ Class ImpactHammer : UTWeapon
|
||||||
Ready:
|
Ready:
|
||||||
IMPS ABCDEFGHIJKLMNOPQ 1 A_WeaponReady(WRF_NOFIRE);
|
IMPS ABCDEFGHIJKLMNOPQ 1 A_WeaponReady(WRF_NOFIRE);
|
||||||
Idle:
|
Idle:
|
||||||
IMPI A 1 A_WeaponReady();
|
IMPI A 1
|
||||||
|
{
|
||||||
|
invoker.chargesize = 0;
|
||||||
|
invoker.count = 0;
|
||||||
|
A_WeaponReady();
|
||||||
|
}
|
||||||
Wait;
|
Wait;
|
||||||
Fire:
|
Fire:
|
||||||
IMPL A 0
|
IMPL A 0
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,10 @@ Class Minigun : UTWeapon
|
||||||
l.target = self;
|
l.target = self;
|
||||||
if ( !alt ) MinigunLight(l).cnt--;
|
if ( !alt ) MinigunLight(l).cnt--;
|
||||||
Vector3 x, y, z, x2, y2, z2;
|
Vector3 x, y, z, x2, y2, z2;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*2.0-z*2.0;
|
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*2.0-z*2.0;
|
||||||
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
|
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
|
||||||
[x2, y2, z2] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
|
|
||||||
|
|
@ -404,6 +404,8 @@ Class Searchlight : Inventory
|
||||||
Inventory.MaxAmount 200;
|
Inventory.MaxAmount 200;
|
||||||
Inventory.InterHubAmount 0;
|
Inventory.InterHubAmount 0;
|
||||||
Inventory.PickupMessage "$I_SEARCHLIGHT";
|
Inventory.PickupMessage "$I_SEARCHLIGHT";
|
||||||
|
Inventory.PickupSound "lite/pickup";
|
||||||
|
Inventory.RespawnTics 1050;
|
||||||
}
|
}
|
||||||
|
|
||||||
override bool Use( bool pickup )
|
override bool Use( bool pickup )
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ Class ViewPulseSpark : PulseSpark
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||||
bInvisible = (players[consoleplayer].camera != target);
|
bInvisible = (players[consoleplayer].camera != target);
|
||||||
|
|
@ -525,7 +525,7 @@ Class StarterBolt : PulseBolt
|
||||||
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
|
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
|
||||||
if ( target.player )
|
if ( target.player )
|
||||||
{
|
{
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+8.0*x+4.1*y-2.7*z;
|
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+8.0*x+4.1*y-2.7*z;
|
||||||
}
|
}
|
||||||
else origin = target.Vec3Offset(0,0,target.missileheight);
|
else origin = target.Vec3Offset(0,0,target.missileheight);
|
||||||
|
|
@ -547,13 +547,6 @@ Class PulseGun : UTWeapon
|
||||||
|
|
||||||
Property ClipCount : clipcount;
|
Property ClipCount : clipcount;
|
||||||
|
|
||||||
override void PostRender( double lbottom )
|
|
||||||
{
|
|
||||||
if ( !flak_pulsereload ) return;
|
|
||||||
if ( !usmf ) usmf = Font.GetFont('USMALLFONT');
|
|
||||||
Screen.DrawText(usmf,Font.FindFontColor('UGreen'),Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-usmf.GetHeight(),String.Format("%s: %2d / 50",StringTable.Localize("$M_CLIP"),clipcount));
|
|
||||||
}
|
|
||||||
|
|
||||||
action void A_Reloading()
|
action void A_Reloading()
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
|
|
@ -574,7 +567,7 @@ Class PulseGun : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.1,-0.02,3,SWING_Spring,0,2);
|
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.1,-0.02,3,SWING_Spring,0,2);
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
|
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
|
||||||
for ( int i=0; i<4; i++ )
|
for ( int i=0; i<4; i++ )
|
||||||
{
|
{
|
||||||
|
|
@ -640,7 +633,7 @@ Class PulseGun : UTWeapon
|
||||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
double a;
|
double a;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+3.0*y-1.8*z;
|
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+3.0*y-1.8*z;
|
||||||
origin += y*cos(invoker.sangle)*2.0+z*sin(invoker.sangle)*2.0;
|
origin += y*cos(invoker.sangle)*2.0+z*sin(invoker.sangle)*2.0;
|
||||||
invoker.sangle += 100;
|
invoker.sangle += 100;
|
||||||
|
|
@ -672,7 +665,7 @@ Class PulseGun : UTWeapon
|
||||||
{
|
{
|
||||||
A_PlaySound("pulse/bolt",CHAN_WEAPON,1.0,true);
|
A_PlaySound("pulse/bolt",CHAN_WEAPON,1.0,true);
|
||||||
Vector3 x, y, z, origin;
|
Vector3 x, y, z, origin;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
|
origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
|
||||||
invoker.beam = Spawn("StarterBolt",origin);
|
invoker.beam = Spawn("StarterBolt",origin);
|
||||||
invoker.beam.angle = angle;
|
invoker.beam.angle = angle;
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ Class Ripper2 : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.3,-0.6),FRandom[Ripper](0.2,0.6)),1,-0.3,2,SWING_Spring,2,2);
|
UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.3,-0.6),FRandom[Ripper](0.2,0.6)),1,-0.3,2,SWING_Spring,2,2);
|
||||||
}
|
}
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+6.0*y-4.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+6.0*y-4.0*z;
|
||||||
Actor p;
|
Actor p;
|
||||||
if ( alt ) p = Spawn("Razor2Alt",origin);
|
if ( alt ) p = Spawn("Razor2Alt",origin);
|
||||||
|
|
|
||||||
|
|
@ -993,7 +993,7 @@ Class ViewShockSpark : ShockSpark
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||||
bInvisible = (players[consoleplayer].camera != target);
|
bInvisible = (players[consoleplayer].camera != target);
|
||||||
|
|
@ -1027,7 +1027,7 @@ Class ShockRifle : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||||
Actor p = Spawn("ShockBeam",origin);
|
Actor p = Spawn("ShockBeam",origin);
|
||||||
p.angle = angle;
|
p.angle = angle;
|
||||||
|
|
@ -1065,7 +1065,7 @@ Class ShockRifle : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||||
Actor p = Spawn("ShockBall",origin);
|
Actor p = Spawn("ShockBall",origin);
|
||||||
p.angle = angle;
|
p.angle = angle;
|
||||||
|
|
@ -1210,7 +1210,7 @@ Class EnhancedShockRifle : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||||
Actor p = Spawn("SuperShockBeam",origin);
|
Actor p = Spawn("SuperShockBeam",origin);
|
||||||
p.angle = angle;
|
p.angle = angle;
|
||||||
|
|
@ -1248,7 +1248,7 @@ Class EnhancedShockRifle : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||||
Actor p = Spawn("SuperShockBall",origin);
|
Actor p = Spawn("SuperShockBall",origin);
|
||||||
p.angle = angle;
|
p.angle = angle;
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ Class SniperRifle : UTWeapon
|
||||||
let l = Spawn("SniperLight",pos);
|
let l = Spawn("SniperLight",pos);
|
||||||
l.target = self;
|
l.target = self;
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x;
|
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x;
|
||||||
if ( !zoomed ) origin = origin+y*4.0-z*2.0;
|
if ( !zoomed ) origin = origin+y*4.0-z*2.0;
|
||||||
FLineTraceData d;
|
FLineTraceData d;
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ Class Translocator : UTWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Translocator](-0.2,0.4),FRandom[Translocator](-0.2,0.7)),2,-0.3,3,SWING_Spring,2,3);
|
UTMainHandler.DoSwing(self,(FRandom[Translocator](-0.2,0.4),FRandom[Translocator](-0.2,0.7)),2,-0.3,3,SWING_Spring,2,3);
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-8.0*y-12.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-8.0*y-12.0*z;
|
||||||
let p = Spawn("TranslocatorModule",origin);
|
let p = Spawn("TranslocatorModule",origin);
|
||||||
p.target = self;
|
p.target = self;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ Class UTPlayer : DoomPlayer
|
||||||
const groundfriction = 8.;
|
const groundfriction = 8.;
|
||||||
const fluidfriction = 1.2;
|
const fluidfriction = 1.2;
|
||||||
const terminalvelocity = 2500.;
|
const terminalvelocity = 2500.;
|
||||||
|
const slantnormal = 0.7; // slope sliding will have to be handled eventually, but currently due to how much is hardcoded this is impossible
|
||||||
|
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
|
|
@ -395,7 +396,7 @@ Class UTPlayer : DoomPlayer
|
||||||
Vector3 dir = (0,0,0);
|
Vector3 dir = (0,0,0);
|
||||||
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
||||||
Vector3 x, y;
|
Vector3 x, y;
|
||||||
[x, y] = dt_Matrix4.GetAxes(pitch,angle,0);
|
[x, y] = dt_CoordUtil.GetAxes(pitch,angle,0);
|
||||||
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
||||||
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
||||||
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
||||||
|
|
@ -424,7 +425,7 @@ Class UTPlayer : DoomPlayer
|
||||||
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
||||||
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
|
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
|
||||||
Vector3 x, y;
|
Vector3 x, y;
|
||||||
[x, y] = dt_Matrix4.GetAxes(pitch,angle,0);
|
[x, y] = dt_CoordUtil.GetAxes(pitch,angle,0);
|
||||||
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
||||||
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
||||||
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
||||||
|
|
@ -785,7 +786,7 @@ Class UTWeapon : Weapon
|
||||||
Vector2 hofs = RotateVector((dropper.radius,0),dropper.angle);
|
Vector2 hofs = RotateVector((dropper.radius,0),dropper.angle);
|
||||||
SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false);
|
SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(dropper.pitch,dropper.angle,dropper.roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(dropper.pitch,dropper.angle,dropper.roll);
|
||||||
vel = x*12.0;
|
vel = x*12.0;
|
||||||
vel.z += 4.0;
|
vel.z += 4.0;
|
||||||
angle = dropper.angle;
|
angle = dropper.angle;
|
||||||
|
|
@ -956,7 +957,7 @@ Class UTViewSpark : UTSpark
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||||
bInvisible = (players[consoleplayer].camera != target);
|
bInvisible = (players[consoleplayer].camera != target);
|
||||||
|
|
@ -1201,7 +1202,7 @@ Class UTViewSmoke : UTSmoke
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||||
bInvisible = (players[consoleplayer].camera != target);
|
bInvisible = (players[consoleplayer].camera != target);
|
||||||
|
|
@ -1609,13 +1610,19 @@ Class UTMainHandler : EventHandler
|
||||||
else e.Replacement = 'RifleAmmo';
|
else e.Replacement = 'RifleAmmo';
|
||||||
}
|
}
|
||||||
else if ( e.Replacee == 'InvulnerabilitySphere' ) e.Replacement = (!deathmatch||flak_dmsshock)?'EnhancedShockRifle':'UDamage';
|
else if ( e.Replacee == 'InvulnerabilitySphere' ) e.Replacement = (!deathmatch||flak_dmsshock)?'EnhancedShockRifle':'UDamage';
|
||||||
else if ( (e.Replacee == 'Berserk') || (e.Replacee == 'ArtiTomeOfPower') || (e.Replacee == 'ArtiEgg') ) e.Replacement = 'UDamage';
|
else if ( e.Replacee == 'Berserk' ) e.Replacement = 'UDamage';
|
||||||
else if ( (e.Replacee == 'Soulsphere') || (e.Replacee == 'ArtiSuperHealth') ) e.Replacement = 'UTHealthPack';
|
else if ( (e.Replacee == 'ArtiTomeOfPower') || (e.Replacee == 'ArtiEgg') ) e.Replacement = 'ActUDamage';
|
||||||
else if ( (e.Replacee == 'Megasphere') || (e.Replacee == 'ArtiInvulnerability') ) e.Replacement = 'UTShieldBelt';
|
else if ( e.Replacee == 'Soulsphere' ) e.Replacement = 'UTHealthPack';
|
||||||
|
else if ( e.Replacee == 'ArtiSuperHealth' ) e.Replacement = 'ActHealthPack';
|
||||||
|
else if ( e.Replacee == 'Megasphere' ) e.Replacement = 'UTShieldBelt';
|
||||||
|
else if ( e.Replacee == 'ArtiInvulnerability' ) e.Replacement = 'ActShieldBelt';
|
||||||
else if ( (e.Replacee == 'Allmap') || (e.Replacee == 'SuperMap') ) e.Replacement = 'UTMapRevealer';
|
else if ( (e.Replacee == 'Allmap') || (e.Replacee == 'SuperMap') ) e.Replacement = 'UTMapRevealer';
|
||||||
else if ( (e.Replacee == 'BlurSphere') || (e.Replacee == 'ArtiInvisibility') ) e.Replacement = 'UTInvisibility';
|
else if ( e.Replacee == 'BlurSphere' ) e.Replacement = 'UTInvisibility';
|
||||||
else if ( (e.Replacee == 'Infrared') || (e.Replacee == 'ArtiTorch') ) e.Replacement = 'Searchlight';
|
else if ( e.Replacee == 'ArtiInvisibility' ) e.Replacement = 'ActInvisibility';
|
||||||
else if ( (e.Replacee == 'RadSuit') || (e.Replacee == 'ArtiFly') ) e.Replacement = 'UTJumpBoots';
|
else if ( e.Replacee == 'Infrared' ) e.Replacement = 'Searchlight';
|
||||||
|
else if ( e.Replacee == 'ArtiTorch' ) e.Replacement = 'ActSearchlight';
|
||||||
|
else if ( e.Replacee == 'RadSuit' ) e.Replacement = 'UTJumpBoots';
|
||||||
|
else if ( e.Replacee == 'ArtiFly' ) e.Replacement = 'ActJumpBoots';
|
||||||
else if ( (e.Replacee == 'Backpack') || (e.Replacee == 'BagOfHolding') ) e.Replacement = 'UTBackpack';
|
else if ( (e.Replacee == 'Backpack') || (e.Replacee == 'BagOfHolding') ) e.Replacement = 'UTBackpack';
|
||||||
else if ( (e.Replacee == 'ArmorBonus') || (e.Replacee == 'ArtiTimeBomb') ) e.Replacement = 'UTArmorBonus';
|
else if ( (e.Replacee == 'ArmorBonus') || (e.Replacee == 'ArtiTimeBomb') ) e.Replacement = 'UTArmorBonus';
|
||||||
else if ( (e.Replacee == 'HealthBonus') || (e.Replacee == 'CrystalVial') ) e.Replacement = 'UTHealthBonus';
|
else if ( (e.Replacee == 'HealthBonus') || (e.Replacee == 'CrystalVial') ) e.Replacement = 'UTHealthBonus';
|
||||||
|
|
@ -1625,16 +1632,16 @@ Class UTMainHandler : EventHandler
|
||||||
else if ( e.Replacee == 'Medikit' ) e.Replacement = 'UTHealthBox';
|
else if ( e.Replacee == 'Medikit' ) e.Replacement = 'UTHealthBox';
|
||||||
else if ( e.Replacee == 'ArtiHealth' )
|
else if ( e.Replacee == 'ArtiHealth' )
|
||||||
{
|
{
|
||||||
if ( !Random[Replacements](0,3) ) e.Replacement = 'UTHealthBox';
|
if ( !Random[Replacements](0,3) ) e.Replacement = 'ActHealthBox';
|
||||||
else e.Replacement = 'UTMedBox';
|
else e.Replacement = 'ActMedBox';
|
||||||
}
|
}
|
||||||
else if ( e.Replacee == 'ArtiTeleport' )
|
else if ( e.Replacee == 'ArtiTeleport' )
|
||||||
{
|
{
|
||||||
// I have no idea what to replace this with, so just have some random stuff
|
// I have no idea what to replace this with, so just have some random stuff
|
||||||
if ( Random[Replacements](0,1) ) e.Replacement = 'UTBackpack';
|
if ( Random[Replacements](0,1) ) e.Replacement = 'UTBackpack';
|
||||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'UTShieldBelt';
|
else if ( Random[Replacements](0,1) ) e.Replacement = 'ActShieldBelt';
|
||||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'UTHealthPack';
|
else if ( Random[Replacements](0,1) ) e.Replacement = 'ActHealthPack';
|
||||||
else e.Replacement = 'UDamage';
|
else e.Replacement = 'ActUDamage';
|
||||||
}
|
}
|
||||||
else if ( e.Replacee == 'RedCard' ) e.Replacement = 'UTRedKey';
|
else if ( e.Replacee == 'RedCard' ) e.Replacement = 'UTRedKey';
|
||||||
else if ( e.Replacee == 'BlueCard' ) e.Replacement = 'UTBlueKey';
|
else if ( e.Replacee == 'BlueCard' ) e.Replacement = 'UTBlueKey';
|
||||||
|
|
@ -1674,7 +1681,7 @@ Class UTMainHandler : EventHandler
|
||||||
// just replace the -noflat- with a better scaled version and change the sky
|
// just replace the -noflat- with a better scaled version and change the sky
|
||||||
if ( !flak_doomtest )
|
if ( !flak_doomtest )
|
||||||
{
|
{
|
||||||
if ( (level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33") || (level.GetChecksum() ~== "D8206A3414DA967F2159473B5791139E") )
|
if ( (level.GetChecksum() ~== "959A613006CC3AA912C4A22908B7566A") || (level.GetChecksum() ~== "75319AE5D2DBA214C5D394BF69DF32F4") )
|
||||||
{
|
{
|
||||||
Level.ReplaceTextures("-noflat-","DefTex",0);
|
Level.ReplaceTextures("-noflat-","DefTex",0);
|
||||||
TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any);
|
TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any);
|
||||||
|
|
@ -1683,7 +1690,7 @@ Class UTMainHandler : EventHandler
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// prettify Kinsie's test map for a more Unreal feel
|
// prettify Kinsie's test map for a more Unreal feel
|
||||||
if ( level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33" )
|
if ( level.GetChecksum() ~== "959A613006CC3AA912C4A22908B7566A" )
|
||||||
{
|
{
|
||||||
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
|
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
|
||||||
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
|
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
|
||||||
|
|
@ -1703,13 +1710,13 @@ Class UTMainHandler : EventHandler
|
||||||
level.sectors[i].SetTexture(1,skyflatnum);
|
level.sectors[i].SetTexture(1,skyflatnum);
|
||||||
if ( level.sectors[i].GetTexture(0) == deftex )
|
if ( level.sectors[i].GetTexture(0) == deftex )
|
||||||
{
|
{
|
||||||
level.sectors[i].SetTexture(0,(i==47)?baseceil:baseflor);
|
level.sectors[i].SetTexture(0,((i==47)||((i>=256)&&(i<=260)))?baseceil:baseflor);
|
||||||
level.sectors[i].SetXScale(0,2.);
|
level.sectors[i].SetXScale(0,2.);
|
||||||
level.sectors[i].SetYScale(0,2.);
|
level.sectors[i].SetYScale(0,2.);
|
||||||
}
|
}
|
||||||
if ( level.sectors[i].GetTexture(1) == deftex )
|
if ( level.sectors[i].GetTexture(1) == deftex )
|
||||||
{
|
{
|
||||||
level.sectors[i].SetTexture(1,(i==47)?baseflor:baseceil);
|
level.sectors[i].SetTexture(1,((i==47)||((i>=256)&&(i<=260)))?baseflor:baseceil);
|
||||||
level.sectors[i].SetXScale(1,2.);
|
level.sectors[i].SetXScale(1,2.);
|
||||||
level.sectors[i].SetYScale(1,2.);
|
level.sectors[i].SetYScale(1,2.);
|
||||||
}
|
}
|
||||||
|
|
@ -1780,7 +1787,7 @@ Class UTMainHandler : EventHandler
|
||||||
AddAmbient((3584,736,64),"testamb/slime",0.4,2.4);
|
AddAmbient((3584,736,64),"testamb/slime",0.4,2.4);
|
||||||
AddAmbient((3584,512,64),"testamb/lava",0.8,2.4);
|
AddAmbient((3584,512,64),"testamb/lava",0.8,2.4);
|
||||||
}
|
}
|
||||||
else if ( level.GetChecksum() ~== "D8206A3414DA967F2159473B5791139E" )
|
else if ( level.GetChecksum() ~== "75319AE5D2DBA214C5D394BF69DF32F4" )
|
||||||
{
|
{
|
||||||
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
|
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
|
||||||
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
|
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
|
||||||
|
|
@ -1800,13 +1807,13 @@ Class UTMainHandler : EventHandler
|
||||||
level.sectors[i].SetTexture(1,skyflatnum);
|
level.sectors[i].SetTexture(1,skyflatnum);
|
||||||
if ( level.sectors[i].GetTexture(0) == deftex )
|
if ( level.sectors[i].GetTexture(0) == deftex )
|
||||||
{
|
{
|
||||||
level.sectors[i].SetTexture(0,(i==47)?baseceil:baseflor);
|
level.sectors[i].SetTexture(0,((i==47)||((i>=144)&&(i<=148)))?baseceil:baseflor);
|
||||||
level.sectors[i].SetXScale(0,2.);
|
level.sectors[i].SetXScale(0,2.);
|
||||||
level.sectors[i].SetYScale(0,2.);
|
level.sectors[i].SetYScale(0,2.);
|
||||||
}
|
}
|
||||||
if ( level.sectors[i].GetTexture(1) == deftex )
|
if ( level.sectors[i].GetTexture(1) == deftex )
|
||||||
{
|
{
|
||||||
level.sectors[i].SetTexture(1,(i==47)?baseflor:baseceil);
|
level.sectors[i].SetTexture(1,((i==47)||((i>=144)&&(i<=148)))?baseflor:baseceil);
|
||||||
level.sectors[i].SetXScale(1,2.);
|
level.sectors[i].SetXScale(1,2.);
|
||||||
level.sectors[i].SetYScale(1,2.);
|
level.sectors[i].SetYScale(1,2.);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,12 @@ Class ViewTracer : LineTracer
|
||||||
|
|
||||||
Class UTHud : BaseStatusBar
|
Class UTHud : BaseStatusBar
|
||||||
{
|
{
|
||||||
TextureID AmmoBar, Boxes[4], Keys[5], BigNum[12], Flash, Slots[10], Icons[14], Uses[14], Man[5], Woman[5], Boss[5], WeaponBox, IconTloc2, UseTloc2;
|
TextureID AmmoBar, Boxes[4], Keys[5], BigNum[12], Flash, Slots[10], Icons[14], Uses[14], Man[5], Woman[5], Boss[5], WeaponBox, IconTloc2, UseTloc2, ItemBox, ItemSel, ItemFlash, ItemArrow[2], LastItem;
|
||||||
Class<Weapon> IconClasses[14];
|
Class<Weapon> IconClasses[14];
|
||||||
double HScale;
|
double HScale;
|
||||||
Color tintcolor, bgcolor;
|
Color tintcolor, bgcolor;
|
||||||
int opacity;
|
int opacity;
|
||||||
int lastfrag, lastfragcnt, lastpickup, lastslot;
|
int lastfrag, lastfragcnt, lastpickup, lastslot, lastamount;
|
||||||
ViewTracer vtracer;
|
ViewTracer vtracer;
|
||||||
Actor lastseen;
|
Actor lastseen;
|
||||||
int lastseentic;
|
int lastseentic;
|
||||||
|
|
@ -145,6 +145,11 @@ Class UTHud : BaseStatusBar
|
||||||
Boss[3] = TexMan.CheckForTexture("BossBot",TexMan.Type_Any);
|
Boss[3] = TexMan.CheckForTexture("BossBot",TexMan.Type_Any);
|
||||||
Boss[4] = TexMan.CheckForTexture("BossBlt",TexMan.Type_Any);
|
Boss[4] = TexMan.CheckForTexture("BossBlt",TexMan.Type_Any);
|
||||||
WeaponBox = TexMan.CheckForTexture("WpSel",TexMan.Type_Any);
|
WeaponBox = TexMan.CheckForTexture("WpSel",TexMan.Type_Any);
|
||||||
|
ItemBox = TexMan.CheckForTexture("ItemBox",TexMan.Type_Any);
|
||||||
|
ItemSel = TexMan.CheckForTexture("ItmSel",TexMan.Type_Any);
|
||||||
|
ItemFlash = TexMan.CheckForTexture("IFlash",TexMan.Type_Any);
|
||||||
|
ItemArrow[0] = TexMan.CheckForTexture("ItmArrw1",TexMan.Type_Any);
|
||||||
|
ItemArrow[1] = TexMan.CheckForTexture("ItmArrw2",TexMan.Type_Any);
|
||||||
}
|
}
|
||||||
|
|
||||||
override void Draw( int state, double TicFrac )
|
override void Draw( int state, double TicFrac )
|
||||||
|
|
@ -189,7 +194,7 @@ Class UTHud : BaseStatusBar
|
||||||
{
|
{
|
||||||
BeginHUD();
|
BeginHUD();
|
||||||
FracTic = TicFrac;
|
FracTic = TicFrac;
|
||||||
DrawUTHUD();
|
DrawUTHUD(lbottom);
|
||||||
}
|
}
|
||||||
if ( (CPlayer.ReadyWeapon is 'UTWeapon') )
|
if ( (CPlayer.ReadyWeapon is 'UTWeapon') )
|
||||||
UTWeapon(CPlayer.ReadyWeapon).PostRender(lbottom);
|
UTWeapon(CPlayer.ReadyWeapon).PostRender(lbottom);
|
||||||
|
|
@ -200,25 +205,25 @@ Class UTHud : BaseStatusBar
|
||||||
return Color(a.a,int(a.r*(1.-x)+b.r*x),int(a.g*(1.-x)+b.g*x),int(a.b*(1.-x)+b.b*x));
|
return Color(a.a,int(a.r*(1.-x)+b.r*x),int(a.g*(1.-x)+b.g*x),int(a.b*(1.-x)+b.b*x));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UTDrawTintedTex( TextureID tx, double sx = 1.0, int opacity = -1, Color tint = Color("Black") )
|
private void UTDrawTintedTex( TextureID tx, double sx = 1.0, int opacity = -1, Color tint = Color("Black"), bool flip = false )
|
||||||
{
|
{
|
||||||
double ss = (HScale*sx);
|
double ss = (HScale*sx);
|
||||||
double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss);
|
double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss);
|
||||||
double dx = CurX/ss, dy = CurY/ss;
|
double dx = CurX/ss, dy = CurY/ss;
|
||||||
if ( opacity == -1 ) opacity = self.opacity;
|
if ( opacity == -1 ) opacity = self.opacity;
|
||||||
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor,DTA_TopOffset,0,DTA_LeftOffset,0);
|
||||||
double alpha = clamp(opacity/15.,0.0,1.0);
|
double alpha = clamp(opacity/15.,0.0,1.0);
|
||||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,(tint!="Black")?tint:tintcolor);
|
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,(tint!="Black")?tint:tintcolor,DTA_TopOffset,0,DTA_LeftOffset,0,DTA_FlipX,flip);
|
||||||
}
|
}
|
||||||
private void UTDrawPlainTex( TextureID tx, double sx = 1.0, int opacity = -1 )
|
private void UTDrawPlainTex( TextureID tx, double sx = 1.0, int opacity = -1, bool flip = false )
|
||||||
{
|
{
|
||||||
double ss = (HScale*sx);
|
double ss = (HScale*sx);
|
||||||
double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss);
|
double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss);
|
||||||
double dx = CurX/ss, dy = CurY/ss;
|
double dx = CurX/ss, dy = CurY/ss;
|
||||||
if ( opacity == -1 ) opacity = self.opacity;
|
if ( opacity == -1 ) opacity = self.opacity;
|
||||||
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor,DTA_TopOffset,0,DTA_LeftOffset,0,DTA_FlipX,flip);
|
||||||
double alpha = clamp(opacity/15.,0.0,1.0);
|
double alpha = clamp(opacity/15.,0.0,1.0);
|
||||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha);
|
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_TopOffset,0,DTA_LeftOffset,0,DTA_FlipX,flip);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool UTDrawWeaponIcon( Weapon w, bool use, double sx = 1.0 )
|
private bool UTDrawWeaponIcon( Weapon w, bool use, double sx = 1.0 )
|
||||||
|
|
@ -255,9 +260,9 @@ Class UTHud : BaseStatusBar
|
||||||
double flen = 3*step;
|
double flen = 3*step;
|
||||||
double len = digits.length()*step;
|
double len = digits.length()*step;
|
||||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
for ( int i=0; i<digits.length(); i++ ) if ( digits.CharAt(i) == "1" ) len -= 0.5*step;
|
for ( int i=0; i<digits.length(); i++ ) if ( digits.ByteAt(i) == 0x31 ) len -= 0.5*step;
|
||||||
CurX += (flen-len)*0.5;
|
CurX += (flen-len)*0.5;
|
||||||
if ( digits.CharAt(0) == "1" ) CurX -= 0.5*step;
|
if ( digits.ByteAt(0) == 0x31 ) CurX -= 0.5*step;
|
||||||
if ( value < 0 )
|
if ( value < 0 )
|
||||||
{
|
{
|
||||||
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[11],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[11],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||||
|
|
@ -266,9 +271,9 @@ Class UTHud : BaseStatusBar
|
||||||
}
|
}
|
||||||
for ( int i=0; i<digits.length(); i++ )
|
for ( int i=0; i<digits.length(); i++ )
|
||||||
{
|
{
|
||||||
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[digits.CharCodeAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[digits.ByteAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||||
Screen.DrawTexture(BigNum[digits.CharCodeAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,DrawColor);
|
Screen.DrawTexture(BigNum[digits.ByteAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,DrawColor);
|
||||||
CurX += ((i<digits.length()-1)&&(digits.CharAt(i+1)=="1"))?step*0.5:step;
|
CurX += ((i<digits.length()-1)&&(digits.ByteAt(i+1)==0x31))?step*0.5:step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -285,26 +290,8 @@ Class UTHud : BaseStatusBar
|
||||||
CurX += 8*hudsize*HScale;
|
CurX += 8*hudsize*HScale;
|
||||||
CurY += 14*hudsize*HScale;
|
CurY += 14*hudsize*HScale;
|
||||||
DrawColor = WhiteColor;
|
DrawColor = WhiteColor;
|
||||||
if ( ammotype1 )
|
let cw = CPlayer.ReadyWeapon;
|
||||||
{
|
if ( ammotype1 ) UTDrawBigNum(ammotype1.Amount,hudsize);
|
||||||
UTDrawBigNum(ammotype1.Amount,hudsize);
|
|
||||||
let cw = CPlayer.ReadyWeapon;
|
|
||||||
if ( flak_transloc2k4 && (cw is 'Translocator') )
|
|
||||||
{
|
|
||||||
// draw ammo charge bar
|
|
||||||
double ch = Translocator(cw).ammocharge;
|
|
||||||
CurX = BaseX+6*hudsize*HScale;
|
|
||||||
CurY = BaseY+53*hudsize*HScale;
|
|
||||||
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
|
||||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
|
||||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
|
||||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
|
||||||
double ddw = bs.x*ch;
|
|
||||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
|
||||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
|
||||||
}
|
|
||||||
// TODO try also drawing enforcer and pulsegun clips as bars
|
|
||||||
}
|
|
||||||
if ( ammotype2 && (ammotype2 != ammotype1) )
|
if ( ammotype2 && (ammotype2 != ammotype1) )
|
||||||
{
|
{
|
||||||
CurX = showweapons?(Screen.GetWidth()-128*hudsize*HScale):((Screen.GetWidth()+256*hudsize*HScale)*0.5);
|
CurX = showweapons?(Screen.GetWidth()-128*hudsize*HScale):((Screen.GetWidth()+256*hudsize*HScale)*0.5);
|
||||||
|
|
@ -315,6 +302,101 @@ Class UTHud : BaseStatusBar
|
||||||
CurY += 14*hudsize**HScale;
|
CurY += 14*hudsize**HScale;
|
||||||
UTDrawBigNum(ammotype2.Amount,hudsize);
|
UTDrawBigNum(ammotype2.Amount,hudsize);
|
||||||
}
|
}
|
||||||
|
// extra bars
|
||||||
|
if ( flak_transloc2k4 && (cw is 'Translocator') )
|
||||||
|
{
|
||||||
|
// draw ammo charge bar
|
||||||
|
double ch = Translocator(cw).ammocharge;
|
||||||
|
CurX = BaseX+6*hudsize*HScale;
|
||||||
|
CurY = BaseY+54*hudsize*HScale;
|
||||||
|
Vector2 ss = (0.54,0.25)*hudsize*HScale;
|
||||||
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
|
double ddw = bs.x*ch;
|
||||||
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
}
|
||||||
|
else if ( flak_enforcerreload && (cw is 'Enforcer') )
|
||||||
|
{
|
||||||
|
// draw clip(s)
|
||||||
|
double ch = Enforcer(cw).ClipCount/20.;
|
||||||
|
CurX = BaseX+6*hudsize*HScale;
|
||||||
|
CurY = BaseY+53*hudsize*HScale;
|
||||||
|
Vector2 ss;
|
||||||
|
ss = (0.54,(cw.Amount>1)?0.125:0.3)*hudsize*HScale;
|
||||||
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
|
double ddw = bs.x*ch;
|
||||||
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
if ( cw.Amount > 1 )
|
||||||
|
{
|
||||||
|
ch = Enforcer(cw).SlaveClipCount/20.;
|
||||||
|
CurY += 3*hudsize*HScale;
|
||||||
|
ss = (0.54,0.125)*hudsize*HScale;
|
||||||
|
dw = (Screen.GetWidth()/ss.x);
|
||||||
|
dh = (Screen.GetHeight()/ss.y);
|
||||||
|
dx = CurX/ss.x;
|
||||||
|
dy = CurY/ss.y;
|
||||||
|
ddw = bs.x*ch;
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( flak_pulsereload && (cw is 'Pulsegun') )
|
||||||
|
{
|
||||||
|
// draw clip
|
||||||
|
double ch = Pulsegun(cw).ClipCount/50.;
|
||||||
|
CurX = BaseX+6*hudsize*HScale;
|
||||||
|
CurY = BaseY+53*hudsize*HScale;
|
||||||
|
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||||
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
|
double ddw = bs.x*ch;
|
||||||
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
}
|
||||||
|
else if ( cw is 'ImpactHammer' )
|
||||||
|
{
|
||||||
|
double ch = min(ImpactHammer(cw).chargesize,1.5)/1.5;
|
||||||
|
CurX = BaseX+6*hudsize*HScale;
|
||||||
|
CurY = BaseY+53*hudsize*HScale;
|
||||||
|
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||||
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
|
double ddw = bs.x*ch;
|
||||||
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
}
|
||||||
|
else if ( cw is 'BioRifle' )
|
||||||
|
{
|
||||||
|
double ch = min(BioRifle(cw).charge,5.1)/5.1;
|
||||||
|
CurX = BaseX+6*hudsize*HScale;
|
||||||
|
CurY = BaseY+53*hudsize*HScale;
|
||||||
|
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||||
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
|
double ddw = bs.x*ch;
|
||||||
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
}
|
||||||
|
else if ( cw is 'UTRocketLauncher' )
|
||||||
|
{
|
||||||
|
double ch = cw.special1/6.;
|
||||||
|
CurX = BaseX+6*hudsize*HScale;
|
||||||
|
CurY = BaseY+53*hudsize*HScale;
|
||||||
|
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||||
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
|
double ddw = bs.x*ch;
|
||||||
|
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||||
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void DrawStatus()
|
private void DrawStatus()
|
||||||
{
|
{
|
||||||
|
|
@ -609,9 +691,108 @@ Class UTHud : BaseStatusBar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawInventory( double lbottom )
|
||||||
|
{
|
||||||
|
if ( isInventoryBarVisible() )
|
||||||
|
{
|
||||||
|
CPlayer.mo.InvFirst = ValidateInvFirst(5);
|
||||||
|
if ( !CPlayer.mo.InvFirst ) return;
|
||||||
|
// draw the boxes
|
||||||
|
double BaseX, BaseY;
|
||||||
|
BaseX = CurX = (Screen.GetWidth()-64*5*hudsize*HScale)/2.;
|
||||||
|
BaseY = CurY = Screen.GetHeight()-224*hudsize*HScale;
|
||||||
|
for ( int i=0; i<5; i++ )
|
||||||
|
{
|
||||||
|
UTDrawTintedTex(ItemBox,hudsize);
|
||||||
|
CurX += 64*hudsize*HScale;
|
||||||
|
}
|
||||||
|
int i = 0;
|
||||||
|
Inventory itm;
|
||||||
|
for ( itm=CPlayer.mo.InvFirst; (itm && (i < 5)); itm=itm.NextInv() )
|
||||||
|
{
|
||||||
|
CurX = BaseX+2*hudsize*HScale;
|
||||||
|
CurY = BaseY+2*hudsize*HScale;
|
||||||
|
// if item doesn't fit 60x60, scale
|
||||||
|
Vector2 scl = TexMan.GetScaledSize(itm.Icon);
|
||||||
|
double mscl = max(scl.x,scl.y)/60.;
|
||||||
|
UTDrawTintedTex(itm.Icon,hudsize*mscl);
|
||||||
|
// amount if >1
|
||||||
|
if ( itm.Amount > 1 )
|
||||||
|
{
|
||||||
|
CurX = BaseX+32*hudsize*HScale;
|
||||||
|
CurY = BaseY+40*hudsize*HScale;
|
||||||
|
DrawColor = WhiteColor;
|
||||||
|
UTDrawBigNum(itm.Amount,hudsize*0.5);
|
||||||
|
}
|
||||||
|
// selection box if current item
|
||||||
|
if ( itm == CPlayer.mo.InvSel )
|
||||||
|
{
|
||||||
|
CurX = BaseX;
|
||||||
|
CurY = BaseY;
|
||||||
|
UTDrawPlainTex(ItemSel,hudsize,opacity+7);
|
||||||
|
}
|
||||||
|
BaseX += 64*hudsize*HScale;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
// draw arrows
|
||||||
|
CurY = Screen.GetHeight()-204*hudsize*HScale;
|
||||||
|
CurX = (Screen.GetWidth()-(64*5+40)*hudsize*HScale)/2.;
|
||||||
|
UTDrawTintedTex(ItemArrow[CPlayer.mo.InvFirst!=CPlayer.mo.FirstInv()],hudsize,flip:true);
|
||||||
|
CurX = (Screen.GetWidth()+(64*5+8)*hudsize*HScale)/2.;
|
||||||
|
UTDrawTintedTex(ItemArrow[!!itm],hudsize);
|
||||||
|
}
|
||||||
|
else if ( CPlayer.mo.InvSel || artiflashtick )
|
||||||
|
{
|
||||||
|
// flashie
|
||||||
|
if ( artiflashtick )
|
||||||
|
{
|
||||||
|
DrawColor = GoldColor;
|
||||||
|
CurX = -32*hudsize*HScale;
|
||||||
|
CurY = lbottom-96*hudsize*HScale;
|
||||||
|
UTDrawTintedTex(ItemFlash,hudsize,min(opacity,15),DrawColor);
|
||||||
|
}
|
||||||
|
// position 64x64 box
|
||||||
|
CurX = 0;
|
||||||
|
CurY = lbottom-64*hudsize*HScale;
|
||||||
|
UTDrawTintedTex(ItemBox,hudsize);
|
||||||
|
if ( artiflashtick )
|
||||||
|
{
|
||||||
|
Vector2 scl = TexMan.GetScaledSize(LastItem);
|
||||||
|
double mscl = max(scl.x,scl.y)/60.;
|
||||||
|
CurX += 2*hudsize*HScale;
|
||||||
|
CurY += 2*hudsize*HScale;
|
||||||
|
UTDrawTintedTex(LastItem,hudsize*mscl);
|
||||||
|
if ( LastAmount <= 1 ) return;
|
||||||
|
CurX = 32*hudsize*HScale;
|
||||||
|
CurY = lbottom-24*hudsize*HScale;
|
||||||
|
DrawColor = WhiteColor;
|
||||||
|
UTDrawBigNum(LastAmount,hudsize*0.5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( !CPlayer.mo.InvSel ) return;
|
||||||
|
// if item doesn't fit 60x60, scale
|
||||||
|
Vector2 scl = TexMan.GetScaledSize(CPlayer.mo.InvSel.Icon);
|
||||||
|
double mscl = max(scl.x,scl.y)/60.;
|
||||||
|
CurX += 2*hudsize*HScale;
|
||||||
|
CurY += 2*hudsize*HScale;
|
||||||
|
UTDrawTintedTex(CPlayer.mo.InvSel.Icon,hudsize*mscl);
|
||||||
|
// amount if >1
|
||||||
|
if ( CPlayer.mo.InvSel.Amount <= 1 ) return;
|
||||||
|
CurX = 32*hudsize*HScale;
|
||||||
|
CurY = lbottom-24*hudsize*HScale;
|
||||||
|
DrawColor = WhiteColor;
|
||||||
|
UTDrawBigNum(CPlayer.mo.InvSel.Amount,hudsize*0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override void Tick()
|
override void Tick()
|
||||||
{
|
{
|
||||||
Super.Tick();
|
Super.Tick();
|
||||||
|
if ( CPlayer.mo.InvSel && !artiflashtick )
|
||||||
|
{
|
||||||
|
LastItem = CPlayer.mo.InvSel.Icon;
|
||||||
|
LastAmount = CPlayer.mo.InvSel.Amount-1;
|
||||||
|
}
|
||||||
if ( deathmatch||teamplay )
|
if ( deathmatch||teamplay )
|
||||||
{
|
{
|
||||||
if ( CPlayer.fragcount != lastfragcnt ) lastfrag = level.time;
|
if ( CPlayer.fragcount != lastfragcnt ) lastfrag = level.time;
|
||||||
|
|
@ -629,7 +810,7 @@ Class UTHud : BaseStatusBar
|
||||||
lastseentic = level.time;
|
lastseentic = level.time;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawUTHUD()
|
private void DrawUTHUD( double lbottom )
|
||||||
{
|
{
|
||||||
// Display Weapons
|
// Display Weapons
|
||||||
if ( showweapons ) DrawWeapons();
|
if ( showweapons ) DrawWeapons();
|
||||||
|
|
@ -641,6 +822,8 @@ Class UTHud : BaseStatusBar
|
||||||
DrawStatus();
|
DrawStatus();
|
||||||
// Display Keys
|
// Display Keys
|
||||||
DrawKeys();
|
DrawKeys();
|
||||||
|
// Inventory Bar
|
||||||
|
DrawInventory(lbottom);
|
||||||
// Display Identification Info
|
// Display Identification Info
|
||||||
if ( CPlayer == players[consoleplayer] && showinfo ) DrawIdentifyInfo();
|
if ( CPlayer == players[consoleplayer] && showinfo ) DrawIdentifyInfo();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ Class WarheadLauncher : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
vel -= x*10;
|
vel -= x*10;
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
||||||
Actor p = Spawn("WarShell",origin);
|
Actor p = Spawn("WarShell",origin);
|
||||||
|
|
@ -674,7 +674,7 @@ Class WarheadLauncher : UTWeapon
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
if ( !weap ) return;
|
if ( !weap ) return;
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
vel -= x*0.2;
|
vel -= x*0.2;
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
||||||
int numpt = Random[Warhead](10,20);
|
int numpt = Random[Warhead](10,20);
|
||||||
|
|
@ -698,7 +698,7 @@ Class WarheadLauncher : UTWeapon
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
vel -= x*10;
|
vel -= x*10;
|
||||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
||||||
Actor p = Spawn("GuidedWarShell",origin);
|
Actor p = Spawn("GuidedWarShell",origin);
|
||||||
|
|
|
||||||