Improved responsiveness of Biorifle alt-fire.

Small tweaks to Biorifle glob.
Redude size of ANIMDEFS.
This commit is contained in:
Marisa the Magician 2019-02-02 20:40:35 +01:00
commit f506a0b6d4
2 changed files with 19 additions and 40 deletions

View file

@ -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;