diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 64d07c16..a83f23b2 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -5208,24 +5208,53 @@ static void BaseNumLaps_OnChange(void) static void KartFrantic_OnChange(void) { - if ((boolean)cv_kartfrantic.value != franticitems && gamestate == GS_LEVEL) + if ((boolean)cv_kartfrantic.value != franticitems && gamestate == GS_LEVEL && leveltime > starttime) CONS_Printf(M_GetText("Frantic items will be turned %s next round.\n"), cv_kartfrantic.value ? M_GetText("on") : M_GetText("off")); + else + { + CONS_Printf(M_GetText("Frantic items has been turned %s.\n"), cv_kartfrantic.value ? M_GetText("on") : M_GetText("off")); + franticitems = (boolean)cv_kartfrantic.value; + } } static void KartSpeed_OnChange(void) { - if ((UINT8)cv_kartspeed.value != gamespeed && G_RaceGametype() && gamestate == GS_LEVEL) - CONS_Printf(M_GetText("Game speed will be changed to \"%s\" next round.\n"), cv_kartspeed.string); + if (G_RaceGametype()) + { + if ((UINT8)cv_kartspeed.value != gamespeed && gamestate == GS_LEVEL && leveltime > starttime) + CONS_Printf(M_GetText("Game speed will be changed to \"%s\" next round.\n"), cv_kartspeed.string); + else + { + CONS_Printf(M_GetText("Game speed has been changed to \"%s\".\n"), cv_kartspeed.string); + gamespeed = (UINT8)cv_kartspeed.value; + } + } } static void KartMirror_OnChange(void) { - if ((boolean)cv_kartmirror.value != mirrormode && G_RaceGametype() && gamestate == GS_LEVEL) - CONS_Printf(M_GetText("Mirror Mode will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off")); + if (G_RaceGametype()) + { + if ((boolean)cv_kartmirror.value != mirrormode && gamestate == GS_LEVEL /*&& leveltime > starttime*/) + CONS_Printf(M_GetText("Mirrored tracks will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off")); + else + { + CONS_Printf(M_GetText("Mirrored tracks has been turned %s.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off")); + mirrormode = (boolean)cv_kartmirror.value; + } + } } static void KartComeback_OnChange(void) { - if ((boolean)cv_kartcomeback.value != comeback && G_BattleGametype() && gamestate == GS_LEVEL) - CONS_Printf(M_GetText("Karma Comeback will be turned %s next round.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off")); + if (G_BattleGametype()) + { + if ((boolean)cv_kartcomeback.value != comeback && gamestate == GS_LEVEL && leveltime > starttime) + CONS_Printf(M_GetText("Karma Comeback will be turned %s next round.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off")); + else + { + CONS_Printf(M_GetText("Karma Comeback has been turned %s.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off")); + comeback = (boolean)cv_kartcomeback.value; + } + } } \ No newline at end of file diff --git a/src/k_kart.c b/src/k_kart.c index 6a4286ce..79ca8991 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -607,6 +607,8 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) players[first].mo->z - players[second].mo->z) / mapheaderinfo[gamemap-1]->mobj_scale; if (franticitems) secondist = (15*secondist/14); + if (pingame < 6 && !G_BattleGametype()) + secondist = ((28+(6-pingame))*secondist/28); } // POWERITEMODDS handles all of the "frantic item" related functionality, for all of our powerful items. @@ -618,8 +620,8 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) #define POWERITEMODDS(odds) \ if (franticitems) \ odds *= 2; \ - if (pingame < 5 && !G_BattleGametype()) \ - odds = FixedMul(odds*FRACUNIT, FRACUNIT+min((5-pingame)*(FRACUNIT/34), FRACUNIT))/FRACUNIT; \ + if (pingame < 6 && !G_BattleGametype()) \ + odds = FixedMul(odds*FRACUNIT, FRACUNIT+min((6-pingame)*(FRACUNIT/25), FRACUNIT))/FRACUNIT; \ if (mashed > 0) \ odds = FixedDiv(odds*FRACUNIT, mashed+FRACUNIT)/FRACUNIT \ @@ -853,6 +855,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items pdis = (15*pdis/14); + if (pingame < 6 && !G_BattleGametype()) + pdis = ((28+(6-pingame))*pdis/28); if (pingame == 1 && oddsvalid[0]) // Record Attack, or just alone useodds = 0; @@ -4043,8 +4047,8 @@ void K_CheckBumpers(void) winnerscoreadd -= players[i].marescore; } - /*if (numingame <= 1) - return;*/ + if (numingame <= 1) + return; if (winnernum > -1 && playeringame[winnernum]) { diff --git a/src/p_setup.c b/src/p_setup.c index 4589cfb5..f4c28663 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2997,15 +2997,15 @@ boolean P_SetupLevel(boolean skipprecip) else { if (G_BattleGametype()) + { gamespeed = 0; - else - gamespeed = (UINT8)cv_kartspeed.value; - - if (G_BattleGametype()) mirrormode = false; + } else + { + gamespeed = (UINT8)cv_kartspeed.value; mirrormode = (boolean)cv_kartmirror.value; - + } franticitems = (boolean)cv_kartfrantic.value; comeback = (boolean)cv_kartcomeback.value; }