Merge branch 'gametype-always' into 'next'

Adjust voting rule changes again

See merge request KartKrew/Kart-Public!301
This commit is contained in:
Sal 2022-08-26 22:45:44 +00:00
commit 5a8784169b

View file

@ -3519,21 +3519,14 @@ UINT8 G_SometimesGetDifferentGametype(UINT8 prefgametype)
if (!cv_kartvoterulechanges.value) // never if (!cv_kartvoterulechanges.value) // never
return (gametype|encoremodifier); 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]--; randmapbuffer[NUMMAPS]--;
if (cv_kartvoterulechanges.value == 3) // always
{
randmapbuffer[NUMMAPS] = 0; // gotta prep this in case it isn't already set
}
return (gametype|encoremodifier); return (gametype|encoremodifier);
} }
switch (cv_kartvoterulechanges.value) // okay, we're having a gametype change! when's the next one, luv? 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 case 1: // sometimes
randmapbuffer[NUMMAPS] = 5; // per "cup" randmapbuffer[NUMMAPS] = 5; // per "cup"
break; break;
@ -3545,10 +3538,15 @@ UINT8 G_SometimesGetDifferentGametype(UINT8 prefgametype)
} }
// Only this response is prefgametype-based. // Only this response is prefgametype-based.
// Also intentionally does not use encoremodifier!
if (prefgametype == GT_MATCH) if (prefgametype == GT_MATCH)
{
// Intentionally does not use encoremodifier!
if (cv_kartencore.value)
return (GT_RACE|0x80);
return (GT_RACE); 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);
} }
// //