Prevent misinterpretation of deep impact altfire.
This commit is contained in:
parent
edc342fc6b
commit
9cf984cea8
4 changed files with 21 additions and 5 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
[default]
|
[default]
|
||||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r122 \cu(Sat 22 Jan 17:06:49 CET 2022)\c-";
|
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r123 \cu(Sat 22 Jan 17:17:41 CET 2022)\c-";
|
||||||
SWWM_SHORTVER="\cw1.2pre r122 \cu(2022-01-22 17:06:49)\c-";
|
SWWM_SHORTVER="\cw1.2pre r123 \cu(2022-01-22 17:17:41)\c-";
|
||||||
|
|
|
||||||
|
|
@ -562,6 +562,7 @@ deepimpact/fire sounds/deepimpact/impfire.ogg
|
||||||
deepimpact/charge sounds/deepimpact/impaltcharge.ogg
|
deepimpact/charge sounds/deepimpact/impaltcharge.ogg
|
||||||
deepimpact/altfire sounds/deepimpact/impaltfire.ogg
|
deepimpact/altfire sounds/deepimpact/impaltfire.ogg
|
||||||
deepimpact/dryfire sounds/deepimpact/impdryfire.ogg
|
deepimpact/dryfire sounds/deepimpact/impdryfire.ogg
|
||||||
|
deepimpact/dryaltfire sounds/deepimpact/impdryaltfire.ogg
|
||||||
deepimpact/select sounds/deepimpact/impsel.ogg
|
deepimpact/select sounds/deepimpact/impsel.ogg
|
||||||
deepimpact/checkout sounds/deepimpact/impidle.ogg
|
deepimpact/checkout sounds/deepimpact/impidle.ogg
|
||||||
deepimpact/deselect sounds/deepimpact/impdown.ogg
|
deepimpact/deselect sounds/deepimpact/impdown.ogg
|
||||||
|
|
|
||||||
BIN
sounds/deepimpact/impdryaltfire.ogg
Normal file
BIN
sounds/deepimpact/impdryaltfire.ogg
Normal file
Binary file not shown.
|
|
@ -46,6 +46,7 @@ Class DeepImpact : SWWMWeapon
|
||||||
|
|
||||||
transient ui TextureID WeaponBox, AmmoBar;
|
transient ui TextureID WeaponBox, AmmoBar;
|
||||||
transient ui DynamicValueInterpolator ChargeInter;
|
transient ui DynamicValueInterpolator ChargeInter;
|
||||||
|
transient int failtime;
|
||||||
|
|
||||||
Property ClipCount : clipcount;
|
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);
|
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 chg = clamp(ChargeInter?ChargeInter.GetValue():clipcount,0,100);
|
||||||
int ct = int(((by-2)-(chg*50./100.))*hs);
|
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);
|
bool blinking = (failtime>gametic)&&((failtime-gametic)%8>=4);
|
||||||
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);
|
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()
|
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()
|
action void A_AltBullet()
|
||||||
{
|
{
|
||||||
let weap = Weapon(invoker);
|
let weap = Weapon(invoker);
|
||||||
|
|
@ -363,11 +371,18 @@ Class DeepImpact : SWWMWeapon
|
||||||
XZW2 STU 3;
|
XZW2 STU 3;
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
AltFire:
|
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 0 A_BeginCharge();
|
||||||
XZW2 A 1 A_ChargeUp();
|
XZW2 A 1 A_ChargeUp();
|
||||||
XZW2 V 1 A_ChargeUp();
|
XZW2 V 1 A_ChargeUp();
|
||||||
Wait;
|
Wait;
|
||||||
|
DryAltFire:
|
||||||
|
// the useless goddess
|
||||||
|
XZW2 A 2 A_DryAltFire();
|
||||||
|
XZW2 Q 4;
|
||||||
|
XZW2 U 5;
|
||||||
|
XZW2 A 2;
|
||||||
|
Goto Ready;
|
||||||
AltRelease:
|
AltRelease:
|
||||||
XZW2 V 1 A_AltBullet();
|
XZW2 V 1 A_AltBullet();
|
||||||
XZW2 W 1;
|
XZW2 W 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue