Adjust voting rule changes again

* If `kartvoterulechanges` is set to `Always`, the third option is always the opposite gametype, even if Encore is unlocked - that will now be present on the second option instead.
    * This is both for consistancy with having Encore inaccessible on your gamedata, and a response to community feedback.
* The `kartencore` cvar being turned on will now be reflected in gametype rule changes from Battle to Race. This plugs one last hole in its area of effect for Race tracks.
This commit is contained in:
toaster 2022-08-24 18:52:09 +01:00
parent 9160c6bef4
commit 1fb84fbfa9
1 changed files with 8 additions and 10 deletions

View File

@ -3457,21 +3457,14 @@ UINT8 G_SometimesGetDifferentGametype(UINT8 prefgametype)
if (!cv_kartvoterulechanges.value) // never
return (gametype|encoremodifier);
if (randmapbuffer[NUMMAPS] > 0 && (encorepossible || cv_kartvoterulechanges.value != 3))
if (randmapbuffer[NUMMAPS] > 0 && (cv_kartvoterulechanges.value != 3)) // used to be (encorepossible || rule changes != 3)
{
randmapbuffer[NUMMAPS]--;
if (cv_kartvoterulechanges.value == 3) // always
{
randmapbuffer[NUMMAPS] = 0; // gotta prep this in case it isn't already set
}
return (gametype|encoremodifier);
}
switch (cv_kartvoterulechanges.value) // okay, we're having a gametype change! when's the next one, luv?
{
case 3: // always
randmapbuffer[NUMMAPS] = 1; // every other vote (or always if !encorepossible)
break;
case 1: // sometimes
randmapbuffer[NUMMAPS] = 5; // per "cup"
break;
@ -3483,10 +3476,15 @@ UINT8 G_SometimesGetDifferentGametype(UINT8 prefgametype)
}
// Only this response is prefgametype-based.
// Also intentionally does not use encoremodifier!
if (prefgametype == GT_MATCH)
{
// Intentionally does not use encoremodifier!
if (cv_kartencore.value)
return (GT_RACE|0x80);
return (GT_RACE);
return (GT_MATCH);
}
// This might appear wrong HERE, but the game will display the Encore possibility on the second voting choice instead.
return (GT_MATCH|encoremodifier);
}
//