From 118d9caad1abb32e3710458b1839b8f1033c1a3b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 28 Aug 2018 16:29:50 -0400 Subject: [PATCH 01/20] New voices - Following Oni's proposal. This means taunts are split into 2 types for offensive items and boost, 2 less hurt sounds, and there's another clip for using invincibility item (or whatever other powerful items we want to apply it to later; maybe size-down?) - Win/lose quotes are played at full volume for the person who said it. - A new sound effect plays when you hit someone with voices disabled. - Reduce amount of RNG being called from the vanilla P_Play[whatever]Sound functions - Added our skin sound constants to the dehacked list. - Unrelated: finish line sfx plays in splitscreen --- src/dehacked.c | 12 +++++++ src/f_finale.c | 4 +-- src/k_kart.c | 90 +++++++++++++++++++++++++------------------------- src/p_spec.c | 2 +- src/p_user.c | 17 ++++------ src/sounds.c | 19 ++++++----- src/sounds.h | 34 +++++++++++-------- 7 files changed, 97 insertions(+), 81 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 28f20332..e4baf095 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8038,6 +8038,18 @@ struct { {"SKSSKID",SKSSKID}, {"SKSGASP",SKSGASP}, {"SKSJUMP",SKSJUMP}, + // SRB2kart + {"SKSKWIN",SKSKWIN}, // Win quote + {"SKSKLOSE",SKSKLOSE}, // Lose quote + {"SKSKPAN1",SKSKPAN1}, // Pain + {"SKSKPAN2",SKSKPAN2}, + {"SKSKATK1",SKSKATK1}, // Offense item taunt + {"SKSKATK2",SKSKATK2}, + {"SKSKBST1",SKSKBST1}, // Boost item taunt + {"SKSKBST2",SKSKBST2}, + {"SKSKSLOW",SKSKSLOW}, // Overtake taunt + {"SKSKHITM",SKSKHITM}, // Hit confirm taunt + {"SKSKPOWR",SKSKPOWR}, // Power item taunt // 3D Floor/Fake Floor/FOF/whatever flags {"FF_EXISTS",FF_EXISTS}, ///< Always set, to check for validity. diff --git a/src/f_finale.c b/src/f_finale.c index ab79fa78..e4854988 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -308,8 +308,8 @@ static void F_IntroDrawScene(void) { // Need to use M_Random otherwise it always uses the same sound INT32 rskin = M_RandomKey(numskins); - UINT8 rtaunt = M_RandomKey(4); - sfxenum_t rsound = skins[rskin].soundsid[SKSPLTNT1+rtaunt]; + UINT8 rtaunt = M_RandomKey(2); + sfxenum_t rsound = skins[rskin].soundsid[SKSKBST1+rtaunt]; S_StartSound(NULL, rsound); } background = W_CachePatchName("KARTKREW", PU_CACHE); diff --git a/src/k_kart.c b/src/k_kart.c index da085225..c4490a9b 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1360,32 +1360,36 @@ static void K_RegularVoiceTimers(player_t *player) player->kartstuff[k_tauntvoices] = 4*TICRATE; } -static void K_PlayTauntSound(mobj_t *source) +static void K_PlayAttackTaunt(mobj_t *source) { -#if 1 - sfxenum_t pick = P_RandomKey(4); // Gotta roll the RNG every time this is called for sync reasons + sfxenum_t pick = P_RandomKey(2); // Gotta roll the RNG every time this is called for sync reasons boolean tasteful = (!source->player || !source->player->kartstuff[k_tauntvoices]); if (cv_kartvoices.value && (tasteful || cv_kartvoices.value == 2)) - S_StartSound(source, sfx_taunt1+pick); + S_StartSound(source, sfx_kattk1+pick); if (!tasteful) return; K_TauntVoiceTimers(source->player); -#else - if (source->player && source->player->kartstuff[k_tauntvoices]) // Prevents taunt sounds from playing every time the button is pressed +} + +static void K_PlayBoostTaunt(mobj_t *source) +{ + sfxenum_t pick = P_RandomKey(2); // Gotta roll the RNG every time this is called for sync reasons + boolean tasteful = (!source->player || !source->player->kartstuff[k_tauntvoices]); + + if (cv_kartvoices.value && (tasteful || cv_kartvoices.value == 2)) + S_StartSound(source, sfx_kbost1+pick); + + if (!tasteful) return; - S_StartSound(source, sfx_taunt1+P_RandomKey(4)); - K_TauntVoiceTimers(source->player); -#endif } static void K_PlayOvertakeSound(mobj_t *source) { -#if 1 boolean tasteful = (!source->player || !source->player->kartstuff[k_voices]); if (!G_RaceGametype()) // Only in race @@ -1396,33 +1400,28 @@ static void K_PlayOvertakeSound(mobj_t *source) return; if (cv_kartvoices.value && (tasteful || cv_kartvoices.value == 2)) - S_StartSound(source, sfx_slow); + S_StartSound(source, sfx_kslow); if (!tasteful) return; K_RegularVoiceTimers(source->player); -#else - if (source->player && source->player->kartstuff[k_voices]) // Prevents taunt sounds from playing every time the button is pressed - return; - - if (!G_RaceGametype()) // Only in race - return; - - // 4 seconds from before race begins, 10 seconds afterwards - if (leveltime < starttime+(10*TICRATE)) - return; - - S_StartSound(source, sfx_slow); - - K_RegularVoiceTimers(source->player); -#endif } static void K_PlayHitEmSound(mobj_t *source) { if (cv_kartvoices.value) - S_StartSound(source, sfx_hitem); + S_StartSound(source, sfx_khitem); + else + S_StartSound(source, sfx_s1c9); // The only lost gameplay functionality with voices disabled + + K_RegularVoiceTimers(source->player); +} + +static void K_PlayPowerGloatSound(mobj_t *source) +{ + if (cv_kartvoices.value) + S_StartSound(source, sfx_kgloat); K_RegularVoiceTimers(source->player); } @@ -2671,8 +2670,6 @@ void K_DoSneaker(player_t *player, boolean doPFlag) if (doPFlag) player->pflags |= PF_ATTACKDOWN; - - K_PlayTauntSound(player->mo); } static void K_DoShrink(player_t *player) @@ -2691,8 +2688,6 @@ static void K_DoShrink(player_t *player) && players[i].kartstuff[k_position] < player->kartstuff[k_position]) P_DamageMobj(players[i].mo, player->mo, player->mo, 64); } - - K_PlayTauntSound(player->mo); } static void K_DoSPB(player_t *victim, player_t *source) @@ -3765,7 +3760,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) else if (ATTACK_IS_DOWN && player->kartstuff[k_eggmanheld]) { K_ThrowKartItem(player, false, MT_FAKEITEM, -1, false); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); player->kartstuff[k_eggmanheld] = 0; K_CleanHnextList(player->mo); } @@ -3774,6 +3769,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) && player->kartstuff[k_rocketsneakertimer] > 1) { K_DoSneaker(player, true); + K_PlayBoostTaunt(player->mo); player->kartstuff[k_rocketsneakertimer] -= 5; if (player->kartstuff[k_rocketsneakertimer] < 1) player->kartstuff[k_rocketsneakertimer] = 1; @@ -3790,6 +3786,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO) { K_DoSneaker(player, true); + K_PlayBoostTaunt(player->mo); player->kartstuff[k_itemamount]--; } break; @@ -3798,6 +3795,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) && player->kartstuff[k_rocketsneakertimer] == 0) { K_DoSneaker(player, true); + K_PlayBoostTaunt(player->mo); player->kartstuff[k_rocketsneakertimer] = itemtime; player->kartstuff[k_itemamount]--; } @@ -3816,7 +3814,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) P_RestoreMusic(player); if (!cv_kartinvinsfx.value && !P_IsLocalPlayer(player)) S_StartSound(player->mo, sfx_kinvnc); - K_PlayTauntSound(player->mo); + K_PlayPowerGloatSound(player->mo); player->kartstuff[k_itemamount]--; } break; @@ -3827,7 +3825,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) mobj_t *mo; mobj_t *prev = player->mo; - //K_PlayTauntSound(player->mo); + //K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemheld] = 1; S_StartSound(player->mo, sfx_s254); @@ -3852,7 +3850,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) else if (ATTACK_IS_DOWN && player->kartstuff[k_itemheld]) // Banana x3 thrown { K_ThrowKartItem(player, false, MT_BANANA, -1, false); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemamount]--; K_UpdateHnextList(player); } @@ -3886,7 +3884,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) mobj_t *mo = NULL; mobj_t *prev = player->mo; - //K_PlayTauntSound(player->mo); + //K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemheld] = 1; S_StartSound(player->mo, sfx_s3k3a); @@ -3916,7 +3914,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) else if (ATTACK_IS_DOWN && player->kartstuff[k_itemheld]) // Orbinaut x3 thrown { K_ThrowKartItem(player, true, MT_ORBINAUT, 1, false); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemamount]--; K_UpdateHnextList(player); } @@ -3931,7 +3929,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) mobj_t *mo = NULL; mobj_t *prev = player->mo; - //K_PlayTauntSound(player->mo); + //K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemheld] = 1; S_StartSound(player->mo, sfx_s3k3a); @@ -3963,7 +3961,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) K_ThrowKartItem(player, true, MT_JAWZ, 1, false); else if (player->kartstuff[k_throwdir] == -1) // Throwing backward gives you a dud that doesn't home in K_ThrowKartItem(player, true, MT_JAWZ_DUD, -1, false); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemamount]--; K_UpdateHnextList(player); } @@ -3988,7 +3986,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) else if (ATTACK_IS_DOWN && player->kartstuff[k_itemheld]) { K_ThrowKartItem(player, false, MT_SSMINE, 1, true); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemamount]--; player->kartstuff[k_itemheld] = 0; K_CleanHnextList(player->mo); @@ -4000,7 +3998,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) player->kartstuff[k_itemamount]--; K_ThrowKartItem(player, true, MT_BALLHOG, 1, false); S_StartSound(player->mo, sfx_mario7); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); } break; case KITEM_SPB: @@ -4038,14 +4036,14 @@ void K_MoveKartPlayer(player_t *player, boolean onground) player->kartstuff[k_itemamount]--; - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); } break; case KITEM_GROW: if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO && player->kartstuff[k_growshrinktimer] <= 0) // Grow holds the item box hostage { - K_PlayTauntSound(player->mo); + K_PlayPowerGloatSound(player->mo); player->mo->scalespeed = FRACUNIT/TICRATE; player->mo->destscale = 3*(mapheaderinfo[gamemap-1]->mobj_scale)/2; if (cv_kartdebugshrink.value && !player->bot) @@ -4063,6 +4061,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { K_DoShrink(player); player->kartstuff[k_itemamount]--; + K_PlayPowerGloatSound(player->mo); } break; case KITEM_THUNDERSHIELD: @@ -4076,6 +4075,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { K_DoThunderShield(player); player->kartstuff[k_itemamount]--; + K_PlayAttackTaunt(player->mo); } break; case KITEM_HYUDORO: @@ -4089,7 +4089,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO && !player->kartstuff[k_pogospring]) { - K_PlayTauntSound(player->mo); + K_PlayBoostTaunt(player->mo); K_DoPogoSpring(player->mo, 32<kartstuff[k_pogospring] = 1; player->kartstuff[k_itemamount]--; @@ -4099,7 +4099,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO) { K_ThrowKartItem(player, false, MT_SINK, 1, true); - K_PlayTauntSound(player->mo); + K_PlayAttackTaunt(player->mo); player->kartstuff[k_itemamount]--; player->kartstuff[k_itemheld] = 0; } diff --git a/src/p_spec.c b/src/p_spec.c index 87894d05..103b31aa 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4231,7 +4231,7 @@ DoneSection2: if (player->laps >= (unsigned)cv_numlaps.value) { - if (!splitscreen && P_IsLocalPlayer(player)) + if (P_IsLocalPlayer(player)) S_StartSound(NULL, sfx_s3k6a); else if (player->kartstuff[k_position] == 1) S_StartSound(NULL, sfx_s253); diff --git a/src/p_user.c b/src/p_user.c index 53faf8f3..f5fd405c 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1120,27 +1120,22 @@ void P_PlayLivesJingle(player_t *player) void P_PlayRinglossSound(mobj_t *source) { - sfxenum_t key = P_RandomKey(4); + sfxenum_t key = P_RandomKey(2); if (cv_kartvoices.value) - S_StartSound(source, (mariomode) ? sfx_mario8 : sfx_altow1 + key); + S_StartSound(source, (mariomode) ? sfx_mario8 : sfx_khurt1 + key); else S_StartSound(source, sfx_slip); } void P_PlayDeathSound(mobj_t *source) { - sfxenum_t key = P_RandomKey(4); - if (cv_kartvoices.value) - S_StartSound(source, sfx_altdi1 + key); - else - S_StartSound(source, sfx_s3k35); + S_StartSound(source, sfx_s3k35); } void P_PlayVictorySound(mobj_t *source) { - sfxenum_t key = P_RandomKey(4); if (cv_kartvoices.value) - S_StartSound(source, sfx_victr1 + key); + S_StartSound(source, sfx_kwin); } // @@ -1736,9 +1731,9 @@ void P_DoPlayerExit(player_t *player) if (cv_kartvoices.value) { if (K_IsPlayerLosing(player)) - S_StartSound(player->mo, sfx_klose); + S_StartSound((P_IsLocalPlayer(player) ? player->mo : NULL), sfx_klose); else - S_StartSound(player->mo, sfx_kwin); + S_StartSound((P_IsLocalPlayer(player) ? player->mo : NULL), sfx_kwin); } player->exiting = 3*TICRATE; diff --git a/src/sounds.c b/src/sounds.c index 991941e0..3a739a94 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -814,14 +814,17 @@ sfxinfo_t S_sfx[NUMSFX] = {"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SRB2kart - Skin sounds - {"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR}, - {"klose", false, 64, 0, -1, NULL, 0, SKSLOSE, -1, LUMPERROR}, - {"slow", false, 128, 32, -1, NULL, 0, SKSSLOW, -1, LUMPERROR}, - {"taunt1", false, 64, 96, -1, NULL, 0, SKSPLTNT1, -1, LUMPERROR}, - {"taunt2", false, 64, 96, -1, NULL, 0, SKSPLTNT2, -1, LUMPERROR}, - {"taunt3", false, 64, 96, -1, NULL, 0, SKSPLTNT3, -1, LUMPERROR}, - {"taunt4", false, 64, 96, -1, NULL, 0, SKSPLTNT4, -1, LUMPERROR}, - {"hitem", false, 64, 32, -1, NULL, 0, SKSHITEM, -1, LUMPERROR}, + {"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, + {"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, + {"khurt1", false, 64, 96, -1, NULL, 0, SKSKPAN1, -1, LUMPERROR}, + {"khurt2", false, 64, 96, -1, NULL, 0, SKSKPAN2, -1, LUMPERROR}, + {"kattk1", false, 64, 96, -1, NULL, 0, SKSKATK1, -1, LUMPERROR}, + {"kattk2", false, 64, 96, -1, NULL, 0, SKSKATK2, -1, LUMPERROR}, + {"kbost1", false, 64, 96, -1, NULL, 0, SKSKBST1, -1, LUMPERROR}, + {"kbost2", false, 64, 96, -1, NULL, 0, SKSKBST2, -1, LUMPERROR}, + {"kslow", false, 128, 32, -1, NULL, 0, SKSKSLOW, -1, LUMPERROR}, + {"khitem", false, 64, 32, -1, NULL, 0, SKSKHITM, -1, LUMPERROR}, + {"kgloat", false, 64, 40, -1, NULL, 0, SKSKPOWR, -1, LUMPERROR}, // skin sounds free slots to add sounds at run time (Boris HACK!!!) // initialized to NULL diff --git a/src/sounds.h b/src/sounds.h index 2f073273..b9daad4e 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -39,14 +39,17 @@ typedef enum SKSGASP, SKSJUMP, // SRB2kart - SKSWIN, - SKSLOSE, - SKSSLOW, - SKSPLTNT1, - SKSPLTNT2, - SKSPLTNT3, - SKSPLTNT4, - SKSHITEM, + SKSKWIN, // Win quote + SKSKLOSE, // Lose quote + SKSKPAN1, // Pain + SKSKPAN2, + SKSKATK1, // Offense item taunt + SKSKATK2, + SKSKBST1, // Boost item taunt + SKSKBST2, + SKSKSLOW, // Overtake taunt + SKSKHITM, // Hit confirm taunt + SKSKPOWR, // Power item taunt NUMSKINSOUNDS } skinsound_t; @@ -887,12 +890,15 @@ typedef enum sfx_kwin, sfx_klose, - sfx_slow, - sfx_taunt1, - sfx_taunt2, - sfx_taunt3, - sfx_taunt4, - sfx_hitem, + sfx_kslow, + sfx_kattk1, + sfx_kattk2, + sfx_kbost1, + sfx_kbost2, + sfx_khurt1, + sfx_khurt2, + sfx_kgloat, + sfx_khitem, // free slots for S_AddSoundFx() at run-time -------------------- sfx_freeslot0, From 2564d2f017059352bd0a3ff2a8ee706a883701e6 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 28 Aug 2018 18:50:59 -0400 Subject: [PATCH 02/20] Wrong order here --- src/sounds.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sounds.h b/src/sounds.h index b9daad4e..b879e8e3 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -890,15 +890,15 @@ typedef enum sfx_kwin, sfx_klose, - sfx_kslow, + sfx_khurt1, + sfx_khurt2, sfx_kattk1, sfx_kattk2, sfx_kbost1, sfx_kbost2, - sfx_khurt1, - sfx_khurt2, - sfx_kgloat, + sfx_kslow, sfx_khitem, + sfx_kgloat, // free slots for S_AddSoundFx() at run-time -------------------- sfx_freeslot0, From a745417a3f87f4cbf1725850b6f01a753082c067 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 28 Aug 2018 22:50:53 -0400 Subject: [PATCH 03/20] This doesn't work 1.) I mixed it up, so opponent win/lose quotes would play globally instead of your own 2.) You can't even play skin-specific sounds globally, so it'd always be Sonic --- src/p_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index f5fd405c..d2395aab 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1731,9 +1731,9 @@ void P_DoPlayerExit(player_t *player) if (cv_kartvoices.value) { if (K_IsPlayerLosing(player)) - S_StartSound((P_IsLocalPlayer(player) ? player->mo : NULL), sfx_klose); + S_StartSound(player->mo, sfx_klose); else - S_StartSound((P_IsLocalPlayer(player) ? player->mo : NULL), sfx_kwin); + S_StartSound(player->mo, sfx_kwin); } player->exiting = 3*TICRATE; From 2cc07df3d2c6dace12271dc2dc284d6d939312f2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 7 Sep 2018 15:50:24 -0400 Subject: [PATCH 04/20] Minor tweakings - Win/lose quotes are only played for your player - Win, lose, and gloat lines are played from farther away --- src/p_user.c | 2 +- src/sounds.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index d2395aab..4600ca12 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1728,7 +1728,7 @@ void P_DoPlayerExit(player_t *player) else if (!countdown) countdown = cv_countdowntime.value*TICRATE + 1; // Use cv_countdowntime - if (cv_kartvoices.value) + if (cv_kartvoices.value && P_IsLocalPlayer(player)) { if (K_IsPlayerLosing(player)) S_StartSound(player->mo, sfx_klose); diff --git a/src/sounds.c b/src/sounds.c index 3a739a94..a672694d 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -814,8 +814,8 @@ sfxinfo_t S_sfx[NUMSFX] = {"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SRB2kart - Skin sounds - {"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, - {"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, + {"kwin", false, 64, 48, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, + {"klose", false, 64, 48, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, {"khurt1", false, 64, 96, -1, NULL, 0, SKSKPAN1, -1, LUMPERROR}, {"khurt2", false, 64, 96, -1, NULL, 0, SKSKPAN2, -1, LUMPERROR}, {"kattk1", false, 64, 96, -1, NULL, 0, SKSKATK1, -1, LUMPERROR}, @@ -824,7 +824,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"kbost2", false, 64, 96, -1, NULL, 0, SKSKBST2, -1, LUMPERROR}, {"kslow", false, 128, 32, -1, NULL, 0, SKSKSLOW, -1, LUMPERROR}, {"khitem", false, 64, 32, -1, NULL, 0, SKSKHITM, -1, LUMPERROR}, - {"kgloat", false, 64, 40, -1, NULL, 0, SKSKPOWR, -1, LUMPERROR}, + {"kgloat", false, 64, 48, -1, NULL, 0, SKSKPOWR, -1, LUMPERROR}, // skin sounds free slots to add sounds at run time (Boris HACK!!!) // initialized to NULL From f907a3c21567fdf0382b156e643936fafd1d5fab Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 7 Sep 2018 16:20:20 -0400 Subject: [PATCH 05/20] Speed pads always play a boost voice clip For the extra SA1 feel :P --- src/p_spec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/p_spec.c b/src/p_spec.c index 103b31aa..f67b3939 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3853,6 +3853,13 @@ DoneSection2: player->powers[pw_flashing] = TICRATE/3; S_StartSound(player->mo, sfx_spdpad); + + { + sfxenum_t pick = P_RandomKey(2); // Gotta roll the RNG every time this is called for sync reasons + if (cv_kartvoices.value) + S_StartSound(player->mo, sfx_kbost1+pick); + //K_TauntVoiceTimers(player); + } } break; From 6317ae59962a7baefafc200970ac7bf858e8ea6e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 7 Sep 2018 16:56:34 -0400 Subject: [PATCH 06/20] Okay do this correctly by doing a reacharound to grab the actual sfx id --- src/p_user.c | 23 ++++++++++++++++++++--- src/sounds.c | 4 ++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 4600ca12..240d0aee 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1730,10 +1730,27 @@ void P_DoPlayerExit(player_t *player) if (cv_kartvoices.value && P_IsLocalPlayer(player)) { - if (K_IsPlayerLosing(player)) - S_StartSound(player->mo, sfx_klose); + if (P_IsLocalPlayer(player)) + { + sfxenum_t sfx_id; + if (K_IsPlayerLosing(player)) + { + sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_klose].skinsound]; + S_StartSound(NULL, sfx_id); + } + else + { + sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_kwin].skinsound]; + S_StartSound(NULL, sfx_id); + } + } else - S_StartSound(player->mo, sfx_kwin); + { + if (K_IsPlayerLosing(player)) + S_StartSound(player->mo, sfx_klose); + else + S_StartSound(player->mo, sfx_kwin); + } } player->exiting = 3*TICRATE; diff --git a/src/sounds.c b/src/sounds.c index a672694d..2f772a69 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -814,8 +814,8 @@ sfxinfo_t S_sfx[NUMSFX] = {"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SRB2kart - Skin sounds - {"kwin", false, 64, 48, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, - {"klose", false, 64, 48, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, + {"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, + {"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, {"khurt1", false, 64, 96, -1, NULL, 0, SKSKPAN1, -1, LUMPERROR}, {"khurt2", false, 64, 96, -1, NULL, 0, SKSKPAN2, -1, LUMPERROR}, {"kattk1", false, 64, 96, -1, NULL, 0, SKSKATK1, -1, LUMPERROR}, From 250c61dd00019ec38575c97e5572d8001c1c9f9b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 13 Sep 2018 17:42:34 -0400 Subject: [PATCH 07/20] This is a sign Signpost with the face of the person in 1st falls down at a pre-determined location on race finish (or at the finishing player if none is found) --- src/dehacked.c | 1 + src/info.c | 42 +++++++++++++++++++++++++++++++++++------- src/info.h | 1 + src/p_mobj.c | 23 +++++++++++++++++++++++ src/p_spec.c | 27 +++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 7 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 54d87618..576695d0 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7218,6 +7218,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_BLUEDIAG", "MT_RANDOMITEM", "MT_RANDOMITEMPOP", + "MT_RINGSPARKLE", "MT_BOOSTFLAME", "MT_BOOSTSMOKE", diff --git a/src/info.c b/src/info.c index 47b9e2c7..89c9deb1 100644 --- a/src/info.c +++ b/src/info.c @@ -175,14 +175,15 @@ state_t states[NUMSTATES] = {SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY}, //S_OBJPLACE_DUMMY // 1-Up Box Sprites (uses player sprite) - {SPR_PLAY, 35, 2, {NULL}, 0, 16, S_PLAY_BOX2}, // S_PLAY_BOX1 + // Kart: default to signpost just to ensure there are no missing sprite errors... + {SPR_PLAY, 24, 2, {NULL}, 0, 16, S_PLAY_BOX2}, // S_PLAY_BOX1 {SPR_NULL, 0, 1, {NULL}, 0, 0, S_PLAY_BOX1}, // S_PLAY_BOX2 - {SPR_PLAY, 35, 4, {NULL}, 0, 4, S_PLAY_ICON2}, // S_PLAY_ICON1 + {SPR_PLAY, 24, 4, {NULL}, 0, 4, S_PLAY_ICON2}, // S_PLAY_ICON1 {SPR_NULL, 0, 12, {NULL}, 0, 0, S_PLAY_ICON3}, // S_PLAY_ICON2 - {SPR_PLAY, 35, 18, {NULL}, 0, 4, S_NULL}, // S_PLAY_ICON3 + {SPR_PLAY, 24, 18, {NULL}, 0, 4, S_NULL}, // S_PLAY_ICON3 // Level end sign (uses player sprite) - {SPR_PLAY, 34, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN + {SPR_PLAY, 24, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN // Blue Crawla {SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND @@ -1090,7 +1091,7 @@ state_t states[NUMSTATES] = {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN49}, // S_SIGN48 {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN50}, // S_SIGN49 {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN51}, // S_SIGN50 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN53}, // S_SIGN51 + {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN1}, // S_SIGN51 {SPR_SIGN, 3, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN52 Eggman {SPR_SIGN, 7, -1, {A_SignPlayer}, 0, 0, S_NULL}, // S_SIGN53 Blank @@ -5796,7 +5797,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = { // MT_SIGN 501, // doomednum - S_SIGN52, // spawnstate + S_INVISIBLE, // spawnstate 1000, // spawnhealth S_PLAY_SIGN, // seestate sfx_lvpass, // seesound @@ -5817,7 +5818,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 16, // mass 0, // damage sfx_None, // activesound - MF_NOCLIP|MF_SCENERY, // flags + MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags S_NULL // raisestate }, @@ -14402,6 +14403,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_RINGSPARKLE + -1, // doomednum + S_SPRK1, // spawnstate + 1, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 8, // speed + 14*FRACUNIT, // radius + 14*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, + { // MT_BOOSTFLAME -1, // doomednum S_BOOSTFLAME, // spawnstate diff --git a/src/info.h b/src/info.h index b359bef5..432b3456 100644 --- a/src/info.h +++ b/src/info.h @@ -4082,6 +4082,7 @@ typedef enum mobj_type MT_BLUEDIAG, MT_RANDOMITEM, MT_RANDOMITEMPOP, + MT_RINGSPARKLE, MT_BOOSTFLAME, MT_BOOSTSMOKE, diff --git a/src/p_mobj.c b/src/p_mobj.c index 2c311bee..93fd864f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1409,6 +1409,9 @@ fixed_t P_GetMobjGravity(mobj_t *mo) case MT_SINK: gravityadd = FixedMul(gravityadd, 5*FRACUNIT); // Double gravity break; + case MT_SIGN: + gravityadd /= 3; + break; default: break; } @@ -8282,6 +8285,26 @@ void P_MobjThinker(mobj_t *mobj) } } break; + case MT_SIGN: // Kart's unique sign behavior + if (mobj->movecount) + { + if (mobj->z <= mobj->movefactor) + { + P_SetMobjState(mobj, S_SIGN53); + //mobj->flags |= MF_NOGRAVITY; // ? + mobj->flags &= ~MF_NOCLIPHEIGHT; + mobj->movecount = 0; + } + else + { + P_SpawnMobj(mobj->x + (P_RandomRange(-32,32)<y + (P_RandomRange(-32,32)<z + (24<flags &= ~MF_NOGRAVITY; + } + } + break; //} case MT_TURRET: P_MobjCheckWater(mobj); diff --git a/src/p_spec.c b/src/p_spec.c index 9e3393ac..e32deb7f 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3227,6 +3227,11 @@ void P_SetupSignExit(player_t *player) if (thing->info->seesound) S_StartSound(thing, thing->info->seesound); + // SRB2Kart: Set sign spinning variables + thing->movefactor = thing->z; + thing->z += (512<movecount = 1; + ++numfound; } @@ -3252,8 +3257,29 @@ void P_SetupSignExit(player_t *player) if (thing->info->seesound) S_StartSound(thing, thing->info->seesound); + // SRB2Kart: Set sign spinning variables + thing->movefactor = thing->z; + thing->z += (512<movecount = 1; + ++numfound; } + + if (numfound) + return; + + // SRB2Kart: FINALLY, add in an alternative if no place is found + if (player->mo) + { + mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (512<target, player->mo); + P_SetMobjState(sign, S_SIGN1); + if (sign->info->seesound) + S_StartSound(sign, sign->info->seesound); + sign->movefactor = player->mo->z; + sign->movecount = 1; + } } // @@ -4239,6 +4265,7 @@ DoneSection2: S_StartSound(NULL, sfx_s253); P_DoPlayerExit(player); + P_SetupSignExit(player); } } break; From ce85c2b7bda1ce32a839808f460cb66f6231deb3 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 13 Sep 2018 19:13:43 -0400 Subject: [PATCH 08/20] Delay falling, longer exit timer --- src/p_inter.c | 2 +- src/p_mobj.c | 2 +- src/p_spec.c | 6 +++--- src/p_tick.c | 4 ++-- src/p_user.c | 16 ++++++++-------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 6f3685d6..68124671 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -694,7 +694,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!playeringame[i] || players[i].spectator) continue; - players[i].exiting = (14*TICRATE)/5 + 1; + players[i].exiting = (21*TICRATE)/5 + 1; } S_StartSound(NULL, sfx_lvpass); } diff --git a/src/p_mobj.c b/src/p_mobj.c index 93fd864f..38149f91 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1410,7 +1410,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) gravityadd = FixedMul(gravityadd, 5*FRACUNIT); // Double gravity break; case MT_SIGN: - gravityadd /= 3; + gravityadd /= 4; break; default: break; diff --git a/src/p_spec.c b/src/p_spec.c index e32deb7f..fc22c6bf 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3229,7 +3229,7 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (512<z += (640<movecount = 1; ++numfound; @@ -3259,7 +3259,7 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (512<z += (640<movecount = 1; ++numfound; @@ -3271,7 +3271,7 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: FINALLY, add in an alternative if no place is found if (player->mo) { - mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (512<mo->x, player->mo->y, player->mo->z + (640<target, player->mo); P_SetMobjState(sign, S_SIGN1); diff --git a/src/p_tick.c b/src/p_tick.c index b9aaccf7..4cfba90f 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -448,7 +448,7 @@ static inline void P_DoSpecialStageStuff(void) { if (playeringame[i]) { - players[i].exiting = (14*TICRATE)/5 + 1; + players[i].exiting = (21*TICRATE)/5 + 1; players[i].pflags &= ~PF_GLIDING; } @@ -485,7 +485,7 @@ static inline void P_DoSpecialStageStuff(void) if (playeringame[i]) { players[i].mo->momx = players[i].mo->momy = 0; - players[i].exiting = (14*TICRATE)/5 + 1; + players[i].exiting = (21*TICRATE)/5 + 1; } sstimer = 0; diff --git a/src/p_user.c b/src/p_user.c index f499b7ec..3120351c 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -673,7 +673,7 @@ static void P_DeNightserizePlayer(player_t *player) for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE) players[i].nightstime = 1; // force everyone else to fall too. - player->exiting = 3*TICRATE; + player->exiting = 6*TICRATE; stagefailed = true; // NIGHT OVER } @@ -1741,7 +1741,7 @@ void P_DoPlayerExit(player_t *player) S_StartSound(player->mo, sfx_kwin); } - player->exiting = 3*TICRATE; + player->exiting = 6*TICRATE; if (cv_inttime.value > 0) P_EndingMusic(player); @@ -1751,7 +1751,7 @@ void P_DoPlayerExit(player_t *player) //countdown2 = countdown + 8*TICRATE; if (P_CheckRacers()) - player->exiting = (14*TICRATE)/5 + 1; + player->exiting = (21*TICRATE)/5 + 1; } else if (G_BattleGametype()) // Battle Mode exiting { @@ -1759,7 +1759,7 @@ void P_DoPlayerExit(player_t *player) P_EndingMusic(player); } else - player->exiting = (14*TICRATE)/5 + 2; // Accidental death safeguard??? + player->exiting = (21*TICRATE)/5 + 2; // Accidental death safeguard??? //player->pflags &= ~PF_GLIDING; /* // SRB2kart - don't need @@ -6569,7 +6569,7 @@ static void P_MovePlayer(player_t *player) S_StartSound(NULL, sfx_s3k6a); for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i]) - players[i].exiting = (14*TICRATE)/5 + 1; + players[i].exiting = (21*TICRATE)/5 + 1; } else if (player->health > 1) P_DamageMobj(player->mo, NULL, NULL, 1); @@ -9037,8 +9037,8 @@ void P_PlayerThink(player_t *player) } } - if (i == MAXPLAYERS && player->exiting == 3*TICRATE) // finished - player->exiting = (14*TICRATE)/5 + 1; + if (i == MAXPLAYERS && player->exiting == 6*TICRATE) // finished + player->exiting = (21*TICRATE)/5 + 1; // If 10 seconds are left on the timer, // begin the drown music for countdown! @@ -9063,7 +9063,7 @@ void P_PlayerThink(player_t *player) // If it is set, start subtracting // Don't allow it to go back to 0 - if (player->exiting > 1 && (player->exiting < 3*TICRATE || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1" + if (player->exiting > 1 && (player->exiting < 6*TICRATE || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1" player->exiting--; if (player->exiting && countdown2) From 6c6ca1a11000c05f45496f311e5c25d157b5d431 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 13 Sep 2018 23:49:24 -0400 Subject: [PATCH 09/20] Bug fix --- src/p_spec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_spec.c b/src/p_spec.c index fc22c6bf..cba294e6 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3213,6 +3213,9 @@ void P_SetupSignExit(player_t *player) thinker_t *think; INT32 numfound = 0; + if (player->kartstuff[k_position] != 1) + return; + for (; node; node = node->m_thinglist_next) { thing = node->m_thing; From 06a4a5e4dc2ee6cc186d301dea750deb8b3163bf Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 21 Sep 2018 15:37:30 -0400 Subject: [PATCH 10/20] Prevent signs from disappearing --- src/p_mobj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 38149f91..9f16b778 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8291,6 +8291,7 @@ void P_MobjThinker(mobj_t *mobj) if (mobj->z <= mobj->movefactor) { P_SetMobjState(mobj, S_SIGN53); + mobj->z = mobj->movefactor; //mobj->flags |= MF_NOGRAVITY; // ? mobj->flags &= ~MF_NOCLIPHEIGHT; mobj->movecount = 0; From cb3c93e56e3be2990f5497f9b44432bb204812ba Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 21 Sep 2018 16:54:29 -0400 Subject: [PATCH 11/20] Minor adjustments to the endsign color back table --- src/k_kart.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index d923c5c9..7b38874c 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -128,13 +128,13 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_GREEN,8, // 14 // SKINCOLOR_RED SKINCOLOR_SAPPHIRE,8, // 15 // SKINCOLOR_RUBY SKINCOLOR_PINETREE,6, // 16 // SKINCOLOR_CRIMSON - SKINCOLOR_MUSTARD,6, // 17 // SKINCOLOR_KETCHUP + SKINCOLOR_MUSTARD,10, // 17 // SKINCOLOR_KETCHUP SKINCOLOR_DUSK,8, // 18 // SKINCOLOR_DAWN SKINCOLOR_PERIWINKLE,8, // 19 // SKINCOLOR_CREAMSICLE SKINCOLOR_BLUE,8, // 20 // SKINCOLOR_ORANGE SKINCOLOR_BLUEBERRY,8, // 21 // SKINCOLOR_PUMPKIN - SKINCOLOR_NAVY,8, // 22 // SKINCOLOR_ROSEWOOD - SKINCOLOR_JET,6, // 23 // SKINCOLOR_BURGUNDY + SKINCOLOR_NAVY,6, // 22 // SKINCOLOR_ROSEWOOD + SKINCOLOR_JET,8, // 23 // SKINCOLOR_BURGUNDY SKINCOLOR_LIME,8, // 24 // SKINCOLOR_TANGERINE SKINCOLOR_CYAN,8, // 25 // SKINCOLOR_PEACH SKINCOLOR_CERULEAN,8, // 26 // SKINCOLOR_CARAMEL @@ -144,36 +144,36 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_KETCHUP,8, // 30 // SKINCOLOR_MUSTARD SKINCOLOR_TEAL,8, // 31 // SKINCOLOR_OLIVE SKINCOLOR_ROBOHOOD,8, // 32 // SKINCOLOR_VOMIT - SKINCOLOR_LAVENDER,8, // 33 // SKINCOLOR_GARDEN + SKINCOLOR_LAVENDER,6, // 33 // SKINCOLOR_GARDEN SKINCOLOR_TANGERINE,8, // 34 // SKINCOLOR_LIME SKINCOLOR_POMEGRANATE,8, // 35 // SKINCOLOR_DREAM SKINCOLOR_SALMON,8, // 36 // SKINCOLOR_TEA - SKINCOLOR_PINK,8, // 37 // SKINCOLOR_PISTACHIO + SKINCOLOR_PINK,6, // 37 // SKINCOLOR_PISTACHIO SKINCOLOR_VOMIT,8, // 38 // SKINCOLOR_ROBOHOOD SKINCOLOR_ROSE,8, // 39 // SKINCOLOR_MOSS - SKINCOLOR_RASPBERRY,6, // 40 // SKINCOLOR_MINT + SKINCOLOR_RASPBERRY,8, // 40 // SKINCOLOR_MINT SKINCOLOR_RED,8, // 41 // SKINCOLOR_GREEN SKINCOLOR_CRIMSON,8, // 42 // SKINCOLOR_PINETREE SKINCOLOR_PURPLE,8, // 43 // SKINCOLOR_EMERALD - SKINCOLOR_BYZANTIUM,6, // 44 // SKINCOLOR_SWAMP + SKINCOLOR_BYZANTIUM,8, // 44 // SKINCOLOR_SWAMP SKINCOLOR_YELLOW,8, // 45 // SKINCOLOR_AQUA SKINCOLOR_OLIVE,8, // 46 // SKINCOLOR_TEAL SKINCOLOR_PEACH,8, // 47 // SKINCOLOR_CYAN - SKINCOLOR_LILAC,6, // 48 // SKINCOLOR_JAWZ + SKINCOLOR_LILAC,10, // 48 // SKINCOLOR_JAWZ SKINCOLOR_CARAMEL,8, // 49 // SKINCOLOR_CERULEAN SKINCOLOR_ROSEWOOD,8, // 50 // SKINCOLOR_NAVY - SKINCOLOR_GOLD,8, // 51 // SKINCOLOR_SLATE - SKINCOLOR_BRONZE,8, // 52 // SKINCOLOR_STEEL - SKINCOLOR_BURGUNDY,6, // 53 // SKINCOLOR_JET + SKINCOLOR_GOLD,10, // 51 // SKINCOLOR_SLATE + SKINCOLOR_BRONZE,10, // 52 // SKINCOLOR_STEEL + SKINCOLOR_BURGUNDY,8, // 53 // SKINCOLOR_JET SKINCOLOR_CREAMSICLE,8, // 54 // SKINCOLOR_PERIWINKLE SKINCOLOR_ORANGE,8, // 55 // SKINCOLOR_BLUE - SKINCOLOR_RUBY,8, // 56 // SKINCOLOR_SAPPHIRE + SKINCOLOR_RUBY,6, // 56 // SKINCOLOR_SAPPHIRE SKINCOLOR_PUMPKIN,8, // 57 // SKINCOLOR_BLUEBERRY - SKINCOLOR_DAWN,8, // 58 // SKINCOLOR_DUSK + SKINCOLOR_DAWN,6, // 58 // SKINCOLOR_DUSK SKINCOLOR_EMERALD,8, // 59 // SKINCOLOR_PURPLE - SKINCOLOR_GARDEN,8, // 60 // SKINCOLOR_LAVENDER + SKINCOLOR_GARDEN,6, // 60 // SKINCOLOR_LAVENDER SKINCOLOR_SWAMP,8, // 61 // SKINCOLOR_BYZANTIUM - SKINCOLOR_DREAM,6, // 62 // SKINCOLOR_POMEGRANATE + SKINCOLOR_DREAM,8, // 62 // SKINCOLOR_POMEGRANATE SKINCOLOR_JAWZ,6 // 63 // SKINCOLOR_LILAC }; From 3fa7f4e7b4cbd584c1f4e21f79a66e912675e8cc Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 21 Sep 2018 18:40:18 -0400 Subject: [PATCH 12/20] Address review - Reduced states - Metal Sonic on sign roulette - Landing sound - New falling sound --- src/dehacked.c | 34 +--------------------------------- src/info.c | 49 ++++++++----------------------------------------- src/info.h | 34 +--------------------------------- src/p_mobj.c | 4 +++- src/p_spec.c | 2 +- 5 files changed, 14 insertions(+), 109 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 43c9c78b..4cde7882 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -4787,39 +4787,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_SIGN18", "S_SIGN19", "S_SIGN20", - "S_SIGN21", - "S_SIGN22", - "S_SIGN23", - "S_SIGN24", - "S_SIGN25", - "S_SIGN26", - "S_SIGN27", - "S_SIGN28", - "S_SIGN29", - "S_SIGN30", - "S_SIGN31", - "S_SIGN32", - "S_SIGN33", - "S_SIGN34", - "S_SIGN35", - "S_SIGN36", - "S_SIGN37", - "S_SIGN38", - "S_SIGN39", - "S_SIGN40", - "S_SIGN41", - "S_SIGN42", - "S_SIGN43", - "S_SIGN44", - "S_SIGN45", - "S_SIGN46", - "S_SIGN47", - "S_SIGN48", - "S_SIGN49", - "S_SIGN50", - "S_SIGN51", - "S_SIGN52", // Eggman - "S_SIGN53", + "S_SIGN_END", // Steam Riser "S_STEAM1", diff --git a/src/info.c b/src/info.c index 70e08f9e..15b30fea 100644 --- a/src/info.c +++ b/src/info.c @@ -1044,56 +1044,24 @@ state_t states[NUMSTATES] = {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN2}, // S_SIGN1 {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN3}, // S_SIGN2 {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN4}, // S_SIGN3 - {SPR_SIGN, 5, 1, {NULL}, 0, 0, S_SIGN5}, // S_SIGN4 + {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN5}, // S_SIGN4 {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN6}, // S_SIGN5 {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN7}, // S_SIGN6 {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN8}, // S_SIGN7 - {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN9}, // S_SIGN8 + {SPR_SIGN, 4, 1, {NULL}, 0, 0, S_SIGN9}, // S_SIGN8 {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN10}, // S_SIGN9 {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN11}, // S_SIGN10 {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN12}, // S_SIGN11 - {SPR_SIGN, 4, 1, {NULL}, 0, 0, S_SIGN13}, // S_SIGN12 + {SPR_SIGN, 5, 1, {NULL}, 0, 0, S_SIGN13}, // S_SIGN12 {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN14}, // S_SIGN13 {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN15}, // S_SIGN14 {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN16}, // S_SIGN15 - {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN17}, // S_SIGN16 + {SPR_SIGN, 6, 1, {NULL}, 0, 0, S_SIGN17}, // S_SIGN16 {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN18}, // S_SIGN17 {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN19}, // S_SIGN18 {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN20}, // S_SIGN19 - {SPR_SIGN, 6, 1, {NULL}, 0, 0, S_SIGN21}, // S_SIGN20 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN22}, // S_SIGN21 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN23}, // S_SIGN22 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN24}, // S_SIGN23 - {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN25}, // S_SIGN24 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN26}, // S_SIGN25 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN27}, // S_SIGN26 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN28}, // S_SIGN27 - {SPR_SIGN, 5, 1, {NULL}, 0, 0, S_SIGN29}, // S_SIGN28 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN30}, // S_SIGN29 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN31}, // S_SIGN30 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN32}, // S_SIGN31 - {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN33}, // S_SIGN32 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN34}, // S_SIGN33 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN35}, // S_SIGN34 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN36}, // S_SIGN35 - {SPR_SIGN, 4, 1, {NULL}, 0, 0, S_SIGN37}, // S_SIGN36 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN38}, // S_SIGN37 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN39}, // S_SIGN38 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN40}, // S_SIGN39 - {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN41}, // S_SIGN40 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN42}, // S_SIGN41 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN43}, // S_SIGN42 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN44}, // S_SIGN43 - {SPR_SIGN, 6, 1, {NULL}, 0, 0, S_SIGN45}, // S_SIGN44 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN46}, // S_SIGN45 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN47}, // S_SIGN46 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN48}, // S_SIGN47 - {SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN49}, // S_SIGN48 - {SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN50}, // S_SIGN49 - {SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN51}, // S_SIGN50 - {SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN1}, // S_SIGN51 - {SPR_SIGN, 3, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN52 Eggman - {SPR_SIGN, 7, -1, {A_SignPlayer}, 0, 0, S_NULL}, // S_SIGN53 Blank + {SPR_SIGN, 7, 1, {NULL}, 0, 0, S_SIGN1}, // S_SIGN20 + {SPR_SIGN, 8, -1, {A_SignPlayer}, 0, 0, S_NULL}, // S_SIGN_END // Steam Riser {SPR_STEM, 0, 2, {A_SetSolidSteam}, 0, 0, S_STEAM2}, // S_STEAM1 @@ -5814,9 +5782,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_INVISIBLE, // spawnstate 1000, // spawnhealth S_PLAY_SIGN, // seestate - sfx_lvpass, // seesound + sfx_s3kb8, // seesound 8, // reactiontime - sfx_None, // attacksound + sfx_s3k7e, // attacksound S_NULL, // painstate 0, // painchance sfx_None, // painsound @@ -14496,7 +14464,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_None, // activesound MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags S_NULL // raisestate ->>>>>>> master }, { // MT_BOOSTFLAME diff --git a/src/info.h b/src/info.h index c6461f15..1891b481 100644 --- a/src/info.h +++ b/src/info.h @@ -1636,39 +1636,7 @@ typedef enum state S_SIGN18, S_SIGN19, S_SIGN20, - S_SIGN21, - S_SIGN22, - S_SIGN23, - S_SIGN24, - S_SIGN25, - S_SIGN26, - S_SIGN27, - S_SIGN28, - S_SIGN29, - S_SIGN30, - S_SIGN31, - S_SIGN32, - S_SIGN33, - S_SIGN34, - S_SIGN35, - S_SIGN36, - S_SIGN37, - S_SIGN38, - S_SIGN39, - S_SIGN40, - S_SIGN41, - S_SIGN42, - S_SIGN43, - S_SIGN44, - S_SIGN45, - S_SIGN46, - S_SIGN47, - S_SIGN48, - S_SIGN49, - S_SIGN50, - S_SIGN51, - S_SIGN52, // Eggman - S_SIGN53, + S_SIGN_END, // Steam Riser S_STEAM1, diff --git a/src/p_mobj.c b/src/p_mobj.c index 9f16b778..4787cf3d 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8290,7 +8290,9 @@ void P_MobjThinker(mobj_t *mobj) { if (mobj->z <= mobj->movefactor) { - P_SetMobjState(mobj, S_SIGN53); + P_SetMobjState(mobj, S_SIGN_END); + if (thing->info->attacksound) + S_StartSound(thing, thing->info->attacksound); mobj->z = mobj->movefactor; //mobj->flags |= MF_NOGRAVITY; // ? mobj->flags &= ~MF_NOCLIPHEIGHT; diff --git a/src/p_spec.c b/src/p_spec.c index cba294e6..b429f65a 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3280,7 +3280,7 @@ void P_SetupSignExit(player_t *player) P_SetMobjState(sign, S_SIGN1); if (sign->info->seesound) S_StartSound(sign, sign->info->seesound); - sign->movefactor = player->mo->z; + sign->movefactor = player->mo->floorz; sign->movecount = 1; } } From dd6b63f9da95a0c4f0e1a55c37aee63638ff30c2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 21 Sep 2018 19:44:14 -0400 Subject: [PATCH 13/20] Different timings --- src/p_inter.c | 2 +- src/p_mobj.c | 12 +++++++++--- src/p_spec.c | 12 +++--------- src/p_tick.c | 4 ++-- src/p_user.c | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 68124671..74612949 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -694,7 +694,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!playeringame[i] || players[i].spectator) continue; - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; } S_StartSound(NULL, sfx_lvpass); } diff --git a/src/p_mobj.c b/src/p_mobj.c index 4787cf3d..c4f29486 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1410,7 +1410,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) gravityadd = FixedMul(gravityadd, 5*FRACUNIT); // Double gravity break; case MT_SIGN: - gravityadd /= 4; + gravityadd /= 8; break; default: break; @@ -8291,8 +8291,8 @@ void P_MobjThinker(mobj_t *mobj) if (mobj->z <= mobj->movefactor) { P_SetMobjState(mobj, S_SIGN_END); - if (thing->info->attacksound) - S_StartSound(thing, thing->info->attacksound); + if (mobj->info->attacksound) + S_StartSound(mobj, mobj->info->attacksound); mobj->z = mobj->movefactor; //mobj->flags |= MF_NOGRAVITY; // ? mobj->flags &= ~MF_NOCLIPHEIGHT; @@ -8305,6 +8305,12 @@ void P_MobjThinker(mobj_t *mobj) mobj->z + (24<flags &= ~MF_NOGRAVITY; + if (abs(mobj->z - mobj->movefactor) <= 512<cvmem) + { + if (mobj->info->seesound) + S_StartSound(mobj, mobj->info->seesound); + mobj->cvmem = 1; + } } } break; diff --git a/src/p_spec.c b/src/p_spec.c index b429f65a..68334c33 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3227,12 +3227,10 @@ void P_SetupSignExit(player_t *player) P_SetTarget(&thing->target, player->mo); P_SetMobjState(thing, S_SIGN1); - if (thing->info->seesound) - S_StartSound(thing, thing->info->seesound); // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (640<z += (768<movecount = 1; ++numfound; @@ -3257,12 +3255,10 @@ void P_SetupSignExit(player_t *player) P_SetTarget(&thing->target, player->mo); P_SetMobjState(thing, S_SIGN1); - if (thing->info->seesound) - S_StartSound(thing, thing->info->seesound); // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (640<z += (768<movecount = 1; ++numfound; @@ -3274,12 +3270,10 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: FINALLY, add in an alternative if no place is found if (player->mo) { - mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (640<mo->x, player->mo->y, player->mo->z + (768<target, player->mo); P_SetMobjState(sign, S_SIGN1); - if (sign->info->seesound) - S_StartSound(sign, sign->info->seesound); sign->movefactor = player->mo->floorz; sign->movecount = 1; } diff --git a/src/p_tick.c b/src/p_tick.c index 4cfba90f..357a4b1e 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -448,7 +448,7 @@ static inline void P_DoSpecialStageStuff(void) { if (playeringame[i]) { - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; players[i].pflags &= ~PF_GLIDING; } @@ -485,7 +485,7 @@ static inline void P_DoSpecialStageStuff(void) if (playeringame[i]) { players[i].mo->momx = players[i].mo->momy = 0; - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; } sstimer = 0; diff --git a/src/p_user.c b/src/p_user.c index 3120351c..0476777e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1751,7 +1751,7 @@ void P_DoPlayerExit(player_t *player) //countdown2 = countdown + 8*TICRATE; if (P_CheckRacers()) - player->exiting = (21*TICRATE)/5 + 1; + player->exiting = (28*TICRATE)/5 + 1; } else if (G_BattleGametype()) // Battle Mode exiting { @@ -1759,7 +1759,7 @@ void P_DoPlayerExit(player_t *player) P_EndingMusic(player); } else - player->exiting = (21*TICRATE)/5 + 2; // Accidental death safeguard??? + player->exiting = (28*TICRATE)/5 + 2; // Accidental death safeguard??? //player->pflags &= ~PF_GLIDING; /* // SRB2kart - don't need @@ -6569,7 +6569,7 @@ static void P_MovePlayer(player_t *player) S_StartSound(NULL, sfx_s3k6a); for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i]) - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; } else if (player->health > 1) P_DamageMobj(player->mo, NULL, NULL, 1); @@ -9038,7 +9038,7 @@ void P_PlayerThink(player_t *player) } if (i == MAXPLAYERS && player->exiting == 6*TICRATE) // finished - player->exiting = (21*TICRATE)/5 + 1; + player->exiting = (28*TICRATE)/5 + 1; // If 10 seconds are left on the timer, // begin the drown music for countdown! From 0e39bf2821669e3b631d6ef48b71bcd58114419c Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 21 Sep 2018 19:51:31 -0400 Subject: [PATCH 14/20] Slightly darker green backgrounds --- src/k_kart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 7b38874c..16a19c53 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -124,8 +124,8 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_TEA,8, // 10 // SKINCOLOR_SALMON SKINCOLOR_PISTACHIO,8, // 11 // SKINCOLOR_PINK SKINCOLOR_MOSS,8, // 12 // SKINCOLOR_ROSE - SKINCOLOR_MINT,10, // 13 // SKINCOLOR_RASPBERRY - SKINCOLOR_GREEN,8, // 14 // SKINCOLOR_RED + SKINCOLOR_MINT,8, // 13 // SKINCOLOR_RASPBERRY + SKINCOLOR_GREEN,6, // 14 // SKINCOLOR_RED SKINCOLOR_SAPPHIRE,8, // 15 // SKINCOLOR_RUBY SKINCOLOR_PINETREE,6, // 16 // SKINCOLOR_CRIMSON SKINCOLOR_MUSTARD,10, // 17 // SKINCOLOR_KETCHUP From 487e114fee73f4ee4624f5635c7c65a923b40d17 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 18:59:26 -0400 Subject: [PATCH 15/20] raceexittime var --- src/doomstat.h | 2 ++ src/g_game.c | 2 ++ src/p_inter.c | 2 +- src/p_tick.c | 4 ++-- src/p_user.c | 18 +++++++++--------- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/doomstat.h b/src/doomstat.h index f54abebc..fc13b0e8 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -413,6 +413,8 @@ extern UINT16 extralifetics; // SRB2kart extern tic_t introtime; extern tic_t starttime; +extern tic_t raceexittime; +extern tic_t battleexittime; extern INT32 hyudorotime; extern INT32 stealtime; extern INT32 sneakertime; diff --git a/src/g_game.c b/src/g_game.c index 73d20bfd..e501fa56 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -209,6 +209,8 @@ UINT16 extralifetics = 4*TICRATE; // SRB2kart tic_t introtime = 108+5; // plus 5 for white fade tic_t starttime = 6*TICRATE + (3*TICRATE/4); +tic_t raceexittime = 5*TICRATE + (2*TICRATE/3); +tic_t battleexittime = 8*TICRATE; INT32 hyudorotime = 7*TICRATE; INT32 stealtime = TICRATE/2; INT32 sneakertime = TICRATE + (TICRATE/3); diff --git a/src/p_inter.c b/src/p_inter.c index 74612949..7a148464 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -694,7 +694,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!playeringame[i] || players[i].spectator) continue; - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; } S_StartSound(NULL, sfx_lvpass); } diff --git a/src/p_tick.c b/src/p_tick.c index 3bdc9884..3a55353d 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -448,7 +448,7 @@ static inline void P_DoSpecialStageStuff(void) { if (playeringame[i]) { - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; players[i].pflags &= ~PF_GLIDING; } @@ -485,7 +485,7 @@ static inline void P_DoSpecialStageStuff(void) if (playeringame[i]) { players[i].mo->momx = players[i].mo->momy = 0; - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; } sstimer = 0; diff --git a/src/p_user.c b/src/p_user.c index 165008b7..688e0f7d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -673,7 +673,7 @@ static void P_DeNightserizePlayer(player_t *player) for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE) players[i].nightstime = 1; // force everyone else to fall too. - player->exiting = 6*TICRATE; + player->exiting = raceexittime+2; stagefailed = true; // NIGHT OVER } @@ -1744,7 +1744,7 @@ void P_DoPlayerExit(player_t *player) S_StartSound(player->mo, sfx_kwin); } - player->exiting = 6*TICRATE; + player->exiting = raceexittime+2; if (cv_inttime.value > 0) P_EndingMusic(player); @@ -1754,15 +1754,15 @@ void P_DoPlayerExit(player_t *player) //countdown2 = countdown + 8*TICRATE; if (P_CheckRacers()) - player->exiting = (28*TICRATE)/5 + 1; + player->exiting = raceexittime+1; } else if (G_BattleGametype()) // Battle Mode exiting { - player->exiting = 8*TICRATE + 1; + player->exiting = battleexittime+1; P_EndingMusic(player); } else - player->exiting = (28*TICRATE)/5 + 2; // Accidental death safeguard??? + player->exiting = raceexittime+2; // Accidental death safeguard??? //player->pflags &= ~PF_GLIDING; /* // SRB2kart - don't need @@ -6572,7 +6572,7 @@ static void P_MovePlayer(player_t *player) S_StartSound(NULL, sfx_s3k6a); for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i]) - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; } else if (player->health > 1) P_DamageMobj(player->mo, NULL, NULL, 1); @@ -9040,8 +9040,8 @@ void P_PlayerThink(player_t *player) } } - if (i == MAXPLAYERS && player->exiting == 6*TICRATE) // finished - player->exiting = (28*TICRATE)/5 + 1; + if (i == MAXPLAYERS && player->exiting == raceexittime+2) // finished + player->exiting = raceexittime+1; // If 10 seconds are left on the timer, // begin the drown music for countdown! @@ -9066,7 +9066,7 @@ void P_PlayerThink(player_t *player) // If it is set, start subtracting // Don't allow it to go back to 0 - if (player->exiting > 1 && (player->exiting < 6*TICRATE || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1" + if (player->exiting > 1 && (player->exiting < raceexittime+2 || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1" player->exiting--; if (player->exiting && countdown2) From a3b40c75771b3f4b146ed35a233d8ccc9bf2703e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 19:00:30 -0400 Subject: [PATCH 16/20] Better particle spread --- src/p_mobj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 847ae031..9dee0bef 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8303,9 +8303,9 @@ void P_MobjThinker(mobj_t *mobj) } else { - P_SpawnMobj(mobj->x + (P_RandomRange(-32,32)<y + (P_RandomRange(-32,32)<z + (24<x + (P_RandomRange(-48,48)<y + (P_RandomRange(-48,48)<z + (24<flags &= ~MF_NOGRAVITY; if (abs(mobj->z - mobj->movefactor) <= 512<cvmem) From ad8d674e5efd1f66e4d8139e00bdb359db2a67e2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 19:03:38 -0400 Subject: [PATCH 17/20] Set nogravity on landing Means you can't have a finishline that moves up and down, but eh, thinking this might help the fallback measure disappearing --- src/p_mobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 9dee0bef..97cd57f0 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8296,9 +8296,9 @@ void P_MobjThinker(mobj_t *mobj) P_SetMobjState(mobj, S_SIGN_END); if (mobj->info->attacksound) S_StartSound(mobj, mobj->info->attacksound); - mobj->z = mobj->movefactor; - //mobj->flags |= MF_NOGRAVITY; // ? + mobj->flags |= MF_NOGRAVITY; // ? mobj->flags &= ~MF_NOCLIPHEIGHT; + mobj->z = mobj->movefactor; mobj->movecount = 0; } else From bb1aaf9d54dc4715d676d3ae027526cc54ed8f4a Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 19:55:26 -0400 Subject: [PATCH 18/20] New sparkles --- src/dehacked.c | 15 ++++++++++++++- src/info.c | 28 ++++++++++++++++++++-------- src/info.h | 16 +++++++++++++++- src/p_mobj.c | 2 +- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index f394a742..037795d2 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6205,6 +6205,19 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_RANDOMITEMPOP4", //} + // Signpost sparkles + "S_SIGNSPARK1", + "S_SIGNSPARK2", + "S_SIGNSPARK3", + "S_SIGNSPARK4", + "S_SIGNSPARK5", + "S_SIGNSPARK6", + "S_SIGNSPARK7", + "S_SIGNSPARK8", + "S_SIGNSPARK9", + "S_SIGNSPARK10", + "S_SIGNSPARK11", + // Drift Sparks "S_DRIFTSPARK_A1", "S_DRIFTSPARK_A2", @@ -7206,7 +7219,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_BLUEDIAG", "MT_RANDOMITEM", "MT_RANDOMITEMPOP", - "MT_RINGSPARKLE", + "MT_SIGNSPARKLE", "MT_FASTLINE", "MT_FASTDUST", diff --git a/src/info.c b/src/info.c index 58d25b07..91e4020c 100644 --- a/src/info.c +++ b/src/info.c @@ -55,12 +55,12 @@ char sprnames[NUMSPRITES + 1][5] = "GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI", "SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO", //SRB2kart Sprites - "SPRG","BSPR","RNDM","RPOP","FAST","DSHR","BOST","BOSM","KFRE","KINV", - "KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM", - "BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE", - "AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB", - "SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM", - "ITMO","ITMI","ITMN","WANT","PBOM","RETI","VIEW" + "SPRG","BSPR","RNDM","RPOP","SGNS","FAST","DSHR","BOST","BOSM","KFRE", + "KINV","KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN", + "KRBM","BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL", + "POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO", + "CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO", + "ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","VIEW" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -2535,6 +2535,18 @@ state_t states[NUMSTATES] = {SPR_RPOP, FF_FULLBRIGHT|2, 5, {NULL}, 0, 0, S_RANDOMITEMPOP4}, // S_RANDOMITEMPOP3 {SPR_RPOP, FF_FULLBRIGHT|3, 5, {NULL}, 0, 0, S_NULL}, // S_RANDOMITEMPOP4 + {SPR_SGNS, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_SIGNSPARK2}, // S_SIGNSPARK1 + {SPR_SGNS, FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_SIGNSPARK3}, // S_SIGNSPARK2 + {SPR_SGNS, FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_SIGNSPARK4}, // S_SIGNSPARK3 + {SPR_SGNS, FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_SIGNSPARK5}, // S_SIGNSPARK4 + {SPR_SGNS, FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_SIGNSPARK6}, // S_SIGNSPARK5 + {SPR_SGNS, FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_SIGNSPARK7}, // S_SIGNSPARK6 + {SPR_SGNS, FF_FULLBRIGHT|6, 1, {NULL}, 0, 0, S_SIGNSPARK8}, // S_SIGNSPARK7 + {SPR_SGNS, FF_FULLBRIGHT|7, 1, {NULL}, 0, 0, S_SIGNSPARK9}, // S_SIGNSPARK8 + {SPR_SGNS, FF_FULLBRIGHT|8, 1, {NULL}, 0, 0, S_SIGNSPARK10}, // S_SIGNSPARK9 + {SPR_SGNS, FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_SIGNSPARK11}, // S_SIGNSPARK10 + {SPR_SGNS, FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_NULL}, // S_SIGNSPARK11 + {SPR_DRIF, FF_FULLBRIGHT|2, 2, {NULL}, 0, 0, S_DRIFTSPARK_A2}, // S_DRIFTSPARK_A1 {SPR_DRIF, FF_FULLBRIGHT|FF_TRANS20|1, 1, {NULL}, 0, 0, S_DRIFTSPARK_A3}, // S_DRIFTSPARK_A2 {SPR_DRIF, FF_FULLBRIGHT|FF_TRANS50, 1, {NULL}, 0, 0, S_NULL}, // S_DRIFTSPARK_A3 @@ -14385,9 +14397,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, - { // MT_RINGSPARKLE + { // MT_SIGNSPARKLE -1, // doomednum - S_SPRK1, // spawnstate + S_SIGNSPARK1, // spawnstate 1, // spawnhealth S_NULL, // seestate sfx_None, // seesound diff --git a/src/info.h b/src/info.h index 1891b481..ccbcc51d 100644 --- a/src/info.h +++ b/src/info.h @@ -582,6 +582,7 @@ typedef enum sprite SPR_RNDM, // Random Item Box SPR_RPOP, // Random Item Box Pop + SPR_SGNS, // Signpost sparkle SPR_FAST, // Speed boost trail SPR_DSHR, // Speed boost dust release SPR_BOST, // Sneaker booster flame @@ -3050,6 +3051,19 @@ typedef enum state S_RANDOMITEMPOP4, //} + // Signpost sparkles + S_SIGNSPARK1, + S_SIGNSPARK2, + S_SIGNSPARK3, + S_SIGNSPARK4, + S_SIGNSPARK5, + S_SIGNSPARK6, + S_SIGNSPARK7, + S_SIGNSPARK8, + S_SIGNSPARK9, + S_SIGNSPARK10, + S_SIGNSPARK11, + // Drift Sparks S_DRIFTSPARK_A1, S_DRIFTSPARK_A2, @@ -4068,7 +4082,7 @@ typedef enum mobj_type MT_BLUEDIAG, MT_RANDOMITEM, MT_RANDOMITEMPOP, - MT_RINGSPARKLE, + MT_SIGNSPARKLE, MT_FASTLINE, MT_FASTDUST, diff --git a/src/p_mobj.c b/src/p_mobj.c index 97cd57f0..d39e3876 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8306,7 +8306,7 @@ void P_MobjThinker(mobj_t *mobj) P_SpawnMobj(mobj->x + (P_RandomRange(-48,48)<y + (P_RandomRange(-48,48)<z + (24<flags &= ~MF_NOGRAVITY; if (abs(mobj->z - mobj->movefactor) <= 512<cvmem) { From 8a06e78ab64d440215e4ab28f39d6d0abb3424d4 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 20:14:32 -0400 Subject: [PATCH 19/20] Quick fix for other player's win/lose not playing --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 6fd8e634..2d36e207 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1728,7 +1728,7 @@ void P_DoPlayerExit(player_t *player) else if (!countdown) countdown = cv_countdowntime.value*TICRATE + 1; // Use cv_countdowntime - if (cv_kartvoices.value && P_IsLocalPlayer(player)) + if (cv_kartvoices.value) { if (P_IsLocalPlayer(player)) { From c63518e0b2e2c08b9e783660bef67219405faa60 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 20:15:12 -0400 Subject: [PATCH 20/20] Doing this looks more appealing to me --- src/p_user.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 2d36e207..9ac131b4 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1734,15 +1734,10 @@ void P_DoPlayerExit(player_t *player) { sfxenum_t sfx_id; if (K_IsPlayerLosing(player)) - { sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_klose].skinsound]; - S_StartSound(NULL, sfx_id); - } else - { sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_kwin].skinsound]; - S_StartSound(NULL, sfx_id); - } + S_StartSound(NULL, sfx_id); } else {