diff --git a/zscript/flamegun.zsc b/zscript/flamegun.zsc index b202648..8f7c625 100644 --- a/zscript/flamegun.zsc +++ b/zscript/flamegun.zsc @@ -53,7 +53,7 @@ Class UFireball : Actor Default { DamageType 'Fire'; - DamageFunction 30; + DamageFunction 10; Radius 4; Height 4; Speed 15; @@ -121,7 +121,12 @@ Class UFireball : Actor { A_SetRenderStyle(1.,STYLE_Add); A_NoGravity(); - if ( !bAMBUSH ) + if ( bAMBUSH ) + { + A_Explode(GetMissileDamage(0,0),20); + UTMainHandler.DoBlast(self,20,3000); + } + else { A_PlaySound("flamegun/exp",CHAN_VOICE,pitch:1.2); Spawn("UFireLight",pos); @@ -177,7 +182,7 @@ Class UFireball2 : UFireball { Radius 8; Height 8; - DamageFunction 60; + DamageFunction 20; Speed 5; UFireball.SpreadFactor 0.35; UFireball.NumSmokes 2; @@ -388,7 +393,16 @@ Class FlameGun : UnrealWeapon } FGNF G 0 A_ClearRefire(); FGNF GHIJ 2; - FGNT A 0 A_PlaySound("flamegun/end",CHAN_6,Dampener.Active(self)?.1:1.); + FGNT A 0 + { + if ( invoker.CheckAmmo(0,false,true) && (waterlevel < 2) ) + A_Refire("Fire"); + } + FGNT A 0 + { + A_PlaySound("flamegun/end",CHAN_6,Dampener.Active(self)?.1:1.); + A_ClearRefire(); + } FGNT ABCDEFGHIJKLM 2; Goto Idle; Refire: diff --git a/zscript/impaler.zsc b/zscript/impaler.zsc index 196bce4..8721677 100644 --- a/zscript/impaler.zsc +++ b/zscript/impaler.zsc @@ -220,6 +220,11 @@ Class ImpalerBoltHit : Actor +NOTELEPORT; Scale 0.3; } + override void Tick() + { + Super.Tick(); + if ( !master ) Destroy(); + } States { Spawn: @@ -264,16 +269,16 @@ Class ImpalerBolt : Actor t.Trace(pos,cursector,x,beamsize,0); for ( int i=0; i 0 ) flags |= WRF_ALLOWRELOAD; + if ( (weap.Ammo1.Amount > 0) || (invoker.ClipCount > 0) ) flags |= WRF_ALLOWRELOAD; if ( invoker.HasGem && ((invoker.ClipCount <= 0) || (waterlevel >= 2)) ) flags |= WRF_NOSECONDARY; A_WeaponReady(flags); } diff --git a/zscript/napalm.zsc b/zscript/napalm.zsc index 563d3fa..17d4201 100644 --- a/zscript/napalm.zsc +++ b/zscript/napalm.zsc @@ -77,7 +77,7 @@ Class OnFire : Thinker { cnt = 10; if ( victim.bSHOOTABLE && (victim.Health > 0) && (amount > 0) ) - victim.DamageMobj(instigator.FindInventory("UFlamethrower"),instigator,max(1,int(amount*(victim.bBOSS?0.05:0.15))),'Fire',DMG_THRUSTLESS); + victim.DamageMobj(instigator.FindInventory("UFlamethrower"),instigator,clamp(int(amount*(victim.bBOSS?0.05:0.15)),1,20),'Fire',DMG_THRUSTLESS); if ( !victim ) { Destroy(); diff --git a/zscript/olsmp.zsc b/zscript/olsmp.zsc index f19e880..fe1572f 100644 --- a/zscript/olsmp.zsc +++ b/zscript/olsmp.zsc @@ -65,12 +65,13 @@ Class OLSMP : UnrealWeapon { int ClipCount; double AltAccuracy; + bool ClipOut; property ClipCount : ClipCount; override int, int, bool, bool GetClipAmount() { - return ClipCount, -1, (ClipCount<35), false; + return ClipOut?-1:ClipCount, -1, (ClipCount<35), false; } override bool TryPickup( in out Actor toucher ) { @@ -323,8 +324,7 @@ Class OLSMP : UnrealWeapon AUTR A 0 A_JumpIf(invoker.clipcount>=min(invoker.default.clipcount,invoker.Ammo1.Amount),"Idle"); 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_WeaponOffset(0,32); // fix sudden psprite lowering A_PlaySound("automag/click",CHAN_WEAPON,!Dampener.Active(self)?1.:.1,pitch:0.8); @@ -333,9 +333,10 @@ Class OLSMP : 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,pitch:0.8); if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); diff --git a/zscript/uminigun.zsc b/zscript/uminigun.zsc index aad2c8f..e8d1404 100644 --- a/zscript/uminigun.zsc +++ b/zscript/uminigun.zsc @@ -202,7 +202,7 @@ Class UMinigun : UnrealWeapon A_PlaySound("umini/fire",CHAN_WEAPON,Dampener.Active(self)?.1:1.,true); } MGNF ABCDEFGHIJKLMNO 1 A_FireBullet(false); - MGNF A 0 A_JumpIf(invoker.bAltFire,1); + MGNF A 0 A_JumpIf(player.cmd.buttons&BT_ALTATTACK,1); Goto Hold+1; AltHold: MGNA A 0 diff --git a/zscript/unrealcommon.zsc b/zscript/unrealcommon.zsc index a79a98a..3c1307c 100644 --- a/zscript/unrealcommon.zsc +++ b/zscript/unrealcommon.zsc @@ -919,7 +919,7 @@ Class UnrealMainHandler : EventHandler } else if ( (e.Replacee == 'Shotgun') || (e.Replacee == 'SuperShotgun') || (e.Replacee == 'Crossbow') ) { - if ( !Random[Replacements](0,3) ) + if ( !Random[Replacements](0,3) && (e.Replacee != 'SuperShotgun') ) { if ( !Random[Replacements](0,2) ) e.Replacement = 'Betamag'; else e.Replacement = 'Automag'; @@ -946,7 +946,7 @@ Class UnrealMainHandler : EventHandler { if ( !Random[Replacements](0,3) ) { - if ( !Random[Replacements](0,2) ) e.Replacement = 'UFlamethrower'; + if ( Random[Replacements](0,1) ) e.Replacement = 'UFlamethrower'; else e.Replacement = 'FlameGun'; } else if ( Random[Replacements](0,1) ) e.Replacement = 'UFlakCannon'; diff --git a/zscript/upowerups.zsc b/zscript/upowerups.zsc index c10a00b..12daa14 100644 --- a/zscript/upowerups.zsc +++ b/zscript/upowerups.zsc @@ -360,7 +360,7 @@ Class MotionDetector : UnrealInventory for ( int i=0; i 48. ) continue; @@ -389,7 +389,7 @@ Class MotionDetector : UnrealInventory else if ( !bActive && tracer ) tracer.Destroy(); if ( !bActive ) return; nearscan.Clear(); - let bi = BlockThingsIterator.Create(Owner,512); + let bi = BlockThingsIterator.Create(Owner,1024); while ( bi.Next() ) { if ( !bi.Thing || (bi.Thing == Owner) || !bi.Thing.bISMONSTER || bi.Thing.Health <= 0 ) continue;