diff --git a/Readme.md b/Readme.md index ff1502b..a62bfa4 100644 --- a/Readme.md +++ b/Readme.md @@ -3,7 +3,7 @@ The Unreal 1 counterpart to Doom Tournament. Adds Unreal 1 weapons and items (including dummied out stuff and others). -This mod requires GZDoom 4.2.3 or later, and runs on top of Doom Tournament. +This mod requires GZDoom 4.2.4 or later, and runs on top of Doom Tournament. ## Currently Implemented @@ -73,7 +73,7 @@ This mod requires GZDoom 4.2.3 or later, and runs on top of Doom Tournament. ## In progress - - N/A, this is the 1.0.4 release. + - Adjustments and fixes. ## Planned diff --git a/graphics/hud083/ammo/Bsaw083.png b/graphics/hud083/ammo/Bsaw083.png new file mode 100644 index 0000000..8af3057 Binary files /dev/null and b/graphics/hud083/ammo/Bsaw083.png differ diff --git a/graphics/icons/I_BSaw.png b/graphics/icons/I_BSaw.png new file mode 100644 index 0000000..195ec37 Binary files /dev/null and b/graphics/icons/I_BSaw.png differ diff --git a/menudef.txt b/menudef.txt index 95dd16d..c5521d5 100644 --- a/menudef.txt +++ b/menudef.txt @@ -57,7 +57,7 @@ OptionMenu "UnrealOptionMenu" Option "$STING_FLAMETSPREAD", "sting_flametspread", "YesNo", "sting_proto" Option "$STING_IMPSELF", "sting_impself", "YesNo", "sting_proto" Option "$STING_ALLSUITS", "sting_allsuits", "YesNo" - Option "$STING_PEACEHOME", "sting_peacehome", "YesNo" + Option "$STING_PEACEHOME", "sting_peacehome", "YesNo", "sting_proto" } AddOptionMenu "OptionsMenu" diff --git a/modeldef.female1 b/modeldef.female1 index 2a0322b..9d177c4 100644 --- a/modeldef.female1 +++ b/modeldef.female1 @@ -251,4 +251,8 @@ Model "UPlayerFemale1" FrameIndex PLT3 M 0 595 FrameIndex PLT3 N 0 596 FrameIndex PLT3 O 0 597 + // Ice Death (first frame of faint) + SurfaceSkin 0 0 "ginaice.png" + SurfaceSkin 0 1 "GunPick1ice.png" + FrameIndex PICE A 0 439 } diff --git a/modeldef.female2 b/modeldef.female2 index bb9b9c0..33b2047 100644 --- a/modeldef.female2 +++ b/modeldef.female2 @@ -251,4 +251,8 @@ Model "UPlayerFemale2" FrameIndex PLT3 M 0 595 FrameIndex PLT3 N 0 596 FrameIndex PLT3 O 0 597 + // Ice Death (first frame of faint) + SurfaceSkin 0 0 "Sonyaice.png" + SurfaceSkin 0 1 "GunPick1ice.png" + FrameIndex PICE A 0 439 } diff --git a/modeldef.male1 b/modeldef.male1 index 3382906..fdac7f5 100644 --- a/modeldef.male1 +++ b/modeldef.male1 @@ -263,4 +263,8 @@ Model "UPlayerMale1" FrameIndex PLT3 M 0 563 FrameIndex PLT3 N 0 564 FrameIndex PLT3 O 0 565 + // Ice Death (third frame of faint) + SurfaceSkin 0 0 "Kurganice.png" + SurfaceSkin 0 1 "GunPick1ice.png" + FrameIndex PICE A 0 131 } \ No newline at end of file diff --git a/modeldef.male2 b/modeldef.male2 index b389ca7..588ca37 100644 --- a/modeldef.male2 +++ b/modeldef.male2 @@ -263,4 +263,8 @@ Model "UPlayerMale2" FrameIndex PLT3 M 0 563 FrameIndex PLT3 N 0 564 FrameIndex PLT3 O 0 565 + // Ice Death (third frame of faint) + SurfaceSkin 0 0 "Ashice.png" + SurfaceSkin 0 1 "GunPick1ice.png" + FrameIndex PICE A 0 131 } \ No newline at end of file diff --git a/modeldef.male3 b/modeldef.male3 index 2c78235..7563a45 100644 --- a/modeldef.male3 +++ b/modeldef.male3 @@ -263,4 +263,8 @@ Model "UPlayerMale3" FrameIndex PLT3 M 0 563 FrameIndex PLT3 N 0 564 FrameIndex PLT3 O 0 565 + // Ice Death (third frame of faint) + SurfaceSkin 0 0 "Danteice.png" + SurfaceSkin 0 1 "GunPick1ice.png" + FrameIndex PICE A 0 131 } \ No newline at end of file diff --git a/models/Ashice.png b/models/Ashice.png new file mode 100644 index 0000000..7e96c97 Binary files /dev/null and b/models/Ashice.png differ diff --git a/models/Danteice.png b/models/Danteice.png new file mode 100644 index 0000000..a017b6f Binary files /dev/null and b/models/Danteice.png differ diff --git a/models/Kurganice.png b/models/Kurganice.png new file mode 100644 index 0000000..3f6a7f3 Binary files /dev/null and b/models/Kurganice.png differ diff --git a/models/Sonyaice.png b/models/Sonyaice.png new file mode 100644 index 0000000..1b059cf Binary files /dev/null and b/models/Sonyaice.png differ diff --git a/models/ginaice.png b/models/ginaice.png new file mode 100644 index 0000000..aa5d901 Binary files /dev/null and b/models/ginaice.png differ diff --git a/oldammoicons.txt b/oldammoicons.txt new file mode 100644 index 0000000..cf60b15 --- /dev/null +++ b/oldammoicons.txt @@ -0,0 +1,22 @@ +# Ammo icons and their respective item class +# Arranged so weapon-specific icons go first when needed +Mini083,UMinigun +Disp083,DefaultAmmo +Clip083,UMiniAmmo +Tary083,StingerAmmo +Asmd083,AsmdAmmo +Rokt083,URocketAmmo +Flak083,UFlakBox +Razor083,RazorAmmo +Bio083,UBioAmmo +Rifle083,URifleAmmo +Shell083,UShells +Impal083,ImpalerAmmo +Flame083,FlameAmmo +Tele083,UTranslocatorAmmo +Stun083,StunnerAmmo +Big083,BigAmmo +Smini083,SMiniAmmo +Peace083,PeaceAmmo +OLSMP083,OLSMPAmmo +Bsaw083,Bonesaw diff --git a/oldarmoricons.txt b/oldarmoricons.txt new file mode 100644 index 0000000..fba4df3 --- /dev/null +++ b/oldarmoricons.txt @@ -0,0 +1,8 @@ +# Armor icons and their respective item class +Armor083,UArmor +Kev083,KevlarSuit +Asb083,AsbestosSuit +Tox083,ToxinSuit +Belt083,ShieldBelt +PBelt083,PowerShield +Bonus083,UArmorBonus diff --git a/zscript.txt b/zscript.txt index f2fd195..4b893bb 100644 --- a/zscript.txt +++ b/zscript.txt @@ -1,4 +1,4 @@ -version "4.2.2" +version "4.2.4" #include "zscript/unrealcommon.zsc" #include "zscript/dispersionpistol.zsc" @@ -28,5 +28,4 @@ version "4.2.2" #include "zscript/upowerups.zsc" #include "zscript/unrealhud.zsc" #include "zscript/unrealmenus.zsc" -#include "zscript/dtspawners.zsc" #include "zscript/olsmp.zsc" diff --git a/zscript/asmd.zsc b/zscript/asmd.zsc index 0df7781..b37b913 100644 --- a/zscript/asmd.zsc +++ b/zscript/asmd.zsc @@ -561,7 +561,8 @@ Class ASMDBeam : Actor BeamExplode(mult>1.5); if ( target ) { - target.TakeInventory('ASMDAmmo',2); + if ( !sv_infiniteammo && !target.FindInventory('PowerInfiniteAmmo',true) ) + target.TakeInventory('ASMDAmmo',2); UTMainHandler.DoSwing(target,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),10,-2,3,SWING_Spring,3,6); } let b = t.Results.HitActor.target; diff --git a/zscript/automag.zsc b/zscript/automag.zsc index 32c63dd..c4ad446 100644 --- a/zscript/automag.zsc +++ b/zscript/automag.zsc @@ -541,7 +541,8 @@ Class Automag : UnrealWeapon invoker.clipout = false; let aadd = min(invoker.Ammo1.Amount,invoker.default.clipcount-invoker.clipcount); invoker.clipcount += aadd; - invoker.Ammo1.Amount -= aadd; + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) + invoker.Ammo1.Amount -= aadd; A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); @@ -576,7 +577,8 @@ Class Automag : UnrealWeapon invoker.slaveclipout = false; let aadd = min(invoker.Ammo1.Amount,invoker.default.slaveclipcount-invoker.slaveclipcount); invoker.slaveclipcount += aadd; - invoker.Ammo1.Amount -= aadd; + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) + invoker.Ammo1.Amount -= aadd; A_PlaySound("automag/reload",CHAN_6,!Dampener.Active(self)?1.:.1); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); diff --git a/zscript/betamag.zsc b/zscript/betamag.zsc index 24f076f6..9758d14 100644 --- a/zscript/betamag.zsc +++ b/zscript/betamag.zsc @@ -63,13 +63,10 @@ Class Betamag : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override bool HandlePickup( Inventory item ) { diff --git a/zscript/biggun.zsc b/zscript/biggun.zsc index 978aaee..3eefde9 100644 --- a/zscript/biggun.zsc +++ b/zscript/biggun.zsc @@ -51,13 +51,10 @@ Class BigAmmo : Ammo r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } States { @@ -294,13 +291,10 @@ Class BigGun : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override int, int, bool, bool GetClipAmount() { @@ -579,7 +573,8 @@ Class BigGun : UnrealWeapon invoker.clipout = false; let aadd = min(invoker.ammo1.amount,invoker.default.clipcount-invoker.clipcount); invoker.clipcount += aadd; - invoker.Ammo1.Amount -= aadd; + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) + invoker.Ammo1.Amount -= aadd; A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollintensity:0.12); A_PlaySound("big/reload",CHAN_WEAPON,Dampener.Active(self)?.3:1.); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); diff --git a/zscript/bonesaw.zsc b/zscript/bonesaw.zsc index 40ed64a..dc106e4 100644 --- a/zscript/bonesaw.zsc +++ b/zscript/bonesaw.zsc @@ -33,13 +33,10 @@ Class Bonesaw : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override String GetObituary( Actor victim, Actor inflictor, Name mod, bool playerattack ) { @@ -135,6 +132,7 @@ Class Bonesaw : UnrealWeapon Default { Tag "$T_RAZORCLAW"; + Inventory.Icon "I_BSaw"; Inventory.PickupMessage "$I_RAZORCLAW"; Weapon.UpSound "bonesaw/select"; Weapon.SlotNumber 1; diff --git a/zscript/dispersionpistol.zsc b/zscript/dispersionpistol.zsc index d932ee7..b8ee66f 100644 --- a/zscript/dispersionpistol.zsc +++ b/zscript/dispersionpistol.zsc @@ -822,9 +822,12 @@ Class DispersionPistol : UnrealWeapon { invoker.chargesize = invoker.count = 0.; let weap = Weapon(invoker); - if ( weap.Ammo1.Amount < max(10,invoker.ChargeUse) ) - weap.Ammo1.Amount--; - else weap.Ammo1.Amount -= invoker.ChargeUse; + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) + { + if ( weap.Ammo1.Amount < max(10,invoker.ChargeUse) ) + weap.Ammo1.Amount--; + else weap.Ammo1.Amount -= invoker.ChargeUse; + } invoker.bCharging = true; // need to make sure player does the repeat fire anim if ( self is 'UPlayer' ) diff --git a/zscript/dtspawners.zsc b/zscript/dtspawners.zsc deleted file mode 100644 index 133dca8..0000000 --- a/zscript/dtspawners.zsc +++ /dev/null @@ -1,99 +0,0 @@ -// These are here for Doom Tournament maps -Class MultiItemSpawner : Actor -{ -} - -Class Slot1Weapons : MultiItemSpawner -{ -} - -Class Slot2Weapons : MultiItemSpawner -{ -} - -Class Slot3Weapons : MultiItemSpawner -{ -} - -Class Slot4Weapons : MultiItemSpawner -{ -} - -Class Slot5Weapons : MultiItemSpawner -{ -} - -Class Slot6Weapons : MultiItemSpawner -{ -} - -Class Slot7Weapons : MultiItemSpawner -{ -} - -Class Slot8Weapons : MultiItemSpawner -{ -} - -Class Slot9Weapons : MultiItemSpawner -{ -} - -Class Slot0Weapons : MultiItemSpawner -{ -} - -Class Slot0SWeapons : MultiItemSpawner -{ -} - -Class Slot2Ammo : MultiItemSpawner -{ -} - -Class Slot3Ammo : MultiItemSpawner -{ -} - -Class Slot4Ammo : MultiItemSpawner -{ -} - -Class Slot5Ammo : MultiItemSpawner -{ -} - -Class Slot6Ammo : MultiItemSpawner -{ -} - -Class Slot7Ammo : MultiItemSpawner -{ -} - -Class Slot8Ammo : MultiItemSpawner -{ -} - -Class Slot9Ammo : MultiItemSpawner -{ -} - -Class Slot0Ammo : MultiItemSpawner -{ -} - -Class Slot0SAmmo : MultiItemSpawner -{ -} - -// nothing at all -Class UNothing : Actor -{ - States - { - Spawn: - TNT1 A 1; - Stop; - } -} diff --git a/zscript/flamegun.zsc b/zscript/flamegun.zsc index 475ac03..98e080b 100644 --- a/zscript/flamegun.zsc +++ b/zscript/flamegun.zsc @@ -350,13 +350,10 @@ Class FlameGun : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } action void A_FlameGunFire( bool bAlt = false ) { diff --git a/zscript/gatling.zsc b/zscript/gatling.zsc index 81a464c..7773d4f 100644 --- a/zscript/gatling.zsc +++ b/zscript/gatling.zsc @@ -154,13 +154,10 @@ Class SMiniGun : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } action void A_SMiniFire( bool bAlt = false ) { diff --git a/zscript/impaler.zsc b/zscript/impaler.zsc index bd7fa84..4dd7dc6 100644 --- a/zscript/impaler.zsc +++ b/zscript/impaler.zsc @@ -45,13 +45,10 @@ Class ImpalerAmmo : Ammo r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } States { @@ -775,13 +772,10 @@ Class Impaler : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override int, int, bool, bool GetClipAmount() { @@ -845,7 +839,8 @@ Class Impaler : UnrealWeapon invoker.beam.specialf1 = mul; invoker.beam.specialf1 *= .5+clamp(invoker.clipcount/double(invoker.default.clipcount),.0,.5); } - invoker.clipcount = max(0,invoker.clipcount-int(mul)); + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) + invoker.clipcount = max(0,invoker.clipcount-int(mul)); } invoker.FireEffect(); UTMainHandler.DoFlash(self,Color(16,255,32,255),3); diff --git a/zscript/miscitems.zsc b/zscript/miscitems.zsc index ec66382..53f39af 100644 --- a/zscript/miscitems.zsc +++ b/zscript/miscitems.zsc @@ -1493,6 +1493,7 @@ Class SentryItem : UnrealInventory r.target = target; r.tracer = tracer; r.bDropped = bDropped; + r.bNeverRespawn = bNeverRespawn; } Destroy(); } @@ -1724,7 +1725,7 @@ Class MinigunSentry : Actor } bool TargetVisible() { - if ( !target || (target.Health <= 0) || !CheckSight(target) ) return false; + if ( !master || !target || (target.Health <= 0) || !CheckSight(target) ) return false; double angledelta = DeltaAngle(master.angle,AngleTo(target)); double pitchdelta = DeltaAngle(master.pitch,_PitchTo(target)); if ( (abs(angledelta) > maxangle) || (abs(pitchdelta) > maxpitch) ) return false; @@ -1742,6 +1743,7 @@ Class MinigunSentry : Actor } void A_SentryFaceDir( double dest, statelabel next ) { + if ( !master ) return; double angledelta = DeltaAngle(angle,master.angle+dest); double pitchdelta = DeltaAngle(pitch,master.pitch); if ( max(abs(angledelta),abs(pitchdelta)) < 2 ) @@ -1756,6 +1758,7 @@ Class MinigunSentry : Actor } void A_SentryAttack() { + if ( !master ) return; master.special1 = special1 = max(0,special1-1); if ( (special1 <= 0) && master.master && master.master.CheckLocalView() ) Console.Printf(StringTable.Localize("$M_SENTRYDRY")); A_SentryFaceTarget(); @@ -1817,7 +1820,7 @@ Class MinigunSentry : Actor SENT A 0 { A_PlaySound("sentry/raise"); - master.A_AlertMonsters(0,AMF_TARGETEMITTER); + if ( master ) master.A_AlertMonsters(0,AMF_TARGETEMITTER); } SENR ABCDEFGHIJKLMNO 3; Goto Idle; @@ -1863,8 +1866,11 @@ Class MinigunSentry : Actor SENW A 0 { A_PlaySound("sentry/wind",looping:true); - master.A_AlertMonsters(0,AMF_TARGETEMITTER); - master.SetStateLabel("Missile"); + if ( master ) + { + master.A_AlertMonsters(0,AMF_TARGETEMITTER); + master.SetStateLabel("Missile"); + } } SENW ABCDEFGHIJKLMNOPQR 1 A_SentryFaceTarget(); Goto MissileLoop; @@ -1902,7 +1908,7 @@ Class MinigunSentry : Actor A_LookEx(LOF_NOSOUNDCHECK|LOF_NOJUMP); if ( TargetVisible() && (special1>0) ) return ResolveState("MissileLoop"); A_PlaySound("sentry/unwind"); - master.SetStateLabel("MissileEnd"); + if ( master ) master.SetStateLabel("MissileEnd"); return ResolveState(null); } SENU ABCDEFGHIJKLMNOPQR 1 A_SentryFaceTarget(); @@ -1914,8 +1920,11 @@ Class MinigunSentry : Actor SENI A 0 { A_PlaySound("sentry/raise"); - master.A_AlertMonsters(0,AMF_TARGETEMITTER); - master.SetStateLabel("DoPackUp"); + if ( master ) + { + master.A_AlertMonsters(0,AMF_TARGETEMITTER); + master.SetStateLabel("DoPackUp"); + } } SENR ONMLKJIHGFEDCBA 3; Stop; diff --git a/zscript/napalm.zsc b/zscript/napalm.zsc index a6972b9..9d36fd3 100644 --- a/zscript/napalm.zsc +++ b/zscript/napalm.zsc @@ -44,13 +44,10 @@ Class FlameAmmo : Ammo r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } States { @@ -825,13 +822,10 @@ Class UFlamethrower : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override int, int, bool, bool GetClipAmount() { diff --git a/zscript/olsmp.zsc b/zscript/olsmp.zsc index e7bd280..d46d401 100644 --- a/zscript/olsmp.zsc +++ b/zscript/olsmp.zsc @@ -38,6 +38,7 @@ Class OLSMPAmmo : Ammo r.target = target; r.tracer = tracer; r.bDropped = bDropped; + r.bNeverRespawn = bNeverRespawn; } else Owner.RemoveInventory(self); Destroy(); @@ -110,13 +111,10 @@ Class OLSMP : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override void PlayUpSound( Actor origin ) { @@ -348,7 +346,8 @@ Class OLSMP : UnrealWeapon invoker.clipout = false; let aadd = min(invoker.Ammo1.Amount,invoker.default.clipcount-invoker.clipcount); invoker.clipcount += aadd; - invoker.Ammo1.Amount -= aadd; + if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) + invoker.Ammo1.Amount -= aadd; A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1,pitch:0.8); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); diff --git a/zscript/quadshot.zsc b/zscript/quadshot.zsc index 2192bd7..83816c5 100644 --- a/zscript/quadshot.zsc +++ b/zscript/quadshot.zsc @@ -49,13 +49,10 @@ Class UShells : Ammo r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } States { @@ -172,13 +169,10 @@ Class QuadShot : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override int, int, bool, bool GetClipAmount() @@ -492,7 +486,7 @@ Class QuadShot : UnrealWeapon if ( (invoker.clipcount >= 4) || (invoker.heldshells+weap.Ammo1.Amount <= 0) ) continue; invoker.clipcount++; if ( invoker.heldshells > 0 ) invoker.heldshells--; - else weap.Ammo1.Amount--; + else if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) weap.Ammo1.Amount--; } if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); @@ -508,7 +502,7 @@ Class QuadShot : UnrealWeapon if ( (invoker.clipcount >= 4) || (invoker.heldshells+weap.Ammo1.Amount <= 0) ) continue; invoker.clipcount++; if ( invoker.heldshells > 0 ) invoker.heldshells--; - else weap.Ammo1.Amount--; + else if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) weap.Ammo1.Amount--; } if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); diff --git a/zscript/stunner.zsc b/zscript/stunner.zsc index 4b20667..e2092a9 100644 --- a/zscript/stunner.zsc +++ b/zscript/stunner.zsc @@ -22,7 +22,8 @@ Class StunnerAmmo : Ammo let sting = Owner.FindInventory("StingerAmmo"); if ( sting && (sting.Amount > 0) ) { - sting.Amount--; + if ( !sv_infiniteammo && !Owner.FindInventory('PowerInfiniteAmmo',true) ) + sting.Amount--; Amount++; } } @@ -328,13 +329,10 @@ Class Stunner : UnrealWeapon r.target = target; r.tracer = tracer; r.bDropped = bDropped; - Destroy(); - } - else - { - Owner.RemoveInventory(self); - Destroy(); + r.bNeverRespawn = bNeverRespawn; } + else Owner.RemoveInventory(self); + Destroy(); } override int, int, bool, bool GetClipAmount() @@ -429,7 +427,7 @@ Class Stunner : UnrealWeapon invoker.count += 1.2/35.; if ( invoker.count < 0.24 ) return ResolveState(null); invoker.count = 0; - if ( !(sv_infiniteammo || (FindInventory('PowerInfiniteAmmo',true))) ) + if ( !(sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true)) ) { if ( weap.Ammo1.Amount < 1 ) return ResolveState("Release"); diff --git a/zscript/ubiorifle.zsc b/zscript/ubiorifle.zsc index b5a18cb..db7f8b8 100644 --- a/zscript/ubiorifle.zsc +++ b/zscript/ubiorifle.zsc @@ -437,8 +437,8 @@ Class UBioGel : Actor s.args[3] = int(s.args[3]*Scale.x); invoker.deadtimer = -2; if ( invoker.atline ) invoker.atline.RemoteActivate(target,invoker.atside,SPAC_Impact,pos); - UTMainHandler.DoBlast(self,Min(175,int(Scale.x*100)),40000*Scale.x); - A_Explode(int(40*Scale.x),Min(175,int(Scale.x*100))); + UTMainHandler.DoBlast(self,int(Scale.x*100),40000*Scale.x); + A_Explode(int(Args[0]*Scale.x),int(Scale.x*100)); A_PlaySound("ges/explode",CHAN_VOICE); int numpt = Min(300,int(Scale.x*30))+Random[GES](-10,10); for ( int i=0; i 1) ) numsplash = int(4*Scale.x)-1; if ( sting_biosplash ) SpawnSplash(); + else Scale *= 1.4; } override void Tick() { diff --git a/zscript/ueightball.zsc b/zscript/ueightball.zsc index 1973662..da375a7 100644 --- a/zscript/ueightball.zsc +++ b/zscript/ueightball.zsc @@ -556,6 +556,8 @@ Class Eightball : UnrealWeapon Wait; Ready: EBLS ABCDEFGHIJKLMNO 1 A_WeaponReady(WRF_NOFIRE); + EBLS O 8 A_Overlay(-9999,"Dummy"); + Goto Idle+1; Ready2: EBLS O 0 A_CheckReload(); EBLL A 0 A_PlaySound("utrl/load",CHAN_6,Dampener.Active(self)?.1:1.); diff --git a/zscript/uflakcannon.zsc b/zscript/uflakcannon.zsc index dfd8e24..6a61160 100644 --- a/zscript/uflakcannon.zsc +++ b/zscript/uflakcannon.zsc @@ -327,6 +327,14 @@ Class UFlakCannon : UnrealWeapon } FLKL BCEFGIJKMNO 1; Goto Idle; + AltLoading: + FLKL A 2 + { + A_CheckReload(); + if ( invoker.Ammo1.Amount > 0 ) A_Loading(); + } + FLKL BCEFGIJKMNO 2; + Goto Idle; Idle: FLKI A 1 A_WeaponReady(); Wait; @@ -351,7 +359,7 @@ Class UFlakCannon : UnrealWeapon FLKA A 1 A_FireSlug(); FLKA BCDEFGHIJK 1; FLKA K 10; - Goto Loading; + Goto AltLoading; Deselect: FLKD A 0 A_JumpIfNoAmmo("Deselect2"); FLKD ABCDEF 1; diff --git a/zscript/unrealcommon.zsc b/zscript/unrealcommon.zsc index 763b5ae..dcf6185 100644 --- a/zscript/unrealcommon.zsc +++ b/zscript/unrealcommon.zsc @@ -137,14 +137,20 @@ Class UPlayer : UTPlayer } if ( giveall || (name ~== "armor") ) { - // Doomreal gives the player all subclasses of UnrealArmor + // Doomreal gives the player all subclasses of UTArmor that are not replaced by something for ( int i=0; i)(AllActorClasses[i]); + if ( !type ) continue; + let def = GetDefaultByType(type); + if ( !def.Icon.isValid() ) continue; + if ( GetReplacement(type) == type ) + { + let item = Inventory(Spawn(type)); + item.ClearCounters(); // don't increase item counts + item.Amount = item.MaxAmount; + if ( !item.CallTryPickup(self) ) item.Destroy(); + } } if ( !giveall ) return; } @@ -376,7 +382,7 @@ Class UPlayerFemale : UPlayer Goto Death; Death.Decapitated: #### # 0 A_HeadPop(); - PLD6 A 3 A_PlayerScream(); + PLD6 A 3 A_PlayerScreamDT(); PLD6 B 3 A_NoBlocking(); PLD6 CDEFGHIJ 3; PLD6 K 1 A_DMFade(); @@ -388,42 +394,42 @@ Class UPlayerFemale : UPlayer #### # 0 A_Jump(256,"Death1","Death3","Death4"); Death1: #### # 3; - PLD1 A 3 A_PlayerScream(); + PLD1 A 3 A_PlayerScreamDT(); PLD1 B 3 A_NoBlocking(); PLD1 CDEFGHIJKLMNOPQRSTU 3; PLD1 V 1 A_DMFade(); Wait; Death2: #### # 3; - PLD2 A 3 A_PlayerScream(); + PLD2 A 3 A_PlayerScreamDT(); PLD2 B 3 A_NoBlocking(); PLD2 CDEFGHIJKLMNOPQ 3; PLD2 R 1 A_DMFade(); Wait; Death3: #### # 3; - PLD3 A 3 A_PlayerScream(); + PLD3 A 3 A_PlayerScreamDT(); PLD3 B 3 A_NoBlocking(); PLD3 CDEFGHIJKLMNO 3; PLD3 P 1 A_DMFade(); Wait; Death4: #### # 3; - PLD4 A 3 A_PlayerScream(); + PLD4 A 3 A_PlayerScreamDT(); PLD4 B 3 A_NoBlocking(); PLD4 CDEFGHIJKL 3; PLD4 M 1 A_DMFade(); Wait; Death5: #### # 3; - PLD5 A 3 A_PlayerScream(); + PLD5 A 3 A_PlayerScreamDT(); PLD5 B 3 A_NoBlocking(); PLD5 CDEFGHIJKLMNO 3; PLD5 P 1 A_DMFade(); Wait; Death7: #### # 0 A_ArmPop(); - PLD7 A 3 A_PlayerScream(); + PLD7 A 3 A_PlayerScreamDT(); PLD7 B 3 A_NoBlocking(); PLD7 CDEFGHIJKLMNOPQRSTUV 3; PLD7 W 1 A_DMFade(); @@ -557,14 +563,14 @@ Class UPlayerMale : UPlayer #### # 0 A_Jump(256,"Death2","Death3","Death7"); Death5: #### # 0 A_TorsoPop(); - PLD5 A 3 A_PlayerScream(); + PLD5 A 3 A_PlayerScreamDT(); PLD5 B 3 A_NoBlocking(); PLD5 CDEFGHIJKLMNOPQRSTUV 3; PLD5 W 1 A_DMFade(); Wait; Death6: #### # 3; - PLD6 A 3 A_PlayerScream(); + PLD6 A 3 A_PlayerScreamDT(); PLD6 B 3 A_NoBlocking(); PLD6 CDEFGHIJKLMNOPQRSTUVWXYZ[ 3; PLD6 \ 1 A_DMFade(); @@ -845,11 +851,6 @@ Class UnrealWeapon : UTWeapon { 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 @@ -940,6 +941,17 @@ Class AmmoUsedInSlot bool UsedInSlot[10]; } +// nothing at all +Class UNothing : Actor +{ + States + { + Spawn: + TNT1 A 1; + Stop; + } +} + Class UnrealMainHandler : EventHandler { Array AmmoSlots; @@ -1197,32 +1209,35 @@ Class UnrealMainHandler : EventHandler } } else if ( e.Replacee == 'TeleportFog' ) e.Replacement = 'UTeleportFog'; - // replace UT items (while this is mainly for the DT map pack, it also has the added effect of preventing the guns from being added by "give all") + // replace UT items (prevents them from being cheated in) else if ( e.Replacee is 'ImpactHammer' ) e.Replacement = 'DispersionPistol'; else if ( e.Replacee is 'Translocator' ) e.Replacement = 'UTranslocator'; - else if ( e.Replacee is 'UTChainsaw' ) e.Replacement = 'Slot1Weapons'; - else if ( e.Replacee is 'Enforcer' ) e.Replacement = 'Slot2Weapons'; - else if ( e.Replacee is 'BioRifle' ) e.Replacement = 'Slot3Weapons'; - else if ( e.Replacee is 'ShockRifle' ) e.Replacement = 'Slot4Weapons'; - else if ( e.Replacee is 'PulseGun' ) e.Replacement = 'Slot5Weapons'; - else if ( e.Replacee is 'Ripper2' ) e.Replacement = 'Slot6Weapons'; - else if ( e.Replacee is 'Minigun' ) e.Replacement = 'Slot7Weapons'; - else if ( e.Replacee is 'FlakCannon' ) e.Replacement = 'Slot8Ammo'; - else if ( e.Replacee is 'UTRocketLauncher' ) e.Replacement = 'Slot0Weapons'; - else if ( e.Replacee is 'SniperRifle' ) e.Replacement = 'Slot0Weapons'; - else if ( e.Replacee is 'WarheadLauncher' ) e.Replacement = 'Slot0SWeapons'; - else if ( e.Replacee is 'EnhancedShockRifle' ) e.Replacement = 'Amplifier'; + else if ( e.Replacee is 'UTChainsaw' ) e.Replacement = 'Bonesaw'; + else if ( e.Replacee is 'Enforcer' ) e.Replacement = 'Automag'; + else if ( e.Replacee is 'BioRifle' ) e.Replacement = 'UBioRifle'; + else if ( e.Replacee is 'ShockRifle' ) e.Replacement = 'ASMD'; + else if ( e.Replacee is 'PulseGun' ) e.Replacement = 'Stinger'; + else if ( e.Replacee is 'Ripper2' ) e.Replacement = 'Razorjack'; + else if ( e.Replacee is 'Minigun' ) e.Replacement = 'UMinigun'; + else if ( e.Replacee is 'FlakCannon' ) e.Replacement = 'UFlakCannon'; + else if ( e.Replacee is 'UTRocketLauncher' ) e.Replacement = 'Eightball'; + else if ( e.Replacee is 'SniperRifle' ) e.Replacement = 'URifle'; + else if ( e.Replacee is 'WarheadLauncher' ) e.Replacement = 'UNothing'; + else if ( e.Replacee is 'EnhancedShockRifle' ) e.Replacement = 'UNothing'; else if ( e.Replacee is 'ChainsawAmmo' ) e.Replacement = 'UNothing'; - else if ( e.Replacee is 'EClip' ) e.Replacement = 'Slot2Ammo'; - else if ( e.Replacee is 'BioAmmo' ) e.Replacement = 'Slot3Ammo'; - else if ( e.Replacee is 'ShockAmmo' ) e.Replacement = 'Slot4Ammo'; - else if ( e.Replacee is 'PulseAmmo' ) e.Replacement = 'Slot5Ammo'; - else if ( e.Replacee is 'RipperAmmo' ) e.Replacement = 'Slot6Ammo'; - else if ( e.Replacee is 'MiniAmmo' ) e.Replacement = 'Slot7Ammo'; - else if ( e.Replacee is 'FlakAmmo' ) e.Replacement = 'Slot8Ammo'; - else if ( e.Replacee is 'UTRocketAmmo' ) e.Replacement = 'Slot9Ammo'; - else if ( e.Replacee is 'RifleAmmo' ) e.Replacement = 'Slot0Ammo'; - else if ( e.Replacee is 'WarheadAmmo' ) e.Replacement = 'Slot0SAmmo'; + else if ( e.Replacee is 'EClip' ) e.Replacement = 'UClip'; + else if ( e.Replacee is 'BioAmmo2' ) e.Replacement = 'UBioAmmo2'; + else if ( e.Replacee is 'BioAmmo' ) e.Replacement = 'UBioAmmo'; + else if ( e.Replacee is 'ShockAmmo2' ) e.Replacement = 'ASMDAmmo2'; + else if ( e.Replacee is 'ShockAmmo' ) e.Replacement = 'ASMDAmmo'; + else if ( e.Replacee is 'PulseAmmo' ) e.Replacement = 'StingerAmmo'; + else if ( e.Replacee is 'RipperAmmo' ) e.Replacement = 'RazorAmmo'; + else if ( e.Replacee is 'MiniAmmo' ) e.Replacement = 'UMiniAmmo'; + else if ( e.Replacee is 'FlakAmmo' ) e.Replacement = 'UFlakBox'; + else if ( e.Replacee is 'UTRocketAmmo' ) e.Replacement = 'URocketAmmo'; + else if ( e.Replacee is 'RifleAmmo2' ) e.Replacement = 'URifleAmmo2'; + else if ( e.Replacee is 'RifleAmmo' ) e.Replacement = 'URifleAmmo'; + else if ( e.Replacee is 'WarheadAmmo' ) e.Replacement = 'UNothing'; else if ( e.Replacee is 'EnhancedShockAmmo' ) e.Replacement = 'UNothing'; else if ( e.Replacee is 'UTBackpack' ) e.Replacement = 'UnrealBackpack'; else if ( e.Replacee is 'UDamage' ) e.Replacement = 'Amplifier'; @@ -1239,7 +1254,6 @@ Class UnrealMainHandler : EventHandler else if ( e.Replacee is 'UTHealthPack' ) e.Replacement = 'SuperHealth'; else if ( e.Replacee is 'UTHealthBonus' ) e.Replacement = 'Bandages'; else if ( e.Replacee is 'UTJumpBoots' ) e.Replacement = 'UJumpBoots'; - // we don't need these else if ( e.Replacee is 'UTActivatable' ) e.Replacement = 'UNothing'; else if ( e.Replacee is 'UTActivatableHealth' ) e.Replacement = 'UNothing'; } @@ -1293,7 +1307,7 @@ Class UnrealMainHandler : EventHandler let t = players[e.player].mo.FindInventory("UTranslator"); if ( t ) t.Use(false); } - else if ( e.Name ~== "Bar083SlotFlash" ) + else if ( (e.Name ~== "Bar083SlotFlash") && (e.player == consoleplayer) ) slotflash[e.Args[0]] = gametic+20; } private static bool CmpWeapon( Class a, Class b ) diff --git a/zscript/unrealhud.zsc b/zscript/unrealhud.zsc index 6d63617..a59f2dc 100644 --- a/zscript/unrealhud.zsc +++ b/zscript/unrealhud.zsc @@ -36,10 +36,10 @@ Class UnrealHUD : BaseStatusBar bool MidPrintLarge; // 0.83 HUD stuff - String OldAmmo[19]; - Class OldAmmoType[19]; - String OldArmor[7]; - Class OldArmorType[7]; + Array OldAmmo; + Array > OldAmmoType; + Array OldArmor; + Array > OldArmorType; String OldKeys[7]; HUDFont mOldDigits, mOldDigitsSmall; Font OldLargeFont, OldSmallFont; @@ -89,59 +89,43 @@ Class UnrealHUD : BaseStatusBar mMapFont = HUDFont.Create(WhiteFont); OldLargeFont = Font.GetFont('UOldLargeFont'); OldSmallFont = Font.GetFont('UOldSmallFont'); - // arranged so weapon-specific icons are checked first - OldAmmo[0] = "Mini083"; - OldAmmo[1] = "Disp083"; - OldAmmo[2] = "Clip083"; - OldAmmo[3] = "Tary083"; - OldAmmo[4] = "Asmd083"; - OldAmmo[5] = "Rokt083"; - OldAmmo[6] = "Flak083"; - OldAmmo[7] = "Razor083"; - OldAmmo[8] = "Bio083"; - OldAmmo[9] = "Rifle083"; - OldAmmo[10] = "Shell083"; - OldAmmo[11] = "Impal083"; - OldAmmo[12] = "Flame083"; - OldAmmo[13] = "Tele083"; - OldAmmo[14] = "Stun083"; - OldAmmo[15] = "Big083"; - OldAmmo[16] = "Smini083"; - OldAmmo[17] = "Peace083"; - OldAmmo[18] = "OLSMP083"; - OldAmmoType[0] = "UMinigun"; - OldAmmoType[1] = "DefaultAmmo"; - OldAmmoType[2] = "UMiniAmmo"; - OldAmmoType[3] = "StingerAmmo"; - OldAmmoType[4] = "AsmdAmmo"; - OldAmmoType[5] = "URocketAmmo"; - OldAmmoType[6] = "UFlakBox"; - OldAmmoType[7] = "RazorAmmo"; - OldAmmoType[8] = "UBioAmmo"; - OldAmmoType[9] = "URifleAmmo"; - OldAmmoType[10] = "UShells"; - OldAmmoType[11] = "ImpalerAmmo"; - OldAmmoType[12] = "FlameAmmo"; - OldAmmoType[13] = "UTranslocatorAmmo"; - OldAmmoType[14] = "StunnerAmmo"; - OldAmmoType[15] = "BigAmmo"; - OldAmmoType[16] = "SMiniAmmo"; - OldAmmoType[17] = "PeaceAmmo"; - OldAmmoType[18] = "OLSMPAmmo"; - OldArmor[0] = "Armor083"; - OldArmor[1] = "Kev083"; - OldArmor[2] = "Asb083"; - OldArmor[3] = "Tox083"; - OldArmor[4] = "Belt083"; - OldArmor[5] = "Pbelt083"; - OldArmor[6] = "Bonus083"; - OldArmorType[0] = "UArmor"; - OldArmorType[1] = "KevlarSuit"; - OldArmorType[2] = "AsbestosSuit"; - OldArmorType[3] = "ToxinSuit"; - OldArmorType[4] = "ShieldBelt"; - OldArmorType[5] = "PowerShield"; - OldArmorType[6] = "UArmorBonus"; + // load icon lists + Array lst, ent; + String dat; + for ( int lmp = Wads.FindLump("oldammoicons.txt"); lmp > 0; lmp = Wads.FindLump("oldammoicons.txt",lmp+1) ) + { + dat = Wads.ReadLump(lmp); + lst.Clear(); + dat.Split(lst,"\n",0); + for ( int i=0; i i = ent[1]; + if ( !i ) continue; + OldAmmo.Push(ent[0]); + OldAmmoType.Push(i); + } + } + for ( int lmp = Wads.FindLump("oldarmoricons.txt"); lmp > 0; lmp = Wads.FindLump("oldarmoricons.txt",lmp+1) ) + { + dat = Wads.ReadLump(lmp); + lst.Clear(); + dat.Split(lst,"\n",0); + for ( int i=0; i i = ent[1]; + if ( !i ) continue; + OldArmor.Push(ent[0]); + OldArmorType.Push(i); + } + } OldKeys[0] = "Redk083"; OldKeys[1] = "Bluek083"; OldKeys[2] = "Goldk083"; @@ -476,13 +460,52 @@ Class UnrealHUD : BaseStatusBar { CurX = x; CurY = y; - if ( !CPlayer.ReadyWeapon || !CPlayer.ReadyWeapon.Ammo1 ) return; - Font cfont = LargeFont; - if ( CPlayer.ReadyWeapon.Ammo1.Amount <= min(9,CPlayer.ReadyWeapon.Ammo1.MaxAmount/3) ) cfont = LargeRedFont; + if ( !CPlayer.ReadyWeapon ) return; int sec = -1, sec2 = -1; bool red = false, red2 = false; - if ( CPlayer.ReadyWeapon is 'UnrealWeapon' ) - [sec, sec2, red, red2] = UnrealWeapon(CPlayer.ReadyWeapon).GetClipAmount(); + if ( CPlayer.ReadyWeapon is 'UTWeapon' ) + [sec, sec2, red, red2] = UTWeapon(CPlayer.ReadyWeapon).GetClipAmount(); + Font cfont = LargeFont; + if ( !CPlayer.ReadyWeapon.Ammo1 ) + { + if ( CPlayer.ReadyWeapon.Icon.IsNull() ) return; + if ( !HudMode ) + { + 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; + CurY = y; + Screen.DrawTexture(IconBase,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); + // scale to fit + Vector2 scl = TexMan.GetScaledSize(CPlayer.ReadyWeapon.Icon); + double mscl = 32./max(scl.x,scl.y); + double dw = (ClipX/mscl), dh = (ClipY/mscl); + double dx = (CurX+(32-scl.x*mscl)/2)/mscl, dy = (CurY+(32-scl.y*mscl)/2)/mscl; + Screen.DrawTexture(CPlayer.ReadyWeapon.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_TopOffset,0,DTA_LeftOffset,0); + if ( HudMode ) + { + CurX = x; + CurY = y; + Screen.DrawTexture(IconBase,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); + 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); + } + return; + } + if ( CPlayer.ReadyWeapon.Ammo1.Amount <= min(9,CPlayer.ReadyWeapon.Ammo1.MaxAmount/3) ) cfont = LargeRedFont; if ( !HudMode ) { CurX -= cfont.StringWidth(String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount))+2; @@ -712,7 +735,7 @@ Class UnrealHUD : BaseStatusBar let ba = CPlayer.mo.FindInventory("BasicArmor"); if ( ba ) ArmorAmount += ba.amount; bool drawnarmor = false; - for ( int i=0; i<6; i++ ) + for ( int i=0; i