Overhaul to how reloading works, not much else has happened.
Addition to HUD for showing clip counts (kinda cheap-looking, but still better than what Oldskool did). Charge for some weapons and loaded rockets for eightball also use the clipcount display, like in Doom Tournament. Small fixups for dual wielding logic.
33
fontdefs.txt
|
|
@ -1,13 +1,26 @@
|
||||||
U083Digits
|
U083Digits
|
||||||
{
|
{
|
||||||
0 Zero083
|
0 "graphics/hud083/font/Zero083.png"
|
||||||
1 One083
|
1 "graphics/hud083/font/One083.png"
|
||||||
2 Two083
|
2 "graphics/hud083/font/Two083.png"
|
||||||
3 Three083
|
3 "graphics/hud083/font/Three083.png"
|
||||||
4 Four083
|
4 "graphics/hud083/font/Four083.png"
|
||||||
5 Five083
|
5 "graphics/hud083/font/Five083.png"
|
||||||
6 Six083
|
6 "graphics/hud083/font/Six083.png"
|
||||||
7 Seven083
|
7 "graphics/hud083/font/Seven083.png"
|
||||||
8 Eight083
|
8 "graphics/hud083/font/Eight083.png"
|
||||||
9 Nine083
|
9 "graphics/hud083/font/Nine083.png"
|
||||||
|
}
|
||||||
|
U083DigitsSmall
|
||||||
|
{
|
||||||
|
0 "graphics/hud083/font/sZero083.png"
|
||||||
|
1 "graphics/hud083/font/sOne083.png"
|
||||||
|
2 "graphics/hud083/font/sTwo083.png"
|
||||||
|
3 "graphics/hud083/font/sThree083.png"
|
||||||
|
4 "graphics/hud083/font/sFour083.png"
|
||||||
|
5 "graphics/hud083/font/sFive083.png"
|
||||||
|
6 "graphics/hud083/font/sSix083.png"
|
||||||
|
7 "graphics/hud083/font/sSeven083.png"
|
||||||
|
8 "graphics/hud083/font/sEight083.png"
|
||||||
|
9 "graphics/hud083/font/sNine083.png"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
BIN
graphics/hud083/font/sEight083.png
Normal file
|
After Width: | Height: | Size: 580 B |
BIN
graphics/hud083/font/sFive083.png
Normal file
|
After Width: | Height: | Size: 569 B |
BIN
graphics/hud083/font/sFour083.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
graphics/hud083/font/sNine083.png
Normal file
|
After Width: | Height: | Size: 579 B |
BIN
graphics/hud083/font/sOne083.png
Normal file
|
After Width: | Height: | Size: 519 B |
BIN
graphics/hud083/font/sSeven083.png
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
graphics/hud083/font/sSix083.png
Normal file
|
After Width: | Height: | Size: 581 B |
BIN
graphics/hud083/font/sThree083.png
Normal file
|
After Width: | Height: | Size: 583 B |
BIN
graphics/hud083/font/sTwo083.png
Normal file
|
After Width: | Height: | Size: 561 B |
BIN
graphics/hud083/font/sZero083.png
Normal file
|
After Width: | Height: | Size: 581 B |
|
|
@ -310,6 +310,11 @@ Class ASMDHitbox : ShockHitbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Radius 6;
|
||||||
|
Height 12;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Class ASMDBall : Actor
|
Class ASMDBall : Actor
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,11 @@ Class Automag : UnrealWeapon
|
||||||
property ClipCount : ClipCount;
|
property ClipCount : ClipCount;
|
||||||
property SlaveClipCount : SlaveClipCount;
|
property SlaveClipCount : SlaveClipCount;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
if ( Amount > 1 ) return ClipCount, SlaveClipCount, (ClipCount<5), (SlaveClipCount<5);
|
||||||
|
return ClipCount, -1, (ClipCount<5), false;
|
||||||
|
}
|
||||||
override bool HandlePickup( Inventory item )
|
override bool HandlePickup( Inventory item )
|
||||||
{
|
{
|
||||||
if ( sting_automags && (item.GetClass() == GetClass()) )
|
if ( sting_automags && (item.GetClass() == GetClass()) )
|
||||||
|
|
@ -72,7 +77,7 @@ Class Automag : UnrealWeapon
|
||||||
if ( slave )
|
if ( slave )
|
||||||
{
|
{
|
||||||
if ( invoker.slaveclipcount < 5 ) A_PlaySound("automag/click",CHAN_ITEM,!Dampener.Active(self)?1.:.35);
|
if ( invoker.slaveclipcount < 5 ) A_PlaySound("automag/click",CHAN_ITEM,!Dampener.Active(self)?1.:.35);
|
||||||
if ( (invoker.slaveclipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
if ( invoker.slaveclipcount <= 0 )
|
||||||
{
|
{
|
||||||
invoker.slaverefire = 0;
|
invoker.slaverefire = 0;
|
||||||
return;
|
return;
|
||||||
|
|
@ -81,25 +86,21 @@ Class Automag : UnrealWeapon
|
||||||
if ( (player.cmd.buttons&BT_ATTACK) && !invoker.slavealtfire && !pending && (player.health > 0) )
|
if ( (player.cmd.buttons&BT_ATTACK) && !invoker.slavealtfire && !pending && (player.health > 0) )
|
||||||
{
|
{
|
||||||
invoker.slaverefire++;
|
invoker.slaverefire++;
|
||||||
if ( player.ReadyWeapon.CheckAmmo(Weapon.PrimaryFire,true) )
|
if ( invoker.slaveclipcount > 0 )
|
||||||
player.setpsprite(2,flash?ResolveState(flash):ResolveState("LeftHold"));
|
player.setpsprite(2,flash?ResolveState(flash):ResolveState("LeftHold"));
|
||||||
}
|
}
|
||||||
else if ( (player.cmd.buttons&BT_ALTATTACK) && invoker.slavealtfire && !pending && (player.health > 0) )
|
else if ( (player.cmd.buttons&BT_ALTATTACK) && invoker.slavealtfire && !pending && (player.health > 0) )
|
||||||
{
|
{
|
||||||
invoker.slaverefire++;
|
invoker.slaverefire++;
|
||||||
if ( player.ReadyWeapon.CheckAmmo(Weapon.AltFire,true) )
|
if ( invoker.slaveclipcount > 0 )
|
||||||
player.setpsprite(2,flash?ResolveState(flash):ResolveState("LeftAltHold"));
|
player.setpsprite(2,flash?ResolveState(flash):ResolveState("LeftAltHold"));
|
||||||
}
|
}
|
||||||
else
|
else invoker.slaverefire = 0;
|
||||||
{
|
|
||||||
invoker.slaverefire = 0;
|
|
||||||
player.ReadyWeapon.CheckAmmo(invoker.slavealtfire?Weapon.AltFire:Weapon.PrimaryFire,true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( invoker.clipcount < 5 ) A_PlaySound("automag/click",CHAN_ITEM,!Dampener.Active(self)?1.:.35);
|
if ( invoker.clipcount < 5 ) A_PlaySound("automag/click",CHAN_ITEM,!Dampener.Active(self)?1.:.35);
|
||||||
if ( (invoker.clipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
if ( invoker.clipcount <= 0 )
|
||||||
{
|
{
|
||||||
A_ClearRefire();
|
A_ClearRefire();
|
||||||
return;
|
return;
|
||||||
|
|
@ -113,9 +114,11 @@ Class Automag : UnrealWeapon
|
||||||
if ( !weap || !player ) return;
|
if ( !weap || !player ) return;
|
||||||
if ( player.cmd.buttons&BT_ATTACK && !player.ReadyWeapon.bAltFire )
|
if ( player.cmd.buttons&BT_ATTACK && !player.ReadyWeapon.bAltFire )
|
||||||
{
|
{
|
||||||
if ( (invoker.slaveclipcount <= 0) && (weap.Ammo1.Amount > 0) )
|
if ( invoker.slaveclipcount <= 0 )
|
||||||
{
|
{
|
||||||
player.setpsprite(2,ResolveState("LeftReload"));
|
let psp = player.FindPSprite(PSP_WEAPON);
|
||||||
|
if ( (weap.Ammo1.Amount > 0) && !psp.CurState.InStateSequence(ResolveState("Reload")) )
|
||||||
|
player.setpsprite(2,ResolveState("LeftReload"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
invoker.slaverefire = 0;
|
invoker.slaverefire = 0;
|
||||||
|
|
@ -124,9 +127,11 @@ Class Automag : UnrealWeapon
|
||||||
}
|
}
|
||||||
else if ( player.cmd.buttons&BT_ALTATTACK && player.ReadyWeapon.bAltFire )
|
else if ( player.cmd.buttons&BT_ALTATTACK && player.ReadyWeapon.bAltFire )
|
||||||
{
|
{
|
||||||
if ( (invoker.slaveclipcount <= 0) && (weap.Ammo1.Amount > 0) )
|
if ( invoker.slaveclipcount <= 0 )
|
||||||
{
|
{
|
||||||
player.setpsprite(2,ResolveState("LeftReload"));
|
let psp = player.FindPSprite(PSP_WEAPON);
|
||||||
|
if ( (weap.Ammo1.Amount > 0) && !psp.CurState.InStateSequence(ResolveState("Reload")) )
|
||||||
|
player.setpsprite(2,ResolveState("LeftReload"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
invoker.slaverefire = 0;
|
invoker.slaverefire = 0;
|
||||||
|
|
@ -138,10 +143,16 @@ Class Automag : UnrealWeapon
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
if ( !weap ) return;
|
if ( !weap ) return;
|
||||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
if ( slave )
|
||||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
{
|
||||||
if ( slave ) invoker.slaveclipcount--;
|
if ( invoker.slaveclipcount <= 0 ) return;
|
||||||
else invoker.clipcount--;
|
invoker.slaveclipcount--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( invoker.clipcount <= 0 ) return;
|
||||||
|
invoker.clipcount--;
|
||||||
|
}
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
||||||
A_PlaySound("automag/fire",slave?CHAN_6:CHAN_WEAPON,!Dampener.Active(self)?1.:.2);
|
A_PlaySound("automag/fire",slave?CHAN_6:CHAN_WEAPON,!Dampener.Active(self)?1.:.2);
|
||||||
|
|
@ -263,6 +274,11 @@ Class Automag : UnrealWeapon
|
||||||
}
|
}
|
||||||
Amount = 1;
|
Amount = 1;
|
||||||
}
|
}
|
||||||
|
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
||||||
|
{
|
||||||
|
if ( (ClipCount > 0) || ((Amount>1) && (SlaveClipCount > 0)) ) return true;
|
||||||
|
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
|
||||||
|
}
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
Tag "$T_AUTOMAG";
|
Tag "$T_AUTOMAG";
|
||||||
|
|
@ -329,8 +345,9 @@ Class Automag : UnrealWeapon
|
||||||
Dummy:
|
Dummy:
|
||||||
TNT1 A 1
|
TNT1 A 1
|
||||||
{
|
{
|
||||||
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) A_Overlay(PSP_WEAPON,"Reload");
|
A_CheckReload();
|
||||||
else if ( ((invoker.clipcount < min(20,invoker.Ammo1.Amount)) || (invoker.slaveclipcount < min(20,invoker.Ammo1.Amount))) ) A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM);
|
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) player.SetPSprite(PSP_WEAPON,ResolveState("Reload"));
|
||||||
|
else if ( ((invoker.clipcount < min(invoker.default.clipcount,invoker.Ammo1.Amount)) || (invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount))) ) A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM);
|
||||||
else A_WeaponReady(WRF_ALLOWZOOM);
|
else A_WeaponReady(WRF_ALLOWZOOM);
|
||||||
if ( !invoker.slaveactive && (CountInv("Automag") > 1) ) A_Overlay(2,"LeftReady");
|
if ( !invoker.slaveactive && (CountInv("Automag") > 1) ) A_Overlay(2,"LeftReady");
|
||||||
}
|
}
|
||||||
|
|
@ -341,11 +358,11 @@ Class Automag : UnrealWeapon
|
||||||
if ( health <= 0 )
|
if ( health <= 0 )
|
||||||
{
|
{
|
||||||
invoker.slaveactive = false;
|
invoker.slaveactive = false;
|
||||||
A_Overlay(2,"LeftDeselect");
|
player.SetPSprite(2,ResolveState("LeftDeselect"));
|
||||||
}
|
}
|
||||||
else if ( invoker.slavereload ) A_Overlay(2,"LeftReload");
|
else if ( invoker.slavereload ) player.SetPSprite(2,ResolveState("LeftReload"));
|
||||||
else if ( invoker.slavedown ) A_Overlay(2,"LeftDeselect");
|
else if ( invoker.slavedown ) player.SetPSprite(2,ResolveState("LeftDeselect"));
|
||||||
else if ( invoker.slavespin ) A_Overlay(2,"LeftZoom");
|
else if ( invoker.slavespin ) player.SetPSprite(2,ResolveState("LeftZoom"));
|
||||||
else A_LeftWeaponReady();
|
else A_LeftWeaponReady();
|
||||||
}
|
}
|
||||||
Wait;
|
Wait;
|
||||||
|
|
@ -457,41 +474,57 @@ Class Automag : UnrealWeapon
|
||||||
Reload:
|
Reload:
|
||||||
AUTR A 0
|
AUTR A 0
|
||||||
{
|
{
|
||||||
invoker.slavereload = ((player.cmd.buttons&BT_RELOAD)&&invoker.slaveactive&&(invoker.slaveclipcount < min(20,invoker.Ammo1.Amount)))||(invoker.slaveclipcount <= 0);
|
if ( invoker.clipcount>=min(invoker.default.clipcount,invoker.Ammo1.Amount) )
|
||||||
return A_JumpIf(invoker.clipcount>=min(20,invoker.Ammo1.Amount),"Idle");
|
{
|
||||||
|
invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)))||(invoker.slaveclipcount <= 0);
|
||||||
|
return ResolveState("Idle");
|
||||||
|
}
|
||||||
|
return ResolveState(null);
|
||||||
}
|
}
|
||||||
AUTR A 0
|
AUTR A 0
|
||||||
{
|
{
|
||||||
invoker.clipcount = Min(20,invoker.Ammo1.Amount);
|
invoker.special1 = min(invoker.default.clipcount,invoker.Ammo1.Amount)-invoker.clipcount;
|
||||||
|
invoker.clipcount = -1;
|
||||||
A_Overlay(-9999,null);
|
A_Overlay(-9999,null);
|
||||||
A_WeaponOffset(0,32); // fix sudden psprite lowering
|
|
||||||
A_PlaySound("automag/click",CHAN_WEAPON,!Dampener.Active(self)?1.:.1);
|
A_PlaySound("automag/click",CHAN_WEAPON,!Dampener.Active(self)?1.:.1);
|
||||||
}
|
}
|
||||||
AUTR ABCDEFGHIJKLMNOPQRSTUVWXY 1;
|
AUTR ABCDEFGHIJKLMNOPQRSTUVWXY 1;
|
||||||
AUTD ABCD 1;
|
AUTD ABCD 1;
|
||||||
AUTD E 30
|
AUTD E 30
|
||||||
{
|
{
|
||||||
|
invoker.clipcount = Min(invoker.default.clipcount,invoker.Ammo1.Amount);
|
||||||
|
invoker.Ammo1.Amount -= invoker.special1;
|
||||||
A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1);
|
A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1);
|
||||||
if ( self is 'UTPlayer' )
|
if ( self is 'UTPlayer' )
|
||||||
UTPlayer(self).PlayReloading();
|
UTPlayer(self).PlayReloading();
|
||||||
|
invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)))||(invoker.slaveclipcount <= 0);
|
||||||
}
|
}
|
||||||
AUTS A 0 A_PlaySound("automag/select",CHAN_WEAPON,!Dampener.Active(self)?1.:.1);
|
AUTS A 0 A_PlaySound("automag/select",CHAN_WEAPON,!Dampener.Active(self)?1.:.1);
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
LeftReload:
|
LeftReload:
|
||||||
2UTR A 0
|
2UTR A 0
|
||||||
{
|
{
|
||||||
invoker.slaveclipcount = Min(20,invoker.Ammo1.Amount);
|
if ( invoker.slaveclipcount>=min(invoker.default.slaveclipcount,invoker.Ammo1.Amount) )
|
||||||
invoker.slavereload = false;
|
{
|
||||||
|
invoker.slavereload = 0;
|
||||||
|
return ResolveState("LeftIdle");
|
||||||
|
}
|
||||||
|
invoker.special2 = min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)-invoker.slaveclipcount;
|
||||||
|
invoker.slaveclipcount = -1;
|
||||||
A_Overlay(-9998,null);
|
A_Overlay(-9998,null);
|
||||||
A_PlaySound("automag/click",CHAN_6,!Dampener.Active(self)?1.:.1);
|
A_PlaySound("automag/click",CHAN_6,!Dampener.Active(self)?1.:.1);
|
||||||
|
return ResolveState(null);
|
||||||
}
|
}
|
||||||
2UTR ABCDEFGHIJKLMNOPQRSTUVWXY 1;
|
2UTR ABCDEFGHIJKLMNOPQRSTUVWXY 1;
|
||||||
2UTD ABCD 1;
|
2UTD ABCD 1;
|
||||||
2UTD E 30
|
2UTD E 30
|
||||||
{
|
{
|
||||||
|
invoker.slaveclipcount = Min(invoker.default.slaveclipcount,invoker.Ammo1.Amount);
|
||||||
|
invoker.Ammo1.Amount -= invoker.special2;
|
||||||
A_PlaySound("automag/reload",CHAN_6,!Dampener.Active(self)?1.:.1);
|
A_PlaySound("automag/reload",CHAN_6,!Dampener.Active(self)?1.:.1);
|
||||||
if ( self is 'UTPlayer' )
|
if ( self is 'UTPlayer' )
|
||||||
UTPlayer(self).PlayReloading();
|
UTPlayer(self).PlayReloading();
|
||||||
|
invoker.slavereload = false;
|
||||||
}
|
}
|
||||||
2UTS A 0 A_PlaySound("automag/select",CHAN_6,!Dampener.Active(self)?1.:.1);
|
2UTS A 0 A_PlaySound("automag/select",CHAN_6,!Dampener.Active(self)?1.:.1);
|
||||||
Goto LeftReady;
|
Goto LeftReady;
|
||||||
|
|
@ -530,11 +563,17 @@ Class Automag : UnrealWeapon
|
||||||
2UT3 C 0;
|
2UT3 C 0;
|
||||||
Goto LeftZoomLoop;
|
Goto LeftZoomLoop;
|
||||||
Deselect:
|
Deselect:
|
||||||
AUTI A 1 { invoker.slavedown = true; }
|
AUTD A 0
|
||||||
AUTD A 0 A_Overlay(-9999,null);
|
{
|
||||||
AUTD A 0 A_JumpIf(invoker.slaveactive,"Deselect");
|
A_Overlay(-9999,null);
|
||||||
|
invoker.slavedown = true;
|
||||||
|
}
|
||||||
AUTD ABCD 1;
|
AUTD ABCD 1;
|
||||||
AUTD E 1 A_Lower(int.max);
|
AUTD E 1
|
||||||
|
{
|
||||||
|
if ( !player.FindPSprite(2) )
|
||||||
|
A_Lower(int.max);
|
||||||
|
}
|
||||||
Wait;
|
Wait;
|
||||||
LeftDeselect:
|
LeftDeselect:
|
||||||
2UTD A 0
|
2UTD A 0
|
||||||
|
|
|
||||||
|
|
@ -446,7 +446,7 @@ Class Betamag : UnrealWeapon
|
||||||
LeftReloadHold:
|
LeftReloadHold:
|
||||||
2UTI A 0
|
2UTI A 0
|
||||||
{
|
{
|
||||||
if ( !(player.cmd.buttons&BT_RELOAD) ) return ResolveState("LeftIdle");
|
if ( !((invoker.Ammo1.Amount<=0) && (player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK))) && !(player.cmd.buttons&BT_RELOAD) ) return ResolveState("LeftIdle");
|
||||||
invoker.slavewhip = false;
|
invoker.slavewhip = false;
|
||||||
A_Overlay(-9998,null);
|
A_Overlay(-9998,null);
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Betamag](0.4,0.5),FRandom[Betamag](0.2,0.3)),4,0,8,SWING_Spring,5);
|
UTMainHandler.DoSwing(self,(FRandom[Betamag](0.4,0.5),FRandom[Betamag](0.2,0.3)),4,0,8,SWING_Spring,5);
|
||||||
|
|
@ -468,7 +468,7 @@ Class Betamag : UnrealWeapon
|
||||||
2UTW N 0 A_BetamagWhip();
|
2UTW N 0 A_BetamagWhip();
|
||||||
2UTW NOPQR 1;
|
2UTW NOPQR 1;
|
||||||
2UTW STUVWXYZ[\ 2;
|
2UTW STUVWXYZ[\ 2;
|
||||||
2UTI A 0 A_JumpIf(player.cmd.buttons&BT_RELOAD,"LeftReloadHold");
|
2UTI A 0 A_JumpIf((invoker.Ammo1.Amount<=0)&&(player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK))||(player.cmd.buttons&BT_RELOAD),"LeftReloadHold");
|
||||||
Goto LeftIdle;
|
Goto LeftIdle;
|
||||||
Zoom:
|
Zoom:
|
||||||
AUTR A 1
|
AUTR A 1
|
||||||
|
|
@ -497,11 +497,17 @@ Class Betamag : UnrealWeapon
|
||||||
2UR2 ABCDEFGHIJK 1;
|
2UR2 ABCDEFGHIJK 1;
|
||||||
Goto LeftIdle;
|
Goto LeftIdle;
|
||||||
Deselect:
|
Deselect:
|
||||||
AUTI A 1 { invoker.slavedown = true; }
|
AUTD A 0
|
||||||
AUTD A 0 A_Overlay(-9999,null);
|
{
|
||||||
AUTD A 0 A_JumpIf(invoker.slaveactive,"Deselect");
|
A_Overlay(-9999,null);
|
||||||
|
invoker.slavedown = true;
|
||||||
|
}
|
||||||
AUTD ABCDEFG 1;
|
AUTD ABCDEFG 1;
|
||||||
AUTD G 1 A_Lower(int.max);
|
AUTD G 1
|
||||||
|
{
|
||||||
|
if ( !player.FindPSprite(2) )
|
||||||
|
A_Lower(int.max);
|
||||||
|
}
|
||||||
Wait;
|
Wait;
|
||||||
LeftDeselect:
|
LeftDeselect:
|
||||||
2UTD A 0
|
2UTD A 0
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,10 @@ Class DispersionPistol : UnrealWeapon
|
||||||
bool bCharging;
|
bool bCharging;
|
||||||
int MainUse, ChargeUse;
|
int MainUse, ChargeUse;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return bCharging?min(5,int(chargesize+0.1)):-1, -1, false, false;
|
||||||
|
}
|
||||||
override void Tick()
|
override void Tick()
|
||||||
{
|
{
|
||||||
Super.Tick();
|
Super.Tick();
|
||||||
|
|
@ -714,15 +718,15 @@ Class DispersionPistol : UnrealWeapon
|
||||||
{
|
{
|
||||||
A_CheckReload();
|
A_CheckReload();
|
||||||
let weap = Weapon(invoker);
|
let weap = Weapon(invoker);
|
||||||
if ( weap && weap.Ammo1.Amount > 0 ) A_WeaponReady();
|
if ( invoker.pendingupgrade > invoker.upgradelevel )
|
||||||
|
player.SetPSprite(PSP_WEAPON,ResolveState("Upgrade"));
|
||||||
|
else if ( weap && weap.Ammo1.Amount > 0 ) A_WeaponReady();
|
||||||
else A_WeaponReady(WRF_NOFIRE);
|
else A_WeaponReady(WRF_NOFIRE);
|
||||||
}
|
}
|
||||||
Wait;
|
Wait;
|
||||||
Idle:
|
Idle:
|
||||||
#### # 0
|
#### # 0
|
||||||
{
|
{
|
||||||
if ( invoker.pendingupgrade > invoker.upgradelevel )
|
|
||||||
return ResolveState("Upgrade");
|
|
||||||
A_Overlay(-9999,"Dummy");
|
A_Overlay(-9999,"Dummy");
|
||||||
if ( invoker.upgradelevel == 0 ) return ResolveState("Idle1");
|
if ( invoker.upgradelevel == 0 ) return ResolveState("Idle1");
|
||||||
else if ( invoker.upgradelevel == 1 ) return ResolveState("Idle2");
|
else if ( invoker.upgradelevel == 1 ) return ResolveState("Idle2");
|
||||||
|
|
@ -851,22 +855,22 @@ Class DispersionPistol : UnrealWeapon
|
||||||
Upgrade1:
|
Upgrade1:
|
||||||
#### # 0 A_PlaySound("dpistol/up1",CHAN_6,Dampener.Active(self)?.2:1.);
|
#### # 0 A_PlaySound("dpistol/up1",CHAN_6,Dampener.Active(self)?.2:1.);
|
||||||
DPU1 ABCD 9;
|
DPU1 ABCD 9;
|
||||||
DPI2 A 4;
|
DPI2 A 4 A_JumpIf(invoker.pendingupgrade>invoker.upgradelevel,"Upgrade");
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
Upgrade2:
|
Upgrade2:
|
||||||
#### # 0 A_PlaySound("dpistol/up2",CHAN_6,Dampener.Active(self)?.2:1.);
|
#### # 0 A_PlaySound("dpistol/up2",CHAN_6,Dampener.Active(self)?.2:1.);
|
||||||
DPU2 ABCDEFGHI 9;
|
DPU2 ABCDEFGHI 9;
|
||||||
DPI3 A 4;
|
DPI3 A 4 A_JumpIf(invoker.pendingupgrade>invoker.upgradelevel,"Upgrade");
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
Upgrade3:
|
Upgrade3:
|
||||||
#### # 0 A_PlaySound("dpistol/up3",CHAN_6,Dampener.Active(self)?.2:1.);
|
#### # 0 A_PlaySound("dpistol/up3",CHAN_6,Dampener.Active(self)?.2:1.);
|
||||||
DPU3 ABCDEFGHI 9;
|
DPU3 ABCDEFGHI 9;
|
||||||
DPI4 A 4;
|
DPI4 A 4 A_JumpIf(invoker.pendingupgrade>invoker.upgradelevel,"Upgrade");
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
Upgrade4:
|
Upgrade4:
|
||||||
#### # 0 A_PlaySound("dpistol/up4",CHAN_6,Dampener.Active(self)?.2:1.);
|
#### # 0 A_PlaySound("dpistol/up4",CHAN_6,Dampener.Active(self)?.2:1.);
|
||||||
DPU4 ABCDEFGHI 9;
|
DPU4 ABCDEFGHI 9;
|
||||||
DPI5 A 4;
|
DPI5 A 4 A_JumpIf(invoker.pendingupgrade>invoker.upgradelevel,"Upgrade");
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
Select:
|
Select:
|
||||||
DPS1 A 1 A_Raise(int.max);
|
DPS1 A 1 A_Raise(int.max);
|
||||||
|
|
|
||||||
|
|
@ -31,28 +31,49 @@ Class ImpalerAmmo2 : ImpalerAmmo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Class ImpalerCharge : Ammo
|
|
||||||
{
|
|
||||||
Default
|
|
||||||
{
|
|
||||||
Inventory.Amount 100;
|
|
||||||
Inventory.MaxAmount 100;
|
|
||||||
Ammo.BackpackAmount 0;
|
|
||||||
Ammo.BackpackMaxAmount 100;
|
|
||||||
+INVENTORY.IGNORESKILL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Class Impaler : UnrealWeapon
|
Class Impaler : UnrealWeapon
|
||||||
{
|
{
|
||||||
|
int ClipCount;
|
||||||
bool HasGem;
|
bool HasGem;
|
||||||
|
Actor beam;
|
||||||
|
|
||||||
|
property ClipCount : ClipCount;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return ClipCount, -1, (ClipCount<10), false;
|
||||||
|
}
|
||||||
|
action void A_ImpalerFire()
|
||||||
|
{
|
||||||
|
A_Overlay(-9999,"Null");
|
||||||
|
A_Overlay(-3,"Null");
|
||||||
|
A_Overlay(-2,"Null");
|
||||||
|
A_PlaySound("impaler/fire",CHAN_WEAPON);
|
||||||
|
invoker.HasGem = false;
|
||||||
|
invoker.ClipCount = -1;
|
||||||
|
}
|
||||||
|
action void A_StartBeam()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
action void A_DrainAmmo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
action void A_StopBeam()
|
||||||
|
{
|
||||||
|
}
|
||||||
override void DoEffect()
|
override void DoEffect()
|
||||||
{
|
{
|
||||||
Super.DoEffect();
|
Super.DoEffect();
|
||||||
if ( Owner.player.ReadyWeapon != self ) return;
|
if ( Owner.player.ReadyWeapon != self ) return;
|
||||||
|
if ( (Owner.waterlevel > 2) && !(level.maptime%5) )
|
||||||
|
ClipCount = max(0,ClipCount-1);
|
||||||
let psp = Owner.player.FindPSprite(-2);
|
let psp = Owner.player.FindPSprite(-2);
|
||||||
if ( psp ) psp.alpha = clamp(Ammo2.Amount/double(Ammo2.MaxAmount),0.,1.);
|
if ( psp ) psp.alpha = clamp(ClipCount/double(default.ClipCount),0.,1.);
|
||||||
|
}
|
||||||
|
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
||||||
|
{
|
||||||
|
if ( ClipCount > 0 ) return true;
|
||||||
|
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
|
||||||
}
|
}
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
|
|
@ -64,13 +85,11 @@ Class Impaler : UnrealWeapon
|
||||||
Weapon.SlotPriority 0.9;
|
Weapon.SlotPriority 0.9;
|
||||||
Weapon.AmmoType "ImpalerAmmo";
|
Weapon.AmmoType "ImpalerAmmo";
|
||||||
Weapon.AmmoUse 1;
|
Weapon.AmmoUse 1;
|
||||||
Weapon.AmmoType2 "ImpalerCharge";
|
Weapon.AmmoType2 "ImpalerAmmo";
|
||||||
Weapon.AmmoUse2 1;
|
Weapon.AmmoUse2 1;
|
||||||
Weapon.AmmoGive1 60;
|
Weapon.AmmoGive 6;
|
||||||
Weapon.AmmoGive2 0;
|
UTWeapon.DropAmmo 3;
|
||||||
UTWeapon.DropAmmo 30;
|
Impaler.ClipCount 30;
|
||||||
+WEAPON.AMMO_OPTIONAL;
|
|
||||||
+WEAPON.ALT_AMMO_OPTIONAL;
|
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
@ -84,15 +103,21 @@ Class Impaler : UnrealWeapon
|
||||||
Wait;
|
Wait;
|
||||||
Ready:
|
Ready:
|
||||||
IMPS ABCDEF 3 A_WeaponReady(WRF_NOFIRE);
|
IMPS ABCDEF 3 A_WeaponReady(WRF_NOFIRE);
|
||||||
IMPI A 0 A_JumpIfNoAmmo("Idle");
|
IMPI A 0
|
||||||
Goto Reload;
|
{
|
||||||
|
let weap = Weapon(invoker);
|
||||||
|
if ( (invoker.ClipCount>=0) || (weap.Ammo1.Amount > 0) )
|
||||||
|
return ResolveState("Reload");
|
||||||
|
return ResolveState("Idle");
|
||||||
|
}
|
||||||
|
Goto Idle;
|
||||||
Dummy:
|
Dummy:
|
||||||
TNT1 A 1
|
TNT1 A 1
|
||||||
{
|
{
|
||||||
let weap = Weapon(invoker);
|
let weap = Weapon(invoker);
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
if ( weap.Ammo1.Amount > 0 ) flags |= WRF_ALLOWRELOAD;
|
if ( weap.Ammo1.Amount > 0 ) flags |= WRF_ALLOWRELOAD;
|
||||||
if ( weap.Ammo2.Amount <= 0 ) flags |= WRF_NOSECONDARY;
|
if ( invoker.HasGem && (invoker.ClipCount <= 0) ) flags |= WRF_NOSECONDARY;
|
||||||
A_WeaponReady(flags);
|
A_WeaponReady(flags);
|
||||||
}
|
}
|
||||||
Wait;
|
Wait;
|
||||||
|
|
@ -109,11 +134,7 @@ Class Impaler : UnrealWeapon
|
||||||
{
|
{
|
||||||
if ( !invoker.HasGem )
|
if ( !invoker.HasGem )
|
||||||
return ResolveState("Melee");
|
return ResolveState("Melee");
|
||||||
A_Overlay(-9999,"Null");
|
A_ImpalerFire();
|
||||||
A_Overlay(-3,"Null");
|
|
||||||
A_Overlay(-2,"Null");
|
|
||||||
A_PlaySound("impaler/fire",CHAN_WEAPON);
|
|
||||||
invoker.HasGem = false;
|
|
||||||
return ResolveState(null);
|
return ResolveState(null);
|
||||||
}
|
}
|
||||||
IMPF ABCDEFGHI 2;
|
IMPF ABCDEFGHI 2;
|
||||||
|
|
@ -151,6 +172,12 @@ Class Impaler : UnrealWeapon
|
||||||
invoker.HasGem = !invoker.HasGem;
|
invoker.HasGem = !invoker.HasGem;
|
||||||
if ( invoker.HasGem )
|
if ( invoker.HasGem )
|
||||||
{
|
{
|
||||||
|
let weap = Weapon(invoker);
|
||||||
|
if ( invoker.ClipCount < 0 )
|
||||||
|
{
|
||||||
|
weap.DepleteAmmo(false,true,1);
|
||||||
|
invoker.ClipCount = invoker.default.ClipCount;
|
||||||
|
}
|
||||||
A_Overlay(-3,"GemUp");
|
A_Overlay(-3,"GemUp");
|
||||||
A_Overlay(-2,"ZapUp");
|
A_Overlay(-2,"ZapUp");
|
||||||
A_OverlayFlags(-2,PSPF_RenderStyle|PSPF_Alpha,true);
|
A_OverlayFlags(-2,PSPF_RenderStyle|PSPF_Alpha,true);
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ Class VoiceBox : UnrealInventory
|
||||||
Tag "$T_VOICEBOX";
|
Tag "$T_VOICEBOX";
|
||||||
Inventory.PickupMessage "$I_VOICEBOX";
|
Inventory.PickupMessage "$I_VOICEBOX";
|
||||||
Inventory.Icon "I_VoiceB";
|
Inventory.Icon "I_VoiceB";
|
||||||
Inventory.MaxAmount 3;
|
Inventory.MaxAmount 2;
|
||||||
UnrealInventory.Charge 600;
|
UnrealInventory.Charge 600;
|
||||||
}
|
}
|
||||||
override void DoEffect()
|
override void DoEffect()
|
||||||
|
|
@ -1117,7 +1117,7 @@ Class Forcefield : UnrealInventory
|
||||||
Tag "$T_FORCEFIELD";
|
Tag "$T_FORCEFIELD";
|
||||||
Inventory.PickupMessage "$I_FORCEFIELD";
|
Inventory.PickupMessage "$I_FORCEFIELD";
|
||||||
Inventory.Icon "I_ForceF";
|
Inventory.Icon "I_ForceF";
|
||||||
Inventory.MaxAmount 5;
|
Inventory.MaxAmount 3;
|
||||||
}
|
}
|
||||||
override bool Use( bool pickup )
|
override bool Use( bool pickup )
|
||||||
{
|
{
|
||||||
|
|
@ -2082,8 +2082,8 @@ Class MinigunSentryBase : Actor
|
||||||
Tag "$T_SENTRY";
|
Tag "$T_SENTRY";
|
||||||
Health sentryhealth;
|
Health sentryhealth;
|
||||||
Mass int.max;
|
Mass int.max;
|
||||||
Radius 12;
|
Radius 8;
|
||||||
Height 48;
|
Height 46;
|
||||||
+SOLID;
|
+SOLID;
|
||||||
+SHOOTABLE;
|
+SHOOTABLE;
|
||||||
+NOBLOOD;
|
+NOBLOOD;
|
||||||
|
|
@ -2245,7 +2245,7 @@ Class SentryGunItem : UnrealInventory
|
||||||
{
|
{
|
||||||
Tag "$T_OSENTRY";
|
Tag "$T_OSENTRY";
|
||||||
Inventory.Icon "I_OSntry";
|
Inventory.Icon "I_OSntry";
|
||||||
Inventory.MaxAmount 3;
|
Inventory.MaxAmount 2;
|
||||||
Inventory.PickupMessage "$I_OSENTRY";
|
Inventory.PickupMessage "$I_OSENTRY";
|
||||||
Inventory.RespawnTics 1050;
|
Inventory.RespawnTics 1050;
|
||||||
}
|
}
|
||||||
|
|
@ -2363,8 +2363,8 @@ Class SentryGun : Actor
|
||||||
Tag "$T_OSENTRY";
|
Tag "$T_OSENTRY";
|
||||||
Health 50;
|
Health 50;
|
||||||
Mass int.max;
|
Mass int.max;
|
||||||
Radius 10;
|
Radius 6;
|
||||||
Height 24;
|
Height 18;
|
||||||
+SOLID;
|
+SOLID;
|
||||||
+SHOOTABLE;
|
+SHOOTABLE;
|
||||||
+NOBLOOD;
|
+NOBLOOD;
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@ Class OLSMP : UnrealWeapon
|
||||||
|
|
||||||
property ClipCount : ClipCount;
|
property ClipCount : ClipCount;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return ClipCount, -1, (ClipCount<35), false;
|
||||||
|
}
|
||||||
override void PlayUpSound( Actor origin )
|
override void PlayUpSound( Actor origin )
|
||||||
{
|
{
|
||||||
origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.,pitch:0.8);
|
origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.,pitch:0.8);
|
||||||
|
|
@ -119,7 +123,7 @@ Class OLSMP : UnrealWeapon
|
||||||
if ( !weap || !player ) return;
|
if ( !weap || !player ) return;
|
||||||
if ( invoker.altaccuracy < 0.2 ) invoker.altaccuracy += 0.01;
|
if ( invoker.altaccuracy < 0.2 ) invoker.altaccuracy += 0.01;
|
||||||
if ( invoker.clipcount < 35 ) A_PlaySound("automag/click",CHAN_ITEM,!Dampener.Active(self)?1.:.35,pitch:1.6);
|
if ( invoker.clipcount < 35 ) A_PlaySound("automag/click",CHAN_ITEM,!Dampener.Active(self)?1.:.35,pitch:1.6);
|
||||||
if ( (invoker.clipcount <= 0) || (weap.Ammo1.Amount <= 0) )
|
if ( invoker.clipcount <= 0 )
|
||||||
{
|
{
|
||||||
A_ClearRefire();
|
A_ClearRefire();
|
||||||
return;
|
return;
|
||||||
|
|
@ -130,8 +134,7 @@ Class OLSMP : UnrealWeapon
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
if ( !weap ) return;
|
if ( !weap ) return;
|
||||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
if ( invoker.clipcount <= 0 ) return;
|
||||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
|
||||||
invoker.clipcount--;
|
invoker.clipcount--;
|
||||||
invoker.FireEffect();
|
invoker.FireEffect();
|
||||||
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
|
||||||
|
|
@ -214,6 +217,11 @@ Class OLSMP : UnrealWeapon
|
||||||
let c = Spawn("UCasing",origin);
|
let c = Spawn("UCasing",origin);
|
||||||
c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](2,3);
|
c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](2,3);
|
||||||
}
|
}
|
||||||
|
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
||||||
|
{
|
||||||
|
if ( ClipCount > 0 ) return true;
|
||||||
|
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
|
||||||
|
}
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
Tag "$T_OLSMP";
|
Tag "$T_OLSMP";
|
||||||
|
|
@ -254,6 +262,7 @@ Class OLSMP : UnrealWeapon
|
||||||
Dummy:
|
Dummy:
|
||||||
TNT1 A 1
|
TNT1 A 1
|
||||||
{
|
{
|
||||||
|
A_CheckReload();
|
||||||
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) A_Overlay(PSP_WEAPON,"Reload");
|
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) A_Overlay(PSP_WEAPON,"Reload");
|
||||||
else if ( invoker.clipcount < min(invoker.default.clipcount,invoker.Ammo1.Amount) ) A_WeaponReady(WRF_ALLOWRELOAD);
|
else if ( invoker.clipcount < min(invoker.default.clipcount,invoker.Ammo1.Amount) ) A_WeaponReady(WRF_ALLOWRELOAD);
|
||||||
else A_WeaponReady();
|
else A_WeaponReady();
|
||||||
|
|
@ -318,7 +327,8 @@ Class OLSMP : UnrealWeapon
|
||||||
AUTR A 0 A_JumpIf(invoker.clipcount>=min(invoker.default.clipcount,invoker.Ammo1.Amount),"Idle");
|
AUTR A 0 A_JumpIf(invoker.clipcount>=min(invoker.default.clipcount,invoker.Ammo1.Amount),"Idle");
|
||||||
AUTR A 0
|
AUTR A 0
|
||||||
{
|
{
|
||||||
invoker.clipcount = Min(invoker.default.clipcount,invoker.Ammo1.Amount);
|
invoker.special1 = min(invoker.default.clipcount,invoker.Ammo1.Amount)-invoker.clipcount;
|
||||||
|
invoker.clipcount = -1;
|
||||||
A_Overlay(-9999,null);
|
A_Overlay(-9999,null);
|
||||||
A_WeaponOffset(0,32); // fix sudden psprite lowering
|
A_WeaponOffset(0,32); // fix sudden psprite lowering
|
||||||
A_PlaySound("automag/click",CHAN_WEAPON,!Dampener.Active(self)?1.:.1,pitch:0.8);
|
A_PlaySound("automag/click",CHAN_WEAPON,!Dampener.Active(self)?1.:.1,pitch:0.8);
|
||||||
|
|
@ -327,6 +337,9 @@ Class OLSMP : UnrealWeapon
|
||||||
AUTD ABCD 1;
|
AUTD ABCD 1;
|
||||||
AUTD E 30
|
AUTD E 30
|
||||||
{
|
{
|
||||||
|
|
||||||
|
invoker.clipcount = Min(invoker.default.clipcount,invoker.Ammo1.Amount);
|
||||||
|
invoker.Ammo1.Amount -= invoker.special1;
|
||||||
A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1,pitch:0.8);
|
A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1,pitch:0.8);
|
||||||
if ( self is 'UTPlayer' )
|
if ( self is 'UTPlayer' )
|
||||||
UTPlayer(self).PlayReloading();
|
UTPlayer(self).PlayReloading();
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,16 @@ Class QuadshotTracer : LineTracer
|
||||||
|
|
||||||
Class QuadShot : UnrealWeapon
|
Class QuadShot : UnrealWeapon
|
||||||
{
|
{
|
||||||
int clipcount;
|
int ClipCount;
|
||||||
QuadshotTracer t;
|
QuadshotTracer t;
|
||||||
|
|
||||||
|
property ClipCount : ClipCount;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return ClipCount, -1, (ClipCount<2), false;
|
||||||
|
}
|
||||||
|
|
||||||
action void ProcessTraceHit( Linetracer t )
|
action void ProcessTraceHit( Linetracer t )
|
||||||
{
|
{
|
||||||
if ( t.Results.HitType == TRACE_HitActor )
|
if ( t.Results.HitType == TRACE_HitActor )
|
||||||
|
|
@ -135,8 +142,8 @@ Class QuadShot : UnrealWeapon
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
if ( !weap ) return;
|
if ( !weap ) return;
|
||||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
if ( invoker.clipcount <= 0 ) return;
|
||||||
if ( bAlt && (invoker.clipcount > 2) )
|
if ( bAlt && (invoker.clipcount <= 1) )
|
||||||
{
|
{
|
||||||
// fall back to normal fire strength
|
// fall back to normal fire strength
|
||||||
player.SetPSprite(PSP_WEAPON,invoker.FindState("Fire"));
|
player.SetPSprite(PSP_WEAPON,invoker.FindState("Fire"));
|
||||||
|
|
@ -152,14 +159,14 @@ Class QuadShot : UnrealWeapon
|
||||||
if ( bAlt )
|
if ( bAlt )
|
||||||
{
|
{
|
||||||
A_QuakeEx(1,1,1,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
A_QuakeEx(1,1,1,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
||||||
A_PlaySound("quadshot/alt",CHAN_WEAPON,!Dampener.Active(self)?1.:.2);
|
double blend = invoker.clipcount/4.;
|
||||||
A_PlaySound("quadshot/alt",CHAN_7,!Dampener.Active(self)?1.:.2);
|
A_PlaySound("quadshot/alt",CHAN_WEAPON,(!Dampener.Active(self)?1.:.2)*blend);
|
||||||
double spread = (4-invoker.clipcount);
|
A_PlaySound("quadshot/fire",CHAN_7,(!Dampener.Active(self)?1.:.2)*(1.-blend));
|
||||||
for ( int i=invoker.clipcount; i<4; i++ )
|
double spread = invoker.clipcount;
|
||||||
|
for ( int i=0; i<invoker.clipcount; i++ )
|
||||||
{
|
{
|
||||||
for ( int i=0; i<3; i++ )
|
for ( int i=0; i<3; i++ )
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Quadshot](-0.04,-0.2),FRandom[Quadshot](-0.2,0.2)),FRandom[Quadshot](2,4),FRandom[Quadshot](-0.2,0.5),Random[Quadshot](3,4),SWING_Spring,Random[Quadshot](1,6),FRandom[Quadshot](0.8,1.4));
|
UTMainHandler.DoSwing(self,(FRandom[Quadshot](-0.04,-0.2),FRandom[Quadshot](-0.2,0.2)),FRandom[Quadshot](2,4),FRandom[Quadshot](-0.2,0.5),Random[Quadshot](3,4),SWING_Spring,Random[Quadshot](1,6),FRandom[Quadshot](0.8,1.4));
|
||||||
weap.DepleteAmmo(weap.bAltFire,true,1);
|
|
||||||
for ( int i=0; i<10; i++ )
|
for ( int i=0; i<10; i++ )
|
||||||
{
|
{
|
||||||
a = FRandom[Quadshot](0,360);
|
a = FRandom[Quadshot](0,360);
|
||||||
|
|
@ -172,16 +179,14 @@ Class QuadShot : UnrealWeapon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vel += (0,0,(0.3+0.3*spread))-x*(1.5+1.1*spread);
|
vel += (0,0,(0.3+0.3*spread))-x*(1.5+1.1*spread);
|
||||||
invoker.clipcount = 4;
|
invoker.clipcount = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
||||||
A_PlaySound("quadshot/fire",CHAN_WEAPON,!Dampener.Active(self)?1.:.2);
|
A_PlaySound("quadshot/fire",CHAN_WEAPON,!Dampener.Active(self)?1.:.2);
|
||||||
A_PlaySound("quadshot/fire",CHAN_7,!Dampener.Active(self)?1.:.2);
|
|
||||||
for ( int i=0; i<3; i++ )
|
for ( int i=0; i<3; i++ )
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Quadshot](-0.04,-0.2),FRandom[Quadshot](-0.2,0.2)),FRandom[Quadshot](2,3),FRandom[Quadshot](-0.2,0.5),Random[Quadshot](2,3),SWING_Spring,Random[Quadshot](0,3),FRandom[Quadshot](0.8,1.4));
|
UTMainHandler.DoSwing(self,(FRandom[Quadshot](-0.04,-0.2),FRandom[Quadshot](-0.2,0.2)),FRandom[Quadshot](2,3),FRandom[Quadshot](-0.2,0.5),Random[Quadshot](2,3),SWING_Spring,Random[Quadshot](0,3),FRandom[Quadshot](0.8,1.4));
|
||||||
weap.DepleteAmmo(weap.bAltFire,true,1);
|
|
||||||
for ( int i=0; i<10; i++ )
|
for ( int i=0; i<10; i++ )
|
||||||
{
|
{
|
||||||
a = FRandom[Quadshot](0,360);
|
a = FRandom[Quadshot](0,360);
|
||||||
|
|
@ -193,7 +198,7 @@ Class QuadShot : UnrealWeapon
|
||||||
ProcessTraceHit(invoker.t);
|
ProcessTraceHit(invoker.t);
|
||||||
}
|
}
|
||||||
vel += (0,0,0.3)-x*1.5;
|
vel += (0,0,0.3)-x*1.5;
|
||||||
invoker.clipcount++;
|
invoker.clipcount--;
|
||||||
}
|
}
|
||||||
if ( bAlt ) A_Overlay(-2,"MuzzleFlashAlt");
|
if ( bAlt ) A_Overlay(-2,"MuzzleFlashAlt");
|
||||||
else A_Overlay(-2,"MuzzleFlash");
|
else A_Overlay(-2,"MuzzleFlash");
|
||||||
|
|
@ -218,7 +223,7 @@ Class QuadShot : UnrealWeapon
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-x*4-y*8-z*8);
|
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-x*4-y*8-z*8);
|
||||||
for ( int i=0; i<4; i++ )
|
for ( int i=0; i<(4-invoker.clipcount); i++ )
|
||||||
{
|
{
|
||||||
let c = Spawn("QCasing",origin);
|
let c = Spawn("QCasing",origin);
|
||||||
c.vel = x*FRandom[Junk](-1.5,0.25)-y*FRandom[Junk](1,4)-z*FRandom[Junk](1,4);
|
c.vel = x*FRandom[Junk](-1.5,0.25)-y*FRandom[Junk](1,4)-z*FRandom[Junk](1,4);
|
||||||
|
|
@ -227,7 +232,7 @@ Class QuadShot : UnrealWeapon
|
||||||
action bool A_QuadshotCheckForReload( bool bDryFire = false )
|
action bool A_QuadshotCheckForReload( bool bDryFire = false )
|
||||||
{
|
{
|
||||||
let weap = Weapon(invoker);
|
let weap = Weapon(invoker);
|
||||||
if ( invoker.clipcount > 3 )
|
if ( invoker.clipcount <= 0 )
|
||||||
{
|
{
|
||||||
if ( weap.Ammo1.Amount > 0 )
|
if ( weap.Ammo1.Amount > 0 )
|
||||||
{
|
{
|
||||||
|
|
@ -242,6 +247,11 @@ Class QuadShot : UnrealWeapon
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
||||||
|
{
|
||||||
|
if ( ClipCount > 0 ) return true;
|
||||||
|
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
|
||||||
|
}
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
Tag "$T_QUADSHOT";
|
Tag "$T_QUADSHOT";
|
||||||
|
|
@ -257,6 +267,7 @@ Class QuadShot : UnrealWeapon
|
||||||
Weapon.AmmoGive 20;
|
Weapon.AmmoGive 20;
|
||||||
Weapon.Kickback 320;
|
Weapon.Kickback 320;
|
||||||
UTWeapon.DropAmmo 10;
|
UTWeapon.DropAmmo 10;
|
||||||
|
QuadShot.ClipCount 4;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
@ -278,7 +289,7 @@ Class QuadShot : UnrealWeapon
|
||||||
if ( !A_QuadshotCheckForReload() )
|
if ( !A_QuadshotCheckForReload() )
|
||||||
{
|
{
|
||||||
let weap = Weapon(invoker);
|
let weap = Weapon(invoker);
|
||||||
if ( (invoker.clipcount > 0) && (weap.Ammo1.Amount > 4-invoker.clipcount) )
|
if ( invoker.clipcount < min(weap.Ammo1.Amount,invoker.default.clipcount) )
|
||||||
A_WeaponReady(WRF_ALLOWRELOAD);
|
A_WeaponReady(WRF_ALLOWRELOAD);
|
||||||
else A_WeaponReady();
|
else A_WeaponReady();
|
||||||
}
|
}
|
||||||
|
|
@ -347,12 +358,28 @@ Class QuadShot : UnrealWeapon
|
||||||
UTPlayer(self).PlayAttacking3();
|
UTPlayer(self).PlayAttacking3();
|
||||||
}
|
}
|
||||||
QUAR LMNOPQRSTU 1;
|
QUAR LMNOPQRSTU 1;
|
||||||
QUAR V 0 A_DropShells();
|
QUAR V 0
|
||||||
|
{
|
||||||
|
A_DropShells();
|
||||||
|
let weap = Weapon(invoker);
|
||||||
|
invoker.special1 = min(weap.Ammo1.Amount,invoker.default.clipcount);
|
||||||
|
invoker.special2 = invoker.special1-invoker.clipcount;
|
||||||
|
invoker.clipcount = -1;
|
||||||
|
}
|
||||||
QUAR VWXYZ[\] 1;
|
QUAR VWXYZ[\] 1;
|
||||||
QUR2 ABCDEFGHIJKLMNOPQR 1;
|
QUR2 ABCDEFGHIJKLMNOPQR 1;
|
||||||
QUR2 S 0
|
QUR2 S 0
|
||||||
{
|
{
|
||||||
A_PlaySound("quadshot/load",CHAN_6,Dampener.Active(self)?.1:1.);
|
A_PlaySound("quadshot/load",CHAN_6,Dampener.Active(self)?.1:1.);
|
||||||
|
let weap = Weapon(invoker);
|
||||||
|
invoker.clipcount = 0;
|
||||||
|
if ( invoker.special1 > 0 )
|
||||||
|
{
|
||||||
|
weap.Ammo1.Amount -= min(2,invoker.special2);
|
||||||
|
invoker.clipcount += min(2,invoker.special1);
|
||||||
|
invoker.special1 = max(0,invoker.special1-2);
|
||||||
|
invoker.special2 = max(0,invoker.special2-2);
|
||||||
|
}
|
||||||
if ( self is 'UTPlayer' )
|
if ( self is 'UTPlayer' )
|
||||||
UTPlayer(self).PlayReloading();
|
UTPlayer(self).PlayReloading();
|
||||||
}
|
}
|
||||||
|
|
@ -361,6 +388,14 @@ Class QuadShot : UnrealWeapon
|
||||||
QUR3 P 0
|
QUR3 P 0
|
||||||
{
|
{
|
||||||
A_PlaySound("quadshot/load",CHAN_6,Dampener.Active(self)?.1:1.);
|
A_PlaySound("quadshot/load",CHAN_6,Dampener.Active(self)?.1:1.);
|
||||||
|
let weap = Weapon(invoker);
|
||||||
|
if ( invoker.special1 > 0 )
|
||||||
|
{
|
||||||
|
weap.Ammo1.Amount -= min(2,invoker.special2);
|
||||||
|
invoker.clipcount += min(2,invoker.special1);
|
||||||
|
invoker.special1 = max(0,invoker.special1-2);
|
||||||
|
invoker.special2 = max(0,invoker.special2-2);
|
||||||
|
}
|
||||||
if ( self is 'UTPlayer' )
|
if ( self is 'UTPlayer' )
|
||||||
UTPlayer(self).PlayReloading();
|
UTPlayer(self).PlayReloading();
|
||||||
}
|
}
|
||||||
|
|
@ -372,11 +407,6 @@ Class QuadShot : UnrealWeapon
|
||||||
if ( self is 'UTPlayer' ) UTPlayer(self).PlayAttacking3();
|
if ( self is 'UTPlayer' ) UTPlayer(self).PlayAttacking3();
|
||||||
}
|
}
|
||||||
QUR4 FGHIJKLMNOPQ 1;
|
QUR4 FGHIJKLMNOPQ 1;
|
||||||
QUAI A 0
|
|
||||||
{
|
|
||||||
let weap = Weapon(invoker);
|
|
||||||
invoker.clipcount = max(0,4-weap.Ammo1.Amount);
|
|
||||||
}
|
|
||||||
Goto Idle;
|
Goto Idle;
|
||||||
Deselect:
|
Deselect:
|
||||||
#### # 1 A_Overlay(-9999,"Null");
|
#### # 1 A_Overlay(-9999,"Null");
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@ Class Stunner : UnrealWeapon
|
||||||
double chargesize, count;
|
double chargesize, count;
|
||||||
bool bCharging;
|
bool bCharging;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return bCharging?min(6,int(chargesize)):-1, -1, false, false;
|
||||||
|
}
|
||||||
action void A_StunnerFire()
|
action void A_StunnerFire()
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
|
|
|
||||||
|
|
@ -579,6 +579,10 @@ Class UBioRifle : UnrealWeapon
|
||||||
double chargesize, count;
|
double chargesize, count;
|
||||||
bool bCharging;
|
bool bCharging;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return bCharging?min(5,int(chargesize+0.1)):-1, -1, false, false;
|
||||||
|
}
|
||||||
action void A_BioFire( bool bAlt = false )
|
action void A_BioFire( bool bAlt = false )
|
||||||
{
|
{
|
||||||
Weapon weap = Weapon(invoker);
|
Weapon weap = Weapon(invoker);
|
||||||
|
|
@ -588,6 +592,7 @@ Class UBioRifle : UnrealWeapon
|
||||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
if ( weap.Ammo1.Amount <= 0 ) return;
|
||||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
||||||
}
|
}
|
||||||
|
invoker.bCharging = false;
|
||||||
invoker.chargesize = min(invoker.chargesize,4.9);
|
invoker.chargesize = min(invoker.chargesize,4.9);
|
||||||
if ( bAlt ) A_PlaySound("ges/fire",CHAN_WEAPON,Dampener.Active(self)?.17:1.,pitch:max(.5,1.35-invoker.chargesize/8.));
|
if ( bAlt ) A_PlaySound("ges/fire",CHAN_WEAPON,Dampener.Active(self)?.17:1.,pitch:max(.5,1.35-invoker.chargesize/8.));
|
||||||
else A_PlaySound("ges/fire",CHAN_WEAPON,Dampener.Active(self)?.17:1.);
|
else A_PlaySound("ges/fire",CHAN_WEAPON,Dampener.Active(self)?.17:1.);
|
||||||
|
|
@ -642,10 +647,7 @@ Class UBioRifle : UnrealWeapon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !(player.cmd.buttons&BT_ALTATTACK) )
|
if ( !(player.cmd.buttons&BT_ALTATTACK) )
|
||||||
{
|
|
||||||
invoker.bCharging = false;
|
|
||||||
player.SetPSPrite(PSP_WEAPON,invoker.FindState("AltRelease"));
|
player.SetPSPrite(PSP_WEAPON,invoker.FindState("AltRelease"));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
action void A_BeginCharge()
|
action void A_BeginCharge()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,10 @@ Class Eightball : UnrealWeapon
|
||||||
int locktics;
|
int locktics;
|
||||||
bool bSingleRocket;
|
bool bSingleRocket;
|
||||||
|
|
||||||
|
override int, int, bool, bool GetClipAmount()
|
||||||
|
{
|
||||||
|
return special1?special1:-1, -1, false, false;
|
||||||
|
}
|
||||||
override void PostBeginPlay()
|
override void PostBeginPlay()
|
||||||
{
|
{
|
||||||
Super.PostBeginPlay();
|
Super.PostBeginPlay();
|
||||||
|
|
|
||||||
|
|
@ -761,6 +761,11 @@ Class UnrealWeapon : UTWeapon
|
||||||
{
|
{
|
||||||
origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.);
|
origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.);
|
||||||
}
|
}
|
||||||
|
// For clips
|
||||||
|
virtual clearscope int, int, bool, bool GetClipAmount() const
|
||||||
|
{
|
||||||
|
return -1, -1, false, false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Class UnrealStaticHandler : StaticEventHandler
|
Class UnrealStaticHandler : StaticEventHandler
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ Class UnrealHUD : BaseStatusBar
|
||||||
String OldArmor[6];
|
String OldArmor[6];
|
||||||
Class<Inventory> OldArmorType[6];
|
Class<Inventory> OldArmorType[6];
|
||||||
String OldKeys[7];
|
String OldKeys[7];
|
||||||
HUDFont mOldDigits;
|
HUDFont mOldDigits, mOldDigitsSmall;
|
||||||
Font OldLargeFont, OldSmallFont;
|
Font OldLargeFont, OldSmallFont;
|
||||||
|
|
||||||
// Translations
|
// Translations
|
||||||
|
|
@ -85,6 +85,7 @@ Class UnrealHUD : BaseStatusBar
|
||||||
KeyIcons[5] = TexMan.CheckForTexture("I_SkullY",TexMan.Type_Any);
|
KeyIcons[5] = TexMan.CheckForTexture("I_SkullY",TexMan.Type_Any);
|
||||||
KeyIcons[6] = TexMan.CheckForTexture("I_KeyG",TexMan.Type_Any);
|
KeyIcons[6] = TexMan.CheckForTexture("I_KeyG",TexMan.Type_Any);
|
||||||
mOldDigits = HUDFont.Create(Font.GetFont('U083Digits'),26,Mono_CellLeft);
|
mOldDigits = HUDFont.Create(Font.GetFont('U083Digits'),26,Mono_CellLeft);
|
||||||
|
mOldDigitsSmall = HUDFont.Create(Font.GetFont('U083DigitsSmall'),13,Mono_CellLeft);
|
||||||
mMapFont = HUDFont.Create(WhiteFont);
|
mMapFont = HUDFont.Create(WhiteFont);
|
||||||
OldLargeFont = Font.GetFont('UOldLargeFont');
|
OldLargeFont = Font.GetFont('UOldLargeFont');
|
||||||
OldSmallFont = Font.GetFont('UOldSmallFont');
|
OldSmallFont = Font.GetFont('UOldSmallFont');
|
||||||
|
|
@ -448,12 +449,26 @@ Class UnrealHUD : BaseStatusBar
|
||||||
if ( !CPlayer.ReadyWeapon || !CPlayer.ReadyWeapon.Ammo1 ) return;
|
if ( !CPlayer.ReadyWeapon || !CPlayer.ReadyWeapon.Ammo1 ) return;
|
||||||
Font cfont = LargeFont;
|
Font cfont = LargeFont;
|
||||||
if ( CPlayer.ReadyWeapon.Ammo1.Amount <= min(9,CPlayer.ReadyWeapon.Ammo1.MaxAmount/3) ) cfont = LargeRedFont;
|
if ( CPlayer.ReadyWeapon.Ammo1.Amount <= min(9,CPlayer.ReadyWeapon.Ammo1.MaxAmount/3) ) cfont = LargeRedFont;
|
||||||
|
int sec = -1, sec2 = -1;
|
||||||
|
bool red = false, red2 = false;
|
||||||
|
if ( CPlayer.ReadyWeapon is 'UnrealWeapon' )
|
||||||
|
[sec, sec2, red, red2] = UnrealWeapon(CPlayer.ReadyWeapon).GetClipAmount();
|
||||||
if ( !HudMode )
|
if ( !HudMode )
|
||||||
{
|
{
|
||||||
CurX -= cfont.StringWidth(String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount))+2;
|
CurX -= cfont.StringWidth(String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount))+2;
|
||||||
Screen.DrawText(cfont,Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
Screen.DrawText(cfont,Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
||||||
|
double bx = CurX;
|
||||||
|
CurX = bx-MedFont.StringWidth(String.Format("%d",sec))-2;
|
||||||
|
CurY += cfont.GetHeight()-MedFont.GetHeight()-4;
|
||||||
|
if ( sec != -1 )
|
||||||
|
Screen.DrawText(MedFont,red?Font.CR_RED:Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",sec),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
||||||
|
CurX = bx-MedFont.StringWidth(String.Format("%d",sec2))-2;
|
||||||
|
CurY -= MedFont.GetHeight()+2;
|
||||||
|
if ( sec2 != -1 )
|
||||||
|
Screen.DrawText(MedFont,red2?Font.CR_RED:Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",sec2),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
||||||
}
|
}
|
||||||
CurX = x;
|
CurX = x;
|
||||||
|
CurY = y;
|
||||||
Screen.DrawTexture(IconBase,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
Screen.DrawTexture(IconBase,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
||||||
TextureID icon = CPlayer.ReadyWeapon.Icon.IsNull()?CPlayer.ReadyWeapon.Ammo1.Icon:CPlayer.ReadyWeapon.Icon;
|
TextureID icon = CPlayer.ReadyWeapon.Icon.IsNull()?CPlayer.ReadyWeapon.Ammo1.Icon:CPlayer.ReadyWeapon.Icon;
|
||||||
// scale to fit
|
// scale to fit
|
||||||
|
|
@ -469,7 +484,16 @@ Class UnrealHUD : BaseStatusBar
|
||||||
CurY = Y+29;
|
CurY = Y+29;
|
||||||
if ( (HudMode != 1) && (HudMode != 2) && (HudMode != 4) )
|
if ( (HudMode != 1) && (HudMode != 2) && (HudMode != 4) )
|
||||||
Screen.DrawTexture(HudLine,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(28.*(CPlayer.ReadyWeapon.Ammo1.Amount/double(CPlayer.ReadyWeapon.Ammo1.MaxAmount)),28.));
|
Screen.DrawTexture(HudLine,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(28.*(CPlayer.ReadyWeapon.Ammo1.Amount/double(CPlayer.ReadyWeapon.Ammo1.MaxAmount)),28.));
|
||||||
// TODO secondary ammo display
|
if ( HudMode )
|
||||||
|
{
|
||||||
|
CurX = (x+30)-TinyFont.StringWidth(String.Format("%d",sec));
|
||||||
|
CurY = y+2;
|
||||||
|
if ( sec != -1 )
|
||||||
|
Screen.DrawText(red?TinyRedFont:TinyFont,Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",sec),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
||||||
|
CurX = x+3;
|
||||||
|
if ( sec2 != -1 )
|
||||||
|
Screen.DrawText(red2?TinyRedFont:TinyFont,Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",sec2),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawHealth( double x, double y )
|
private void DrawHealth( double x, double y )
|
||||||
|
|
@ -660,6 +684,13 @@ Class UnrealHUD : BaseStatusBar
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int sec = -1, sec2 = -1;
|
||||||
|
if ( CPlayer.ReadyWeapon && (CPlayer.ReadyWeapon is 'UnrealWeapon') )
|
||||||
|
[sec, sec2] = UnrealWeapon(CPlayer.ReadyWeapon).GetClipAmount();
|
||||||
|
if ( sec != -1 )
|
||||||
|
DrawString(mOldDigitsSmall,FormatNumber(sec,3),(633,378),DI_TEXT_ALIGN_RIGHT);
|
||||||
|
if ( sec2 != -1 )
|
||||||
|
DrawString(mOldDigitsSmall,FormatNumber(sec2,3),(556,378),DI_TEXT_ALIGN_LEFT);
|
||||||
for ( int i=0; i<6; i++ )
|
for ( int i=0; i<6; i++ )
|
||||||
{
|
{
|
||||||
if ( !CPlayer.mo.CheckKeys(i+1,false,true) ) continue;
|
if ( !CPlayer.mo.CheckKeys(i+1,false,true) ) continue;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Class UInvisibility : UnrealInventory
|
||||||
Inventory.Icon "I_Invis";
|
Inventory.Icon "I_Invis";
|
||||||
Inventory.PickupMessage "$I_INVISIBILITY";
|
Inventory.PickupMessage "$I_INVISIBILITY";
|
||||||
Inventory.RespawnTics 3500;
|
Inventory.RespawnTics 3500;
|
||||||
Inventory.MaxAmount 2;
|
Inventory.MaxAmount 1;
|
||||||
UnrealInventory.Charge 100;
|
UnrealInventory.Charge 100;
|
||||||
}
|
}
|
||||||
override bool Use( bool pickup )
|
override bool Use( bool pickup )
|
||||||
|
|
@ -97,7 +97,7 @@ Class Amplifier : UnrealInventory
|
||||||
Inventory.Icon "I_Amp";
|
Inventory.Icon "I_Amp";
|
||||||
Inventory.PickupMessage "$I_AMPLIFIER";
|
Inventory.PickupMessage "$I_AMPLIFIER";
|
||||||
Inventory.RespawnTics 3150;
|
Inventory.RespawnTics 3150;
|
||||||
Inventory.MaxAmount 2;
|
Inventory.MaxAmount 1;
|
||||||
UnrealInventory.Charge 1000;
|
UnrealInventory.Charge 1000;
|
||||||
}
|
}
|
||||||
static double GetMult( Actor Owner, int val )
|
static double GetMult( Actor Owner, int val )
|
||||||
|
|
@ -194,10 +194,10 @@ Class UJumpBoots : UnrealInventory
|
||||||
+COUNTITEM;
|
+COUNTITEM;
|
||||||
+INVENTORY.BIGPOWERUP;
|
+INVENTORY.BIGPOWERUP;
|
||||||
+INVENTORY.ALWAYSPICKUP;
|
+INVENTORY.ALWAYSPICKUP;
|
||||||
Inventory.MaxAmount 3;
|
|
||||||
Inventory.Icon "I_Boots";
|
Inventory.Icon "I_Boots";
|
||||||
Inventory.PickupMessage "$I_LBOOTS";
|
Inventory.PickupMessage "$I_LBOOTS";
|
||||||
Inventory.RespawnTics 1050;
|
Inventory.RespawnTics 1050;
|
||||||
|
Inventory.MaxAmount 1;
|
||||||
UnrealInventory.Charge 3;
|
UnrealInventory.Charge 3;
|
||||||
}
|
}
|
||||||
override bool Use( bool pickup )
|
override bool Use( bool pickup )
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ Class UTranslocatorModule : Actor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
b = Spawn("ModuleHitbox",pos);
|
b = Spawn("ModuleHitbox",pos);
|
||||||
|
b.A_SetSize(6,6);
|
||||||
b.master = self;
|
b.master = self;
|
||||||
anglevel = FRandom[TeleHand](3,5)*RandomPick[TeleHand](-1,1);
|
anglevel = FRandom[TeleHand](3,5)*RandomPick[TeleHand](-1,1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||