diff --git a/language.version b/language.version index 69425a2cd..8cdc6ccef 100644 --- a/language.version +++ b/language.version @@ -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-"; diff --git a/sndinfo.txt b/sndinfo.txt index e3a48b961..b801696ad 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -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 diff --git a/sounds/demolitionist/demodashregen.ogg b/sounds/demolitionist/demodashregen.ogg new file mode 100644 index 000000000..bba442a64 Binary files /dev/null and b/sounds/demolitionist/demodashregen.ogg differ diff --git a/sounds/demolitionist/demofuelregen.ogg b/sounds/demolitionist/demofuelregen.ogg new file mode 100644 index 000000000..54dc459bf Binary files /dev/null and b/sounds/demolitionist/demofuelregen.ogg differ diff --git a/sounds/demolitionist/demofuelregenend.ogg b/sounds/demolitionist/demofuelregenend.ogg new file mode 100644 index 000000000..51a4dfeb7 Binary files /dev/null and b/sounds/demolitionist/demofuelregenend.ogg differ diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 9e3a9543e..13064b4c3 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -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) diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index aec1a5144..ce0696178 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -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);