diff --git a/cvarinfo.txt b/cvarinfo.txt index f923da2..459a488 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -86,3 +86,4 @@ server bool sting_razoraim = false; // razorjack alt follows aim instead of server bool sting_biosplash = false; // biorifle alt splashes like in ut server bool sting_flametspread = false; // targets on fire spread the flames // to anyone nearby (may be op) +server bool sting_impself = false; // disable impaler beam self-hit \ No newline at end of file diff --git a/language.txt b/language.txt index 6680442..4947f88 100644 --- a/language.txt +++ b/language.txt @@ -248,6 +248,7 @@ STING_AUTOSCUBA = "Automatic SCUBA Gear toggling"; STING_RAZORAIM = "Razorjack altfire follows the crosshair"; STING_BIOSPLASH = "Biorifle altfire splashes like in UT"; STING_FLAMETSPREAD = "Flamethrower fire spreads between targets"; +STING_IMPSELF = "Impaler beam cannot hurt user"; STING_MCREDS = "Unreal Credits"; STING_CDR = "Doomreal"; STING_CLEAD = "Development Lead:"; @@ -485,6 +486,7 @@ STING_AUTOSCUBA = "Uso automático de Kit de Buceo"; STING_RAZORAIM = "El fuego alt. del Razorjack sigue el punto de mira"; STING_BIOSPLASH = "El fuego alt. del Biorifle salpica como en UT"; STING_FLAMETSPREAD = "El fuego del Lanzallamas se propaga entre objetivos"; +STING_IMPSELF = "El haz del Empalador no daña al usuario"; STING_MCREDS = "Créditos de Unreal"; STING_CDR = "Doomreal"; STING_CLEAD = "Desarrolladora Jefe:"; diff --git a/menudef.txt b/menudef.txt index 68a913f..756cdb0 100644 --- a/menudef.txt +++ b/menudef.txt @@ -51,6 +51,7 @@ OptionMenu "UnrealOptionMenu" Option "$STING_RAZORAIM", "sting_razoraim", "YesNo" Option "$STING_BIOSPLASH", "sting_biosplash", "YesNo" Option "$STING_FLAMETSPREAD", "sting_flametspread", "YesNo" + Option "$STING_IMPSELF", "sting_impself", "YesNo" } AddOptionMenu "OptionsMenu" diff --git a/zscript/asmd.zsc b/zscript/asmd.zsc index c378b85..85ec468 100644 --- a/zscript/asmd.zsc +++ b/zscript/asmd.zsc @@ -745,7 +745,7 @@ Class ASMD : UnrealWeapon Inventory.PickupMessage "$I_ASMD"; Weapon.UpSound "shock/select"; Weapon.SlotNumber 4; - Weapon.SelectionOrder 4; + Weapon.SelectionOrder 2000; Weapon.SlotPriority 1; Weapon.AmmoType "ASMDAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/automag.zsc b/zscript/automag.zsc index bdf2770..760e77d 100644 --- a/zscript/automag.zsc +++ b/zscript/automag.zsc @@ -23,6 +23,7 @@ Class Automag : UnrealWeapon { int ClipCount, SlaveClipCount; bool SlaveActive, SlaveDown, SlaveReload, SlaveAltFire, SlaveSpin; + bool ClipOut, SlaveClipOut; int SlaveRefire; double AltAccuracy; @@ -31,8 +32,8 @@ Class Automag : UnrealWeapon override int, int, bool, bool GetClipAmount() { - if ( Amount > 1 ) return ClipCount, SlaveClipCount, (ClipCount<5), (SlaveClipCount<5); - return ClipCount, -1, (ClipCount<5), false; + if ( Amount > 1 ) return ClipOut?-1:ClipCount, SlaveClipOut?-1:SlaveClipCount, (ClipCount<5), (SlaveClipCount<5); + return ClipOut?-1:ClipCount, -1, (ClipCount<5), false; } override bool HandlePickup( Inventory item ) { @@ -252,7 +253,20 @@ Class Automag : UnrealWeapon override void OwnerDied() { Super.OwnerDied(); - slaverefire = 0; + slavespin = slavereload = slaverefire = 0; + if ( Owner.player.ReadyWeapon != self ) return; + let psp = Owner.player.FindPSprite(2); + if ( psp ) + { + slaveactive = false; + Owner.player.SetPSprite(2,ResolveState("LeftDeselect")); + } + } + override void DoEffect() + { + Super.DoEffect(); + if ( Amount > 1 ) SelectionOrder = 1250; + else SelectionOrder = default.SelectionOrder; } override void Tick() { @@ -288,7 +302,7 @@ Class Automag : UnrealWeapon Inventory.InterHubAmount 2; Weapon.UpSound "automag/select"; Weapon.SlotNumber 2; - Weapon.SelectionOrder 2; + Weapon.SelectionOrder 2800; Weapon.SlotPriority 1; Weapon.AmmoType "UMiniAmmo"; Weapon.AmmoUse 1; @@ -312,9 +326,13 @@ Class Automag : UnrealWeapon Ready: AUTS A 0 { + invoker.slaveclipout = invoker.clipout = false; invoker.slavedown = false; if ( !invoker.slaveactive && (CountInv("Automag") > 1) ) + { + invoker.slavespin = invoker.slavereload = invoker.slaverefire = 0; A_Overlay(2,"LeftReady"); + } } AUTS ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE); AUS2 ABCD 1 A_WeaponReady(WRF_NOFIRE); @@ -347,20 +365,19 @@ Class Automag : UnrealWeapon { A_CheckReload(); 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 if ( ((invoker.clipcount < invoker.default.clipcount) || (invoker.slaveclipcount < invoker.default.slaveclipcount)) && (invoker.Ammo1.Amount > 0) ) A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM); else A_WeaponReady(WRF_ALLOWZOOM); - if ( !invoker.slaveactive && (CountInv("Automag") > 1) ) A_Overlay(2,"LeftReady"); + if ( !invoker.slaveactive && (CountInv("Automag") > 1) ) + { + invoker.slavespin = invoker.slavereload = invoker.slaverefire = 0; + A_Overlay(2,"LeftReady"); + } } Wait; LeftDummy: TNT1 A 1 { - if ( health <= 0 ) - { - invoker.slaveactive = false; - player.SetPSprite(2,ResolveState("LeftDeselect")); - } - else if ( invoker.slavereload ) player.SetPSprite(2,ResolveState("LeftReload")); + if ( invoker.slavereload ) player.SetPSprite(2,ResolveState("LeftReload")); else if ( invoker.slavedown ) player.SetPSprite(2,ResolveState("LeftDeselect")); else if ( invoker.slavespin ) player.SetPSprite(2,ResolveState("LeftZoom")); else A_LeftWeaponReady(); @@ -474,17 +491,16 @@ Class Automag : UnrealWeapon Reload: AUTR A 0 { - if ( invoker.clipcount>=min(invoker.default.clipcount,invoker.Ammo1.Amount) ) + if ( invoker.clipcount >= invoker.default.clipcount ) { - invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)))||(invoker.slaveclipcount <= 0); + invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount0)); return ResolveState("Idle"); } return ResolveState(null); } AUTR A 0 { - invoker.special1 = min(invoker.default.clipcount,invoker.Ammo1.Amount)-invoker.clipcount; - invoker.clipcount = -1; + invoker.clipout = true; A_Overlay(-9999,null); A_PlaySound("automag/click",CHAN_WEAPON,!Dampener.Active(self)?1.:.1); } @@ -492,25 +508,26 @@ Class Automag : UnrealWeapon AUTD ABCD 1; AUTD E 30 { - invoker.clipcount = Min(invoker.default.clipcount,invoker.Ammo1.Amount); - invoker.Ammo1.Amount -= invoker.special1; + invoker.clipout = false; + let aadd = min(invoker.Ammo1.Amount,invoker.default.clipcount-invoker.clipcount); + invoker.clipcount += aadd; + invoker.Ammo1.Amount -= aadd; A_PlaySound("automag/reload",CHAN_WEAPON,!Dampener.Active(self)?1.:.1); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); - invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)))||(invoker.slaveclipcount <= 0); + invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount0)); } AUTS A 0 A_PlaySound("automag/select",CHAN_WEAPON,!Dampener.Active(self)?1.:.1); Goto Ready; LeftReload: 2UTR A 0 { - if ( invoker.slaveclipcount>=min(invoker.default.slaveclipcount,invoker.Ammo1.Amount) ) + if ( invoker.slaveclipcount >= invoker.default.slaveclipcount ) { invoker.slavereload = 0; return ResolveState("LeftIdle"); } - invoker.special2 = min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)-invoker.slaveclipcount; - invoker.slaveclipcount = -1; + invoker.slaveclipout = true; A_Overlay(-9998,null); A_PlaySound("automag/click",CHAN_6,!Dampener.Active(self)?1.:.1); return ResolveState(null); @@ -519,8 +536,10 @@ Class Automag : UnrealWeapon 2UTD ABCD 1; 2UTD E 30 { - invoker.slaveclipcount = Min(invoker.default.slaveclipcount,invoker.Ammo1.Amount); - invoker.Ammo1.Amount -= invoker.special2; + invoker.slaveclipout = false; + let aadd = min(invoker.Ammo1.Amount,invoker.default.slaveclipcount-invoker.slaveclipcount); + invoker.slaveclipcount += aadd; + 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 04dbcd9..d4670bd 100644 --- a/zscript/betamag.zsc +++ b/zscript/betamag.zsc @@ -115,7 +115,7 @@ Class Betamag : UnrealWeapon { if ( d.HitType == TRACE_HitActor ) { - int dmg = Random[Betamag](1,10)<<1; + int dmg = 15; dmg = d.HitActor.DamageMobj(invoker,self,dmg,'Melee',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x)); UTMainHandler.DoKnockback(d.HitActor,d.HitDir,35000); if ( d.HitActor.player ) d.HitActor.A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.25); @@ -244,7 +244,21 @@ Class Betamag : UnrealWeapon override void OwnerDied() { Super.OwnerDied(); - slaverefire = 0; + slavespin = slavewhip = slaverefire = 0; + if ( Owner.player.ReadyWeapon != self ) return; + let psp = Owner.player.FindPSprite(2); + if ( psp ) + { + slaveactive = false; + Owner.player.SetPSprite(2,ResolveState("LeftDeselect")); + } + } + override void DoEffect() + { + Super.DoEffect(); + if ( Ammo1.Amount <= 0 ) SelectionOrder = 6800; + else if ( Amount > 1 ) SelectionOrder = 2200; + else SelectionOrder = default.SelectionOrder; } override void Tick() { @@ -275,7 +289,7 @@ Class Betamag : UnrealWeapon Inventory.InterHubAmount 2; Weapon.UpSound "betamag/select"; Weapon.SlotNumber 2; - Weapon.SelectionOrder 1; + Weapon.SelectionOrder 3000; Weapon.SlotPriority 0.9; Weapon.AmmoType "UMiniAmmo"; Weapon.AmmoUse 1; @@ -301,7 +315,10 @@ Class Betamag : UnrealWeapon { invoker.slavedown = false; if ( !invoker.slaveactive && (CountInv("Betamag") > 1) ) + { + invoker.slavespin = invoker.slavewhip = invoker.slaverefire = 0; player.setpsprite(2,ResolveState("LeftReady")); + } } AUTS ABCDEFGHIJK 2 A_WeaponReady(WRF_NOFIRE); Idle: @@ -334,18 +351,16 @@ Class Betamag : UnrealWeapon { A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM); if ( !invoker.slaveactive && (CountInv("Betamag") > 1) ) + { + invoker.slavespin = invoker.slavewhip = invoker.slaverefire = 0; player.setpsprite(2,ResolveState("LeftReady")); + } } Wait; LeftDummy: TNT1 A 1 { - if ( health <= 0 ) - { - invoker.slaveactive = false; - player.setpsprite(2,ResolveState("LeftDeselect")); - } - else if ( invoker.slavedown ) player.setpsprite(2,ResolveState("LeftDeselect")); + if ( invoker.slavedown ) player.setpsprite(2,ResolveState("LeftDeselect")); else if ( invoker.slavewhip ) player.setpsprite(2,ResolveState("LeftReload")); else if ( invoker.slavespin ) player.setpsprite(2,ResolveState("LeftZoom")); else A_LeftWeaponReady(); diff --git a/zscript/biggun.zsc b/zscript/biggun.zsc index 6b843b3..379e126 100644 --- a/zscript/biggun.zsc +++ b/zscript/biggun.zsc @@ -230,6 +230,7 @@ Class BigCasing : UTCasing Class BigGun : UnrealWeapon { int ClipCount; + bool ClipOut; BigTracer t; property ClipCount : ClipCount; @@ -277,7 +278,7 @@ Class BigGun : UnrealWeapon } override int, int, bool, bool GetClipAmount() { - return ClipCount, -1, (ClipCount<2), false; + return ClipOut?-1:ClipCount, -1, (ClipCount<2), false; } override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount ) { @@ -393,7 +394,7 @@ Class BigGun : UnrealWeapon Inventory.PickupMessage "$I_BIGGUN"; Weapon.UpSound "big/select"; Weapon.SlotNumber 9; - Weapon.SelectionOrder 0; + Weapon.SelectionOrder 50; Weapon.SlotPriority 0.8; Weapon.AmmoType "BigAmmo"; Weapon.AmmoUse 1; @@ -419,6 +420,7 @@ Class BigGun : UnrealWeapon Ready: BIGS A 0 { + invoker.clipout = false; UTMainHandler.DoSwing(self,(FRandom[BigGun](-0.3,-0.2),FRandom[BigGun](0.4,0.5)),3,0,6,SWING_Spring,2,1.8); } BIGS ABC 2 A_WeaponReady(WRF_NOFIRE); @@ -517,8 +519,7 @@ Class BigGun : UnrealWeapon BIGR M 2 { UTMainHandler.DoSwing(self,(FRandom[BigGun](0.3,0.4),FRandom[BigGun](0.6,0.8)),6,0,3,SWING_Spring,2,3); - invoker.special1 = min(invoker.ammo1.amount,invoker.default.clipcount)-invoker.clipcount; - invoker.clipcount = -1; + invoker.clipout = true; A_QuakeEx(2,2,2,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollintensity:0.18); A_PlaySound("big/punch",CHAN_WEAPON,Dampener.Active(self)?.3:1.); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); @@ -528,8 +529,10 @@ Class BigGun : UnrealWeapon BIR2 G 2 { UTMainHandler.DoSwing(self,(FRandom[BigGun](0.2,0.3),FRandom[BigGun](0.3,0.5)),6,0,3,SWING_Spring,2,3); - invoker.clipcount = min(invoker.ammo1.amount,invoker.default.clipcount); - invoker.Ammo1.Amount -= invoker.special1; + invoker.clipout = false; + let aadd = min(invoker.ammo1.amount,invoker.default.clipcount-invoker.clipcount); + invoker.clipcount += aadd; + 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 2f0c758..7dcbcdb 100644 --- a/zscript/bonesaw.zsc +++ b/zscript/bonesaw.zsc @@ -97,12 +97,12 @@ Class Bonesaw : UnrealWeapon if ( invoker.special1 < 5 ) return; invoker.special1 = 0; invoker.FireEffect(); - for ( int i=0; i<8; i++ ) if ( TryHit(angle+i*(45./16),5) || TryHit(angle-i*(45./16),5) ) return; + for ( int i=0; i<8; i++ ) if ( TryHit(angle+i*(45./16),6) || TryHit(angle-i*(45./16),6) ) return; } action void A_Clamp() { invoker.FireEffect(); - for ( int i=0; i<8; i++ ) if ( TryHit(angle+i*(45./16),20) || TryHit(angle-i*(45./16),20) ) return; + for ( int i=0; i<8; i++ ) if ( TryHit(angle+i*(45./16),30) || TryHit(angle-i*(45./16),30) ) return; } Default { @@ -110,11 +110,9 @@ Class Bonesaw : UnrealWeapon Inventory.PickupMessage "$I_RAZORCLAW"; Weapon.UpSound "bonesaw/select"; Weapon.SlotNumber 1; - Weapon.SelectionOrder 9; + Weapon.SelectionOrder 5500; Weapon.SlotPriority 0.9; +WEAPON.MELEEWEAPON; - +FORCEPAIN; - +NOEXTREMEDEATH; } States { diff --git a/zscript/dispersionpistol.zsc b/zscript/dispersionpistol.zsc index 5d2614a..87f972d 100644 --- a/zscript/dispersionpistol.zsc +++ b/zscript/dispersionpistol.zsc @@ -64,10 +64,9 @@ Class DefaultAmmo : Ammo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 50; } - override void Tick() + override void DoEffect() { Super.Tick(); - if ( !Owner ) return; rechargespeed = max(1.1,0.11*Amount); rechargephase += 1./rechargespeed; if ( rechargephase < 35 ) return; @@ -341,8 +340,8 @@ Class DispersionAmmo : Actor a = Spawn(invoker.ExploClass,pos); a.A_SetScale(min(0.8+invoker.mult*0.8,2.5)); if ( !bAMBUSH ) return; - UTMainHandler.DoBlast(self,120,6000); - A_Explode(GetMissileDamage(0,0),120); + UTMainHandler.DoBlast(self,80,6000); + A_Explode(GetMissileDamage(0,0),80); } override void PostBeginPlay() { @@ -478,9 +477,9 @@ Class DispersionPistol : UnrealWeapon { return bCharging?min(5,int(chargesize+0.1)):-1, -1, false, false; } - override void Tick() + override void DoEffect() { - Super.Tick(); + Super.DoEffect(); if ( MainUse < 1 ) MainUse = 1; if ( sting_dpistol ) ChargeUse = 1; else ChargeUse = max(1,MainUse/2); @@ -490,7 +489,7 @@ Class DispersionPistol : UnrealWeapon Weapon weap = Weapon(invoker); if ( !weap ) return; if ( weap.Ammo1.Amount <= 0 ) return; - DefaultAmmo(weap.Ammo1).rechargephase = 0; + DefaultAmmo(weap.Ammo1).rechargephase = ((weap.Ammo1.Amount>0)?0:30); A_PlaySound("dpistol/fire",CHAN_WEAPON,Dampener.Active(self)?.4:1.,pitch:1.2); double mult = Amplifier.GetMult(self,80); invoker.FireEffect(); @@ -569,7 +568,7 @@ Class DispersionPistol : UnrealWeapon invoker.bCharging = false; if ( self is 'UTPlayer' ) UTPlayer(self).PlayAttacking3(); - DefaultAmmo(weap.Ammo1).rechargephase = 0; + DefaultAmmo(weap.Ammo1).rechargephase = ((weap.Ammo1.Amount>0)?0:30); A_PlaySound("dpistol/altfire",CHAN_WEAPON,Dampener.Active(self)?.4:1.); double mult = Amplifier.GetMult(self,int(invoker.ChargeSize*50)+50); invoker.FireEffect(); @@ -636,25 +635,47 @@ Class DispersionPistol : UnrealWeapon ViewASMDSpark(s).vvel += (FRandom[ASMD](0.5,2.0),FRandom[ASMD](-1.5,1.5),FRandom[ASMD](-1.5,1.5)); } } - action bool A_DispCharge() + void UpdateSelectionOrder() + { + switch ( pendingupgrade ) + { + case 0: + SelectionOrder = default.SelectionOrder; + break; + case 1: + SelectionOrder = 6400; + break; + case 2: + SelectionOrder = 5000; + break; + case 3: + SelectionOrder = 2700; + break; + case 4: + default: + SelectionOrder = 1800; + break; + } + } + action State A_DispCharge( statelabel next ) { Weapon weap = Weapon(invoker); - if ( !weap ) return false; + if ( !weap ) return ResolveState(null); DefaultAmmo(weap.Ammo1).rechargephase = 0; UTMainHandler.DoSwing(self,(FRandom[DPistol](-1,1),FRandom[DPistol](-1,1)),0.02*invoker.chargesize,0,2,SWING_Spring); A_WeaponOffset(FRandom[DPistol](-1,1)*1.2*invoker.chargesize,32+FRandom[DPistol](-1,1)*1.2*invoker.chargesize); if ( !Dampener.Active(self) ) A_AlertMonsters(); invoker.chargesize += (2.-invoker.upgradelevel*0.15)/35.; invoker.count += 1./35.; - if ( invoker.count < 0.3 ) return false; + if ( invoker.count < 0.3 ) return ResolveState(null); invoker.count = 0; - if ( invoker.chargesize >= 5. ) return true; + if ( invoker.chargesize >= 5. ) return ResolveState(next); if ( !(sv_infiniteammo || (FindInventory('PowerInfiniteAmmo',true))) ) { - if ( weap.Ammo1.Amount < invoker.ChargeUse ) return true; + if ( weap.Ammo1.Amount < invoker.ChargeUse ) return ResolveState(next); weap.Ammo1.Amount -= invoker.ChargeUse; } - return false; + return ResolveState(null); } Default { @@ -662,13 +683,15 @@ Class DispersionPistol : UnrealWeapon Inventory.PickupMessage "$I_DPISTOL"; Weapon.UpSound "dpistol/select"; Weapon.SlotNumber 1; - Weapon.SelectionOrder 2; + Weapon.SelectionOrder 7700; Weapon.SlotPriority 1; Weapon.AmmoType "DefaultAmmo"; Weapon.AmmoUse 1; Weapon.AmmoType2 "DefaultAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 50; + Weapon.MinSelectionAmmo1 10; + Weapon.MinSelectionAmmo2 10; UTWeapon.DropAmmo 25; +WEAPON.WIMPY_WEAPON; } @@ -804,40 +827,40 @@ Class DispersionPistol : UnrealWeapon return ResolveState("AltFire5"); } AltFire1: - #### # 1 A_JumpIf(A_DispCharge(),2); - #### # 0 A_ReFire("AltFire1"); + #### # 1 A_DispCharge(1); + Wait; AltRelease1: #### # 3 A_DispAltFire(); DPF1 ABC 8; DPI1 A 6; Goto Idle; AltFire2: - #### # 1 A_JumpIf(A_DispCharge(),2); - #### # 0 A_ReFire("AltFire2"); + #### # 1 A_DispCharge(1); + Wait; AltRelease2: #### # 3 A_DispAltFire(); DPF2 ABC 8; DPI2 A 6; Goto Idle; AltFire3: - #### # 1 A_JumpIf(A_DispCharge(),2); - #### # 0 A_ReFire("AltFire3"); + #### # 1 A_DispCharge(1); + Wait; AltRelease3: #### # 3 A_DispAltFire(); DPF3 ABC 8; DPI3 A 6; Goto Idle; AltFire4: - #### # 1 A_JumpIf(A_DispCharge(),2); - #### # 0 A_ReFire("AltFire4"); + #### # 1 A_DispCharge(1); + Wait; AltRelease4: #### # 3 A_DispAltFire(); DPF4 ABC 8; DPI4 A 6; Goto Idle; AltFire5: - #### # 1 A_JumpIf(A_DispCharge(),2); - #### # 0 A_ReFire("AltFire5"); + #### # 1 A_DispCharge(1); + Wait; AltRelease5: #### # 3 A_DispAltFire(); DPF5 ABC 8; @@ -848,6 +871,7 @@ Class DispersionPistol : UnrealWeapon { A_Overlay(-9999,"Null"); invoker.MainUse = min(6,invoker.upgradelevel+1); + invoker.UpdateSelectionOrder(); invoker.upgradelevel++; if ( invoker.upgradelevel == 0 ) return ResolveState("Idle"); else if ( invoker.upgradelevel == 1 ) return ResolveState("Upgrade1"); diff --git a/zscript/flamegun.zsc b/zscript/flamegun.zsc index 30ead6c..fac3ed7 100644 --- a/zscript/flamegun.zsc +++ b/zscript/flamegun.zsc @@ -177,7 +177,7 @@ Class UFireball2 : UFireball { Radius 8; Height 8; - DamageFunction 50; + DamageFunction 60; Speed 5; UFireball.SpreadFactor 0.35; UFireball.NumSmokes 2; @@ -283,7 +283,7 @@ Class FlameGun : UnrealWeapon Inventory.PickupMessage "$I_FLAMEGUN"; Weapon.UpSound "flamegun/select"; Weapon.SlotNumber 5; - Weapon.SelectionOrder 2; + Weapon.SelectionOrder 1200; Weapon.SlotPriority 0.9; Weapon.AmmoType "FlameAmmo"; Weapon.AmmoUse 10; @@ -356,7 +356,8 @@ Class FlameGun : UnrealWeapon TNT1 A 1 { A_CheckReload(); - A_WeaponReady(); + if ( invoker.Ammo1.Amount >= 30 ) A_WeaponReady(); + else A_WeaponReady(WRF_NOSECONDARY); } Wait; Idle: diff --git a/zscript/gatling.zsc b/zscript/gatling.zsc index 3fe33f9..ad4c027 100644 --- a/zscript/gatling.zsc +++ b/zscript/gatling.zsc @@ -3,10 +3,10 @@ Class SMiniAmmo : Ammo Default { Inventory.Icon "I_SMini"; - Inventory.Amount 20; - Inventory.MaxAmount 30; + Inventory.Amount 32; + Inventory.MaxAmount 32; Ammo.BackpackAmount 0; - Ammo.BackpackMaxAmount 50; + Ammo.BackpackMaxAmount 64; } override bool TryPickup( in out Actor toucher ) { @@ -37,7 +37,7 @@ Class SMiniShell : FastProjectile { Obituary "$O_SMINI"; DamageType 'Shot'; - DamageFunction 150; + DamageFunction 300; Radius 4; Height 4; Speed 200; @@ -71,12 +71,12 @@ Class SMiniShell : FastProjectile A_AlertMonsters(); A_SetRenderStyle(1.0,STYLE_Add); A_NoGravity(); - A_Explode(150,50,XF_HURTSOURCE|XF_EXPLICITDAMAGETYPE,damagetype:'exploded'); + A_Explode(150,120,XF_HURTSOURCE|XF_EXPLICITDAMAGETYPE,damagetype:'exploded'); A_QuakeEx(4,4,4,10,0,250,"",QF_RELATIVE|QF_SCALEDOWN,falloff:120,rollintensity:0.2); A_PlaySound("smini/explode",CHAN_VOICE,pitch:FRandom[SMini](0.8,1.2)); A_SprayDecal("SmallRocketBlast"); - UTMainHandler.DoBlast(self,50,20000); - Scale *= FRandom[ExploS](0.8,1.1); + UTMainHandler.DoBlast(self,120,20000); + Scale *= FRandom[ExploS](1.4,1.8); Scale.x *= RandomPick[ExploS](-1,1); Scale.y *= RandomPick[ExploS](-1,1); Vector3 dir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch)); @@ -244,13 +244,13 @@ Class SMiniGun : UnrealWeapon Inventory.PickupMessage "$I_SMINI"; Weapon.UpSound "smini/select"; Weapon.SlotNumber 0; - Weapon.SelectionOrder 1; + Weapon.SelectionOrder 10; Weapon.SlotPriority 0.9; Weapon.AmmoType "SMiniAmmo"; Weapon.AmmoUse 1; Weapon.AmmoType2 "SMiniAmmo"; Weapon.AmmoUse2 1; - Weapon.AmmoGive 20; + Weapon.AmmoGive 32; Inventory.RespawnTics 2100; +INVENTORY.IGNORESKILL; UTWeapon.DropAmmo 4; diff --git a/zscript/impaler.zsc b/zscript/impaler.zsc index ce4f7ef..03fd463 100644 --- a/zscript/impaler.zsc +++ b/zscript/impaler.zsc @@ -267,21 +267,18 @@ Class ImpalerBolt : Actor if ( !(GetAge()%5) ) { UTMainHandler.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,500*specialf1**2); - t.hitlist[i].hitactor.DamageMobj(self,target,int(2*specialf1**3),'Impaler',DMG_THRUSTLESS); + t.hitlist[i].hitactor.DamageMobj(self,target,int(10*specialf1**1.5),'Impaler',DMG_THRUSTLESS); } if ( start.Hitlist.Find(t.HitList[i].HitActor) == start.HitList.Size() ) start.Hitlist.Push(t.HitList[i].HitActor); } // seeking - double closest = 500; + double closest = 500*specialf1; if ( tracer ) { - double closest = Distance3D(tracer); - if ( (closest > 500) || (tracer.Health <= 0) ) - { + double tdist = Distance3D(tracer); + if ( (tdist > closest) || (tracer.Health <= 0) ) tracer = null; - closest = 500; - } } let bt = BlockThingsIterator.Create(self,closest); while ( bt.Next() ) @@ -358,14 +355,14 @@ Class ImpalerBolt : Actor next.special2 = special2+1; next.specialf1 = max(1.,specialf1); next.oldx = dir; - next.bHITOWNER = true; + next.bHITOWNER = !sting_impself; } else { next.tracer = tracer; next.special1 = special1+1; next.specialf1 = max(1.,specialf1); - next.bHITOWNER = true; + next.bHITOWNER = !sting_impself; next.UpdateBeam(self,t.Results.HitPos+normal,dir); } if ( t.Results.HitType != TRACE_HitNone ) @@ -373,7 +370,6 @@ Class ImpalerBolt : Actor if ( !weffect ) weffect = Spawn("ImpalerBoltHit",t.Results.HitPos+normal*4); weffect.SetOrigin(t.Results.HitPos+normal*4,true); weffect.sprite = weffect.GetSpriteIndex('IHIT'); - } else if ( weffect ) weffect.Destroy(); return; @@ -547,9 +543,9 @@ Class ImpalerProjectile : Actor A_AlertMonsters(); A_SetRenderStyle(1.,STYLE_Add); A_NoGravity(); - A_Explode(50+special1/2,120+special1/5); - UTMainHandler.DoBlast(self,120+special1/5,40000); - A_QuakeEx(2,2,2,5,0,250+special1/5,"",QF_RELATIVE|QF_SCALEDOWN,falloff:120+special1/2,rollintensity:0.2); + A_Explode(50+special1/2,80+special1/5); + UTMainHandler.DoBlast(self,80+special1/5,40000); + A_QuakeEx(2,2,2,5,0,150+special1/5,"",QF_RELATIVE|QF_SCALEDOWN,falloff:80+special1/2,rollintensity:0.2); A_PlaySound("impaler/hit",CHAN_VOICE); A_SprayDecal("ShockMark",20); let l = Spawn("ImpalerBurstLight",pos); @@ -734,9 +730,10 @@ Class Impaler : UnrealWeapon if ( !(invoker.special1%15) ) { if ( invoker.ClipCount <= 0 ) return; + double mul = Amplifier.GetMult(self,10); if ( invoker.beam ) - invoker.beam.specialf1 = Amplifier.GetMult(self,10); - invoker.clipcount--; + invoker.beam.specialf1 = mul; + invoker.clipcount = max(0,invoker.clipcount-int(mul)); } invoker.FireEffect(); UTMainHandler.DoFlash(self,Color(16,255,32,255),3); @@ -836,6 +833,8 @@ Class Impaler : UnrealWeapon override void DoEffect() { Super.DoEffect(); + if ( (Ammo1.Amount <= 0) && (ClipCount <= 0) ) SelectionOrder = 6600; + else SelectionOrder = default.SelectionOrder; if ( Owner.player.ReadyWeapon != self ) return; if ( (Owner.waterlevel > 2) && !(level.maptime%5) ) ClipCount = max(0,ClipCount-1); @@ -853,7 +852,7 @@ Class Impaler : UnrealWeapon Inventory.PickupMessage "$I_IMPALER"; Weapon.UpSound "impaler/select"; Weapon.SlotNumber 7; - Weapon.SelectionOrder 0; + Weapon.SelectionOrder 700; Weapon.SlotPriority 0.9; Weapon.AmmoType "ImpalerAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/napalm.zsc b/zscript/napalm.zsc index 676e148..a9fd572 100644 --- a/zscript/napalm.zsc +++ b/zscript/napalm.zsc @@ -61,10 +61,7 @@ Class OnFire : Thinker if ( !(victim is 'UNapalm') ) { if ( !(level.maptime%3) ) - { amount--; - amount -= int(victim.vel.length()/10); - } if ( victim.player ) amount -= int(abs(actor.deltaangle(victim.angle,oangle))/30); oangle = victim.angle; } @@ -910,7 +907,7 @@ Class UFlamethrower : UnrealWeapon Inventory.PickupMessage "$I_FLAMETHROWER"; Weapon.UpSound "flamet/select"; Weapon.SlotNumber 6; - Weapon.SelectionOrder 4; + Weapon.SelectionOrder 300; Weapon.SlotPriority 0.9; Weapon.AmmoType "FlameAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/olsmp.zsc b/zscript/olsmp.zsc index ffe692e..f76a8f5 100644 --- a/zscript/olsmp.zsc +++ b/zscript/olsmp.zsc @@ -228,7 +228,7 @@ Class OLSMP : UnrealWeapon Inventory.PickupMessage "$I_OLSMP"; Weapon.UpSound "automag/select"; Weapon.SlotNumber 0; - Weapon.SelectionOrder 9; + Weapon.SelectionOrder 800; Weapon.SlotPriority 0.95; Weapon.AmmoType "OLSMPAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/peacemaker.zsc b/zscript/peacemaker.zsc index 4badc7e..36dc0dc 100644 --- a/zscript/peacemaker.zsc +++ b/zscript/peacemaker.zsc @@ -453,7 +453,7 @@ Class Peacemaker : UnrealWeapon Inventory.PickupMessage "$I_PEACE"; Weapon.UpSound "peace/select"; Weapon.SlotNumber 8; - Weapon.SelectionOrder 1; + Weapon.SelectionOrder 1050; Weapon.SlotPriority 0.9; Weapon.AmmoType "PeaceAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/quadshot.zsc b/zscript/quadshot.zsc index 6b7256c..08aa7a3 100644 --- a/zscript/quadshot.zsc +++ b/zscript/quadshot.zsc @@ -81,21 +81,22 @@ Class QuadshotTracer : LineTracer Class QuadShot : UnrealWeapon { - int ClipCount; + int ClipCount, HeldShells; + bool ClipOut; QuadshotTracer t; property ClipCount : ClipCount; override int, int, bool, bool GetClipAmount() { - return ClipCount, -1, (ClipCount<2), false; + return ClipOut?-1:ClipCount, -1, (ClipCount<2), false; } action void ProcessTraceHit( Linetracer t ) { if ( t.Results.HitType == TRACE_HitActor ) { - int dmg = Random[Quadshot](4,8); + int dmg = 11; FlakAccumulator.Accumulate(t.Results.HitActor,dmg,invoker,self,'shot'); double mm = 2400; UTMainHandler.DoKnockback(t.Results.HitActor,t.Results.HitVector+(0,0,0.025),mm*FRandom[Quadshot](0.4,1.2)); @@ -257,7 +258,7 @@ Class QuadShot : UnrealWeapon Inventory.PickupMessage "$I_QUADSHOT"; Weapon.UpSound "quadshot/select"; Weapon.SlotNumber 3; - Weapon.SelectionOrder 2; + Weapon.SelectionOrder 1400; Weapon.SlotPriority 0.9; Weapon.AmmoType "UShells"; Weapon.AmmoUse 1; @@ -279,6 +280,12 @@ Class QuadShot : UnrealWeapon QUAS A 1 A_Raise(int.max); Wait; Ready: + QUAS A 0 + { + invoker.clipout = false; + invoker.clipcount += invoker.heldshells; + invoker.heldshells = 0; + } QUAS ABCDEFGHIJK 2 A_WeaponReady(WRF_NOFIRE); Goto Idle; Dummy: @@ -288,7 +295,7 @@ Class QuadShot : UnrealWeapon if ( !A_QuadshotCheckForReload() ) { let weap = Weapon(invoker); - if ( invoker.clipcount < min(weap.Ammo1.Amount,invoker.default.clipcount) ) + if ( (invoker.clipcount < invoker.default.clipcount) && (invoker.Ammo1.Amount > 0) ) A_WeaponReady(WRF_ALLOWRELOAD); else A_WeaponReady(); } @@ -359,25 +366,25 @@ Class QuadShot : UnrealWeapon QUAR LMNOPQRSTU 1; QUAR V 0 { + invoker.clipout = true; 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; QUR2 ABCDEFGHIJKLMNOPQR 1; QUR2 S 0 { + invoker.clipout = false; + invoker.heldshells = invoker.clipcount; + invoker.clipcount = 0; A_PlaySound("quadshot/load",CHAN_6,Dampener.Active(self)?.1:1.); let weap = Weapon(invoker); - invoker.clipcount = 0; - if ( invoker.special1 > 0 ) + for ( int i=0; i<2; i++ ) { - 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 ( (invoker.clipcount >= 4) || (invoker.heldshells+weap.Ammo1.Amount <= 0) ) continue; + invoker.clipcount++; + if ( invoker.heldshells > 0 ) invoker.heldshells--; + else weap.Ammo1.Amount--; } if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); @@ -388,12 +395,12 @@ Class QuadShot : UnrealWeapon { A_PlaySound("quadshot/load",CHAN_6,Dampener.Active(self)?.1:1.); let weap = Weapon(invoker); - if ( invoker.special1 > 0 ) + for ( int i=0; i<2; i++ ) { - 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 ( (invoker.clipcount >= 4) || (invoker.heldshells+weap.Ammo1.Amount <= 0) ) continue; + invoker.clipcount++; + if ( invoker.heldshells > 0 ) invoker.heldshells--; + else weap.Ammo1.Amount--; } if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); diff --git a/zscript/razorjack.zsc b/zscript/razorjack.zsc index 475b58f..3256ce7 100644 --- a/zscript/razorjack.zsc +++ b/zscript/razorjack.zsc @@ -34,7 +34,7 @@ Class RazorBlade : Actor Radius 2; Height 2; Speed 25; - DamageFunction (int((30+special1*5)*((DamageType=='Decapitated')?3.5:1.0))); + DamageFunction (int((30+special1*10)*((DamageType=='Decapitated')?3.5:1.0))); DamageType 'Shredded'; Obituary "$O_RAZORJACK"; BounceType "Hexen"; @@ -269,7 +269,7 @@ Class Razorjack : UnrealWeapon Inventory.PickupMessage "$I_RAZORJACK"; Weapon.UpSound "ripper/select"; Weapon.SlotNumber 7; - Weapon.SelectionOrder 7; + Weapon.SelectionOrder 1500; Weapon.SlotPriority 1; Weapon.AmmoType "RazorAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/rifle.zsc b/zscript/rifle.zsc index 25fc341..9dddfc4 100644 --- a/zscript/rifle.zsc +++ b/zscript/rifle.zsc @@ -223,7 +223,7 @@ Class URifle : UnrealWeapon Inventory.PickupMessage "$I_RIFLE"; Weapon.UpSound "sniper/select"; Weapon.SlotNumber 9; - Weapon.SelectionOrder 9; + Weapon.SelectionOrder 900; Weapon.SlotPriority 1; Weapon.AmmoType "URifleAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/stinger.zsc b/zscript/stinger.zsc index 526bf57..21efc61 100644 --- a/zscript/stinger.zsc +++ b/zscript/stinger.zsc @@ -515,7 +515,7 @@ Class Stinger : UnrealWeapon Inventory.PickupMessage "$I_STINGER"; Weapon.UpSound "stinger/select"; Weapon.SlotNumber 3; - Weapon.SelectionOrder 7; + Weapon.SelectionOrder 2500; Weapon.SlotPriority 1; Weapon.AmmoType "StingerAmmo"; Weapon.AmmoUse 1; @@ -599,12 +599,12 @@ Class Stinger : UnrealWeapon Actor p; double a, s; Vector3 dir; - for ( int i=0; i<4; i++ ) + for ( int i=0; i<5; i++ ) { if ( weap.Ammo1.Amount <= 0 ) return; if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return; a = FRandom[Stinger](0,360); - s = FRandom[Stinger](0,0.08); + s = FRandom[Stinger](0,(i>0)?.08:0.); // first shot always accurate dir = (x+y*cos(a)*s+z*sin(a)*s).unit(); p = Spawn("StingerProjectile",origin); p.angle = atan2(dir.y,dir.x); diff --git a/zscript/stunner.zsc b/zscript/stunner.zsc index 84f489c..7e0ff50 100644 --- a/zscript/stunner.zsc +++ b/zscript/stunner.zsc @@ -10,10 +10,9 @@ Class StunnerAmmo : Ammo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 50; } - override void Tick() + override void DoEffect() { Super.Tick(); - if ( !Owner ) return; rechargespeed = max(2.,.2*Amount); rechargephase += 1./rechargespeed; if ( rechargephase < 7 ) return; @@ -143,7 +142,7 @@ Class StunProj : Actor SetOrigin(t.Results.HitPos-t.Results.HitVector*4,false); StunExplode(); Actor a = t.Results.HitActor; - a.DamageMobj(self,target,max(1,int(1.1*specialf1)),'jolted',DMG_USEANGLE,atan2(t.Results.HitVector.y,t.Results.HitVector.x)); + a.DamageMobj(self,target,max(1,int(4*specialf1)),'jolted',DMG_USEANGLE,atan2(t.Results.HitVector.y,t.Results.HitVector.x)); if ( !a.bDONTTHRUST ) { UTMainHandler.DoKnockback(a,t.Results.HitVector,(bAMBUSH?-22000:26000)*specialf1); @@ -274,7 +273,7 @@ Class Stunner : UnrealWeapon override int, int, bool, bool GetClipAmount() { - return bCharging?min(6,int(chargesize)):-1, -1, false, false; + return bCharging?min(5,int(chargesize)):-1, -1, false, false; } action void A_StunnerFire() { @@ -284,7 +283,7 @@ Class Stunner : UnrealWeapon invoker.bCharging = false; if ( self is 'UTPlayer' ) UTPlayer(self).PlayAttacking3(); - StunnerAmmo(weap.Ammo1).rechargephase = 0; + StunnerAmmo(weap.Ammo1).rechargephase = ((weap.Ammo1.Amount>0)?0:5); A_PlaySound("stun/fire",CHAN_WEAPON,Dampener.Active(self)?.4:1.,pitch:1.2-invoker.chargesize*0.06); double mult = Amplifier.GetMult(self,int(invoker.ChargeSize*50)+50); invoker.FireEffect(); @@ -353,15 +352,15 @@ Class Stunner : UnrealWeapon UTMainHandler.DoSwing(self,(FRandom[Stunner](-1,1),FRandom[Stunner](-1,1)),0.02*invoker.chargesize,0,2,SWING_Spring); A_WeaponOffset(FRandom[Stunner](-1,1)*1.2*invoker.chargesize,32+FRandom[Stunner](-1,1)*1.2*invoker.chargesize); if ( !Dampener.Active(self) ) A_AlertMonsters(); - if ( invoker.chargesize >= 6. ) + if ( invoker.chargesize >= 5. ) { invoker.count += 1./35.; if ( invoker.count > 1.5 ) return ResolveState("Release"); return ResolveState(null); } - invoker.chargesize += 2./35.; - invoker.count += 1./35.; - if ( invoker.count < 0.14 ) return ResolveState(null); + invoker.chargesize += 2.4/35.; + invoker.count += 1.2/35.; + if ( invoker.count < 0.24 ) return ResolveState(null); invoker.count = 0; if ( !(sv_infiniteammo || (FindInventory('PowerInfiniteAmmo',true))) ) { @@ -378,7 +377,7 @@ Class Stunner : UnrealWeapon Inventory.PickupMessage "$I_STUNNER"; Weapon.UpSound "stun/select"; Weapon.SlotNumber 4; - Weapon.SelectionOrder 9; + Weapon.SelectionOrder 8000; Weapon.SlotPriority 0.9; Weapon.AmmoType "StunnerAmmo"; Weapon.AmmoUse 1; @@ -386,6 +385,7 @@ Class Stunner : UnrealWeapon Weapon.AmmoUse2 1; Weapon.AmmoGive 50; UTWeapon.DropAmmo 50; + +WEAPON.WIMPY_WEAPON; } States { diff --git a/zscript/ubiorifle.zsc b/zscript/ubiorifle.zsc index 122eac2..047eda8 100644 --- a/zscript/ubiorifle.zsc +++ b/zscript/ubiorifle.zsc @@ -669,7 +669,7 @@ Class UBioRifle : UnrealWeapon Inventory.PickupMessage "$I_BIORIFLE"; Weapon.UpSound "ges/select"; Weapon.SlotNumber 8; - Weapon.SelectionOrder 8; + Weapon.SelectionOrder 1300; Weapon.SlotPriority 1; Weapon.AmmoType "UBioAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/ueightball.zsc b/zscript/ueightball.zsc index 9d94002..2de13c8 100644 --- a/zscript/ueightball.zsc +++ b/zscript/ueightball.zsc @@ -196,7 +196,7 @@ Class URocket : Actor Death: TNT1 A 0 { - A_RocketExplode(100,200); + A_RocketExplode(100,120); return A_Jump(256,"Explo1","Explo2","Explo3","Explo4","Explo5"); } Explo1: @@ -284,7 +284,7 @@ Class UGrenade : URocket } Goto Spawn; Death: - TNT1 A 0 A_RocketExplode(120,200); + TNT1 A 0 A_RocketExplode(120,140); Goto Super::Death+1; } } @@ -498,7 +498,7 @@ Class Eightball : UnrealWeapon Inventory.PickupMessage "$I_EIGHTBALL"; Weapon.UpSound "utrl/select"; Weapon.SlotNumber 5; - Weapon.SelectionOrder 5; + Weapon.SelectionOrder 1000; Weapon.SlotPriority 1; Weapon.AmmoType "URocketAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/uflakcannon.zsc b/zscript/uflakcannon.zsc index b5eed97..75d3b30 100644 --- a/zscript/uflakcannon.zsc +++ b/zscript/uflakcannon.zsc @@ -290,7 +290,7 @@ Class UFlakCannon : UnrealWeapon Inventory.PickupMessage "$I_FLAKCANNON"; Weapon.UpSound "flak/select"; Weapon.SlotNumber 6; - Weapon.SelectionOrder 4; + Weapon.SelectionOrder 1100; Weapon.SlotPriority 1; Weapon.AmmoType "UFlakBox"; Weapon.AmmoUse 1; diff --git a/zscript/uminigun.zsc b/zscript/uminigun.zsc index eb5525c..40d0664 100644 --- a/zscript/uminigun.zsc +++ b/zscript/uminigun.zsc @@ -149,7 +149,7 @@ Class UMinigun : UnrealWeapon Inventory.PickupMessage "$I_MINIGUN"; Weapon.UpSound "minigun/select"; Weapon.SlotNumber 0; - Weapon.SelectionOrder 10; + Weapon.SelectionOrder 500; Weapon.SlotPriority 1; Weapon.AmmoType "UMiniAmmo"; Weapon.AmmoUse 1; diff --git a/zscript/unrealcommon.zsc b/zscript/unrealcommon.zsc index d11b703..c08fe29 100644 --- a/zscript/unrealcommon.zsc +++ b/zscript/unrealcommon.zsc @@ -203,6 +203,7 @@ Class UPlayer : UTPlayer { dsp.pendingupgrade = dsp.upgradelevel = 4; dsp.MainUse = min(6,dsp.upgradelevel+1); + dsp.UpdateSelectionOrder(); } } } @@ -255,6 +256,7 @@ Class UPlayer : UTPlayer override void PlayAttacking() { + if ( player.Health <= 0 ) return; // no animation if crouched if ( (player && (player.mo == self)) && (player.crouchdir == -1) ) return; // check weapon type diff --git a/zscript/utranslocator.zsc b/zscript/utranslocator.zsc index 23a5a82..158c11d 100644 --- a/zscript/utranslocator.zsc +++ b/zscript/utranslocator.zsc @@ -226,7 +226,7 @@ Class UTranslocator : UnrealWeapon Tag "$T_TELEGUN"; Inventory.PickupMessage "$I_TELEGUN"; Weapon.SlotNumber 1; - Weapon.SelectionOrder 1; + Weapon.SelectionOrder 9000; Weapon.SlotPriority 0.1; Weapon.AmmoType1 "UTranslocatorAmmo"; Weapon.AmmoUse1 1;