From f64ee282acd965ce811c303b65f08d59a92f96ff Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 23 Oct 2023 17:11:24 +0100 Subject: [PATCH] Vape mode: Changes to behaviour - Only tunes that sync with the level will change in speed. This means it will not apply to jingles or Stereo Mode. - In Versus mode contexts, Vape Mode makes way for nightcore. - This is a roughly 15% increase, the inverse of the standard encore multiplication. --- src/music_tune.hpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/music_tune.hpp b/src/music_tune.hpp index 2b5880145..f1c59ec6d 100644 --- a/src/music_tune.hpp +++ b/src/music_tune.hpp @@ -16,6 +16,7 @@ #include "doomdef.h" #include "doomtype.h" +#include "k_boss.h" #include "music_detail.hpp" namespace srb2::music @@ -78,12 +79,21 @@ public: bool paused() const { return pause_.has_value(); } bool can_end() const { return end_ != INFTICS; } + // Slow level music down a bit in Encore. (Values are vibe-based. WE GET IT YOU VAPE) + const float encoremul = 0.86471f; + float speed() const { - // Slow level music down a bit in Encore. (Values are vibe-based. WE GET IT YOU VAPE) - if (encoremode && gamestate == GS_LEVEL) + // Sync is checked first because it's synced with the level context. Get it? + if (sync && encoremode && gamestate == GS_LEVEL) { - return 0.86471f; + if (K_CheckBossIntro()) + { + // In Versus, the vape makes you think you can start a nightcore YT channel + return (1.f/encoremul); + } + + return encoremul; } return 1.f;