Try to fix jetpack sound getting stuck sometimes.
This commit is contained in:
parent
b8eb009f43
commit
0b589fa81f
3 changed files with 11 additions and 14 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r238 \cu(Fri 29 Jan 21:32:43 CET 2021)\c-";
|
||||
SWWM_SHORTVER="\cw0.9.11b-pre r238 \cu(2021-01-29 21:32:43)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r238 \cu(Fri 29 Jan 23:05:25 CET 2021)\c-";
|
||||
SWWM_SHORTVER="\cw0.9.11b-pre r238 \cu(2021-01-29 23:05:25)\c-";
|
||||
|
|
|
|||
|
|
@ -1032,6 +1032,7 @@ Class SWWMHandler : EventHandler
|
|||
c.Destroy();
|
||||
}
|
||||
// reset inventory (including unclearables) on forced pistol starts (must have visited at least one map, though)
|
||||
// known bug: the previous weapon will play its select sound regardless, this is ENTIRELY IMPOSSIBLE to fix
|
||||
if ( swwm_pistolstart && (s.lstats.Size() > 0) && ((s.lastcluster != level.cluster) || !(level.clusterflags&LevelLocals.CLUSTER_HUB)) )
|
||||
{
|
||||
if ( swwm_resetscore ) c.credits = c.hcredits = 0;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Class Demolitionist : PlayerPawn
|
|||
Vector3 dashdir;
|
||||
double dashfuel, dashboost;
|
||||
int dashcooldown, boostcooldown, fuelcooldown;
|
||||
bool dashsnd;
|
||||
bool sendtoground;
|
||||
bool key_reentrant;
|
||||
bool bInDefaultInventory;
|
||||
|
|
@ -803,14 +802,8 @@ Class Demolitionist : PlayerPawn
|
|||
boostcooldown = max(0,boostcooldown-1);
|
||||
if ( fuelcooldown <= 0 )
|
||||
dashfuel = min(default.dashfuel,dashfuel+clamp(dashfuel*.025,.1,3.));
|
||||
if ( (dashboost > 0.) && (isdashing || (isboosting && player.cmd.buttons&BT_JUMP)) )
|
||||
dashsnd = true;
|
||||
else
|
||||
{
|
||||
if ( dashsnd )
|
||||
A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
dashsnd = false;
|
||||
}
|
||||
if ( ((dashboost <= 0) || !(isdashing || (isboosting && player.cmd.buttons&BT_JUMP))) && IsActorPlayingSound(CHAN_JETPACK,"demolitionist/jet") )
|
||||
A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
PainChance = isdashing?0:255;
|
||||
if ( isdashing || (vel.length() > 50) )
|
||||
{
|
||||
|
|
@ -1197,8 +1190,8 @@ Class Demolitionist : PlayerPawn
|
|||
if ( !player || (player.mo != self) || (player.cheats&(CF_FROZEN|CF_TOTALLYFROZEN)) )
|
||||
{
|
||||
dashboost = 0.;
|
||||
if ( dashsnd ) A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
dashsnd = false;
|
||||
if ( IsActorPlayingSound(CHAN_JETPACK,"demolitionist/jet") )
|
||||
A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
Super.MovePlayer();
|
||||
return;
|
||||
}
|
||||
|
|
@ -1870,6 +1863,8 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
void A_DemoPain()
|
||||
{
|
||||
if ( IsActorPlayingSound(CHAN_JETPACK,"demolitionist/jet") )
|
||||
A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
if ( !myvoice ) myvoice = CVar.GetCVar('swwm_voicetype',player);
|
||||
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
|
||||
if ( lastdamage > 90 )
|
||||
|
|
@ -1896,6 +1891,8 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
void A_DemoScream()
|
||||
{
|
||||
if ( IsActorPlayingSound(CHAN_JETPACK,"demolitionist/jet") )
|
||||
A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
A_StopSound(CHAN_DEMOVOICE);
|
||||
if ( !myvoice ) myvoice = CVar.GetCVar('swwm_voicetype',player);
|
||||
if ( !mute ) mute = CVar.GetCVar('swwm_mutevoice',player);
|
||||
|
|
@ -2118,7 +2115,6 @@ Class Demolitionist : PlayerPawn
|
|||
fuelcooldown = 0.;
|
||||
dashcooldown = 0.;
|
||||
dashboost = 0.;
|
||||
dashsnd = false;
|
||||
// prevent sudden stomping if we were previously falling
|
||||
lastvelz = vel.z;
|
||||
// early cancel gestures
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue