FINALLY implemented Fuel/Dash regen sounds.
This commit is contained in:
parent
e12bf46f5e
commit
cc0f5c01ba
7 changed files with 30 additions and 5 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r39 \cu(Tue 19 Apr 01:00:27 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r39 \cu(2022-04-19 01:00:27)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r39 \cu(Tue 19 Apr 18:40:23 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r39 \cu(2022-04-19 18:40:23)\c-";
|
||||
|
|
|
|||
|
|
@ -815,6 +815,9 @@ demolitionist/smooch sounds/demolitionist/demokiss.ogg
|
|||
demolitionist/blowkiss sounds/demolitionist/demoblow.ogg
|
||||
demolitionist/petting sounds/demolitionist/demopat.ogg
|
||||
demolitionist/knockout sounds/demolitionist/demoknockout.ogg
|
||||
demolitionist/dashregen sounds/demolitionist/demodashregen.ogg
|
||||
demolitionist/fuelregen sounds/demolitionist/demofuelregen.ogg
|
||||
demolitionist/fuelrgend sounds/demolitionist/demofuelregenend.ogg
|
||||
|
||||
$playersound demolitionist neutral *grunt DSEMPTY
|
||||
$playeralias demolitionist neutral *pain100 demolitionist/lopain
|
||||
|
|
|
|||
BIN
sounds/demolitionist/demodashregen.ogg
Normal file
BIN
sounds/demolitionist/demodashregen.ogg
Normal file
Binary file not shown.
BIN
sounds/demolitionist/demofuelregen.ogg
Normal file
BIN
sounds/demolitionist/demofuelregen.ogg
Normal file
Binary file not shown.
BIN
sounds/demolitionist/demofuelregenend.ogg
Normal file
BIN
sounds/demolitionist/demofuelregenend.ogg
Normal file
Binary file not shown.
|
|
@ -17,7 +17,8 @@ enum ESWWMGZChannels
|
|||
CHAN_AMBEXTRA = 63211, // player ambience when submerged
|
||||
CHAN_DEMOVOICEAUX = 63212, // extra channel to make oneliner voices louder
|
||||
CHAN_DEMOVOICEAUX2 = 63213, // how many more channels do I need???
|
||||
CHAN_DEMOVOICEAUX3 = 63214 // oh god, the loudening
|
||||
CHAN_DEMOVOICEAUX3 = 63214, // oh god, the loudening
|
||||
CHAN_FUELREGEN = 63215 // sound of fuel regenerating
|
||||
};
|
||||
|
||||
const FallbackTag = "AWESOME IT'S PENIS"; // used on tag processing, please don't mind the actual string used)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ Class Demolitionist : PlayerPawn
|
|||
Vector3 dashdir;
|
||||
double dashfuel, dashboost;
|
||||
int dashcooldown, boostcooldown, fuelcooldown;
|
||||
int dashlockst;
|
||||
bool fullfuel;
|
||||
bool sendtoground;
|
||||
bool key_reentrant;
|
||||
|
|
@ -426,6 +427,7 @@ Class Demolitionist : PlayerPawn
|
|||
mystats.fuelusage += fueluse;
|
||||
if ( !swwm_superfuel ) dashfuel = max(0.,dashfuel-dashboost);
|
||||
dashcooldown = min(40,max(10,int(dashcooldown*1.4)));
|
||||
dashlockst = clamp(dashcooldown/3,2,10);
|
||||
fuelcooldown = max(30,fuelcooldown);
|
||||
if ( (dashfuel <= 0.) && fullfuel )
|
||||
SWWMUtility.AchievementProgressInc("brake",1,player);
|
||||
|
|
@ -1171,18 +1173,37 @@ Class Demolitionist : PlayerPawn
|
|||
bool isdashing = InStateSequence(CurState,FindState("Dash"));
|
||||
bool isboosting = InStateSequence(CurState,FindState("Boost"));
|
||||
bNOFRICTION = (((waterlevel<2)&&(bFly&&!bFlyCheat&&!(player.cheats&CF_NOCLIP2)))||isdashing);
|
||||
if ( fuelcooldown == 1 ) A_StartSound("demolitionist/fuelregen",CHAN_FUELREGEN,CHANF_LOOP,.35,4.,.5);
|
||||
else if ( fuelcooldown > 1 ) A_StopSound(CHAN_FUELREGEN);
|
||||
fuelcooldown = max(0,fuelcooldown-1);
|
||||
dashcooldown = max(0,dashcooldown-1);
|
||||
boostcooldown = max(0,boostcooldown-1);
|
||||
if ( fuelcooldown <= 0 )
|
||||
if ( dashlockst > 0 )
|
||||
{
|
||||
dashlockst--;
|
||||
if ( dashlockst == 0 ) A_StartSound("demolitionist/dashregen",CHAN_BODY,CHANF_OVERLAP,.5,4.);
|
||||
}
|
||||
else dashcooldown = max(0,dashcooldown-1);
|
||||
boostcooldown = max(0,boostcooldown-1);
|
||||
if ( (fuelcooldown <= 0) && (dashfuel < default.dashfuel) )
|
||||
{
|
||||
A_SoundPitch(CHAN_FUELREGEN,.5+1.5*((dashfuel/default.dashfuel)**2.));
|
||||
double oldfuel = dashfuel;
|
||||
dashfuel = min(default.dashfuel,dashfuel+clamp(dashfuel*.025,.1,3.));
|
||||
// stops
|
||||
if ( (oldfuel < (default.dashfuel/24)) && (dashfuel >= default.dashfuel/24) )
|
||||
{
|
||||
fuelcooldown = 20;
|
||||
A_StartSound("demolitionist/fuelrgend",CHAN_BODY,CHANF_OVERLAP,.6,4.,.8);
|
||||
}
|
||||
else if ( (oldfuel < (default.dashfuel/12)) && (dashfuel >= default.dashfuel/12) )
|
||||
{
|
||||
fuelcooldown = 10;
|
||||
A_StartSound("demolitionist/fuelrgend",CHAN_BODY,CHANF_OVERLAP,.6,4.,.9);
|
||||
}
|
||||
if ( (oldfuel < dashfuel) && (dashfuel == default.dashfuel) )
|
||||
{
|
||||
A_StopSound(CHAN_FUELREGEN);
|
||||
A_StartSound("demolitionist/fuelrgend",CHAN_BODY,CHANF_OVERLAP,.6,4.);
|
||||
}
|
||||
}
|
||||
if ( ((dashboost <= 0) || !(isdashing || (isboosting && player.cmd.buttons&BT_JUMP))) && IsActorPlayingSound(CHAN_JETPACK,"demolitionist/jet") )
|
||||
A_StartSound("demolitionist/jetstop",CHAN_JETPACK);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue