From 694da44e1b7420bf5e34e6b4aa6b81d39d604584 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sun, 26 Jan 2020 02:55:35 +0100 Subject: [PATCH] Smol fixes/tweaks. - Try to stop voice lines from playing if player is dead. - Reduce spread of explodium gun. - Add +NOTELEPORT to some particle effects to fix some annoyances. - Fix first frame of player pain having the wrong duration, causing rapidly overlapping pain sounds. --- zscript/swwm_common.zsc | 5 +++-- zscript/swwm_player.zsc | 2 +- zscript/swwm_splode.zsc | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 31d5a9d05..8dddd3853 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -631,7 +631,8 @@ Class SWWMHandler : EventHandler if ( !mutevoice ) mutevoice = CVar.GetCVar('swwm_mutevoice',players[consoleplayer]); if ( onelinertic && (onelinertic < gametic) ) { - players[consoleplayer].mo.A_StartSound(onelinersnd,CHAN_DEMOVOICE,CHANF_LOCAL,1.,ATTN_NONE); + if ( players[consoleplayer].health > 0 ) + players[consoleplayer].mo.A_StartSound(onelinersnd,CHAN_DEMOVOICE,CHANF_LOCAL,1.,ATTN_NONE); onelinertic = 0; onelinerspan = 0; } @@ -738,7 +739,7 @@ Class SWWMHandler : EventHandler override void PostUiTick() { - if ( (gametic == onelinertic) && (oneliner != "") ) + if ( (gametic == onelinertic) && (oneliner != "") && (players[consoleplayer].health > 0) ) { let l = SWWMOneLiner.Make(oneliner,onelinerspan); StatusBar.AttachMessage(l,-3473); diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index e55706a43..7a9610b6c 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -545,7 +545,7 @@ Class Demolitionist : PlayerPawn Goto Spawn+1; Pain: // ouchy - XZW1 A 0 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),"CrouchPain"); + XZW1 A 1 A_JumpIf(player&&(player.mo==self)&&(player.crouchdir==-1),"CrouchPain"); XZW2 M 1 A_DemoPain(); XZW2 NOPQ 1; Goto Spawn+1; diff --git a/zscript/swwm_splode.zsc b/zscript/swwm_splode.zsc index 8199af400..1dee588e2 100644 --- a/zscript/swwm_splode.zsc +++ b/zscript/swwm_splode.zsc @@ -44,6 +44,7 @@ Class ExplodiumMagArm : Actor +MISSILE; +NODAMAGETHRUST; +FORCERADIUSDMG; + +NOTELEPORT; -NOGRAVITY; Gravity 0.35; BounceFactor 1.0; @@ -88,6 +89,7 @@ Class ExplodiumMagTrail : Actor +NOBLOCKMAP; +NOGRAVITY; +FORCEXYBILLBOARD; + +NOTELEPORT; Scale 1.1; } States @@ -234,6 +236,7 @@ Class ExplodiumBulletImpact : Actor +NODAMAGETHRUST; +FORCERADIUSDMG; +FORCEXYBILLBOARD; + +NOTELEPORT; } override void PostBeginPlay() { @@ -315,7 +318,7 @@ Class ExplodiumGun : SWWMWeapon Vector3 x, y, z, x2, y2, z2; [x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-2*z); - double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.003); + double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002); [x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll); Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit(); FLineTraceData d; @@ -385,7 +388,7 @@ Class ExplodiumGun : SWWMWeapon Vector3 x, y, z, x2, y2, z2; [x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*y-3*z); - double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.025); + double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005); [x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll); Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit(); let p = Spawn("ExplodiumMagProj",origin);