Prevent misinterpretation of deep impact altfire.

This commit is contained in:
Mari the Deer 2022-01-22 17:17:41 +01:00
commit 9cf984cea8
4 changed files with 21 additions and 5 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r122 \cu(Sat 22 Jan 17:06:49 CET 2022)\c-";
SWWM_SHORTVER="\cw1.2pre r122 \cu(2022-01-22 17:06:49)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r123 \cu(Sat 22 Jan 17:17:41 CET 2022)\c-";
SWWM_SHORTVER="\cw1.2pre r123 \cu(2022-01-22 17:17:41)\c-";

View file

@ -562,6 +562,7 @@ deepimpact/fire sounds/deepimpact/impfire.ogg
deepimpact/charge sounds/deepimpact/impaltcharge.ogg
deepimpact/altfire sounds/deepimpact/impaltfire.ogg
deepimpact/dryfire sounds/deepimpact/impdryfire.ogg
deepimpact/dryaltfire sounds/deepimpact/impdryaltfire.ogg
deepimpact/select sounds/deepimpact/impsel.ogg
deepimpact/checkout sounds/deepimpact/impidle.ogg
deepimpact/deselect sounds/deepimpact/impdown.ogg

Binary file not shown.

View file

@ -46,6 +46,7 @@ Class DeepImpact : SWWMWeapon
transient ui TextureID WeaponBox, AmmoBar;
transient ui DynamicValueInterpolator ChargeInter;
transient int failtime;
Property ClipCount : clipcount;
@ -56,8 +57,9 @@ Class DeepImpact : SWWMWeapon
Screen.DrawTexture(WeaponBox,false,bx-36,by-54,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
int chg = clamp(ChargeInter?ChargeInter.GetValue():clipcount,0,100);
int ct = int(((by-2)-(chg*50./100.))*hs);
Screen.DrawTexture(AmmoBar,false,bx-7,by-52,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipTop,ct);
Screen.DrawText(smallfont,Font.CR_FIRE,bx-35,by-12,String.Format("%3d%%",chg),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
bool blinking = (failtime>gametic)&&((failtime-gametic)%8>=4);
Screen.DrawTexture(AmmoBar,false,bx-7,by-52,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipTop,ct,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0));
Screen.DrawText(smallfont,Font.CR_FIRE,bx-35,by-12,String.Format("%3d%%",chg),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0));
}
override void HudTick()
@ -247,6 +249,12 @@ Class DeepImpact : SWWMWeapon
}
}
action void A_DryAltFire()
{
invoker.failtime = gametic+32;
A_StartSound("deepimpact/dryaltfire",CHAN_WEAPON,CHANF_OVERLAP);
}
action void A_AltBullet()
{
let weap = Weapon(invoker);
@ -363,11 +371,18 @@ Class DeepImpact : SWWMWeapon
XZW2 STU 3;
Goto Ready;
AltFire:
XZW2 A 0 A_JumpIf(invoker.ClipCount<100,"Reload");
XZW2 A 0 A_JumpIf(invoker.ClipCount<100,"DryAltFire");
XZW2 A 0 A_BeginCharge();
XZW2 A 1 A_ChargeUp();
XZW2 V 1 A_ChargeUp();
Wait;
DryAltFire:
// the useless goddess
XZW2 A 2 A_DryAltFire();
XZW2 Q 4;
XZW2 U 5;
XZW2 A 2;
Goto Ready;
AltRelease:
XZW2 V 1 A_AltBullet();
XZW2 W 1;