From f506a0b6d41c06c01d728d7228de014f498eb248 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sat, 2 Feb 2019 20:40:35 +0100 Subject: [PATCH] Improved responsiveness of Biorifle alt-fire. Small tweaks to Biorifle glob. Redude size of ANIMDEFS. --- animdefs.txt | 38 ++------------------------------------ zscript/biorifle.zsc | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/animdefs.txt b/animdefs.txt index dfd7600..d3f182a 100644 --- a/animdefs.txt +++ b/animdefs.txt @@ -1,40 +1,6 @@ texture static1 allowdecals random - pic static1 tics 1 - pic static2 tics 1 - pic static3 tics 1 - pic static4 tics 1 + range static4 tics 1 texture invis00 - pic invis00 tics 2 - pic invis01 tics 2 - pic invis02 tics 2 - pic invis03 tics 2 - pic invis04 tics 2 - pic invis05 tics 2 - pic invis06 tics 2 - pic invis07 tics 2 - pic invis08 tics 2 - pic invis09 tics 2 - pic invis10 tics 2 - pic invis11 tics 2 - pic invis12 tics 2 - pic invis13 tics 2 - pic invis14 tics 2 - pic invis15 tics 2 - pic invis16 tics 2 - pic invis17 tics 2 - pic invis18 tics 2 - pic invis19 tics 2 - pic invis20 tics 2 - pic invis21 tics 2 - pic invis22 tics 2 - pic invis23 tics 2 - pic invis24 tics 2 - pic invis25 tics 2 - pic invis26 tics 2 - pic invis27 tics 2 - pic invis28 tics 2 - pic invis29 tics 2 - pic invis30 tics 2 - pic invis31 tics 2 + range invis31 tics 2 diff --git a/zscript/biorifle.zsc b/zscript/biorifle.zsc index 270dd3a..cde94a1 100644 --- a/zscript/biorifle.zsc +++ b/zscript/biorifle.zsc @@ -602,7 +602,7 @@ Class BioGlob : BioGel override void AlignSelf() { Super.AlignSelf(); - if ( !bAMBUSH ) numsplash = int(2*Scale.x)-1; + if ( !bAMBUSH && (Scale.x > 1) ) numsplash = int(2*Scale.x)-1; } override void Tick() { @@ -613,14 +613,15 @@ Class BioGlob : BioGel { if ( numsplash-- <= 0 ) return; Vector3 dir = (ofs+(FRandom[GES](-.8,.8),FRandom[GES](-.8,.8),FRandom[GES](-.8,.8))).unit(); + A_SetScale(scale.x-0.15); let d = Spawn("BioSplash",pos+ofs*4); d.target = target; d.master = self; d.scale *= FRandom[GES](0.5,0.7); d.angle = atan2(dir.y,dir.x); d.pitch = -asin(dir.z); - d.vel = (cos(d.angle)*cos(d.pitch),sin(d.angle)*cos(d.pitch),-sin(d.pitch))*d.speed*FRandom[GES](0.3,0.4); - d.vel.z -= 3; + d.vel = (cos(d.angle)*cos(d.pitch),sin(d.angle)*cos(d.pitch),-sin(d.pitch))*d.speed*FRandom[GES](0.4,0.6); + d.vel.z -= 2; } } } @@ -744,7 +745,14 @@ Class BioRifle : UTWeapon BIOF A 1 A_BioFire(); BIOF BCDEFGHI 1; Goto Idle; + AltCheck: + TNT1 A 1; + TNT1 A 0 A_JumpIf(player.cmd.buttons&BT_ALTATTACK,"AltCheck"); + TNT1 A 0 A_Overlay(PSP_WEAPON,"AltRelease"); + TNT1 A 1; + Wait; AltFire: + BIOC A 0 A_Overlay(-9999,"AltCheck"); BIOC A 4 A_BeginCharge(); BIOC B 5 A_ChargeUp(); BIOC CD 5; @@ -790,7 +798,12 @@ Class BioRifle : UTWeapon BIOM A 1; BIOM A 0 A_Refire("AltHeld"); AltRelease: - BIOE A 1 { invoker.charge = min(5.1,invoker.charge+0.1); } + BIOE A 1 + { + invoker.charge = min(5.1,invoker.charge+0.1); + A_Overlay(-9999,null); + A_WeaponOffset(0,32); // fix sudden psprite lowering + } BIOF A 2 A_BioFire(true); BIOF BCDEFGHI 2; Goto Idle;