mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Menus/Time Attack: fix staff replay selector getting stuck
- If you viewed a map with multiple staff ghosts and moved the selector - Then viewed a map with only one staff ghost - Then went back and viewed a map with multiple - The selector would get stuck on only the first option
This commit is contained in:
parent
35d9079140
commit
ae30e1d138
3 changed files with 5 additions and 22 deletions
|
|
@ -980,8 +980,7 @@ consvar_t cv_dummyspbattack = MenuDummy("dummyspbattack", "Off").on_off().onchan
|
||||||
consvar_t cv_dummyspectate = MenuDummy("dummyspectate", "Spectator").values({{0, "Spectator"}, {1, "Playing"}});
|
consvar_t cv_dummyspectate = MenuDummy("dummyspectate", "Spectator").values({{0, "Spectator"}, {1, "Playing"}});
|
||||||
|
|
||||||
extern CV_PossibleValue_t dummystaff_cons_t[];
|
extern CV_PossibleValue_t dummystaff_cons_t[];
|
||||||
void Dummystaff_OnChange(void);
|
consvar_t cv_dummystaff = MenuDummy("dummystaff", "0").values(dummystaff_cons_t);
|
||||||
consvar_t cv_dummystaff = MenuDummy("dummystaff", "0").values(dummystaff_cons_t).onchange(Dummystaff_OnChange);
|
|
||||||
|
|
||||||
consvar_t cv_dummyteam = MenuDummy("dummyteam", "Spectator").values({{0, "Spectator"}, {1, "Red"}, {2, "Blue"}});
|
consvar_t cv_dummyteam = MenuDummy("dummyteam", "Spectator").values({{0, "Spectator"}, {1, "Red"}, {2, "Blue"}});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,25 +59,6 @@ static boolean noFurtherInput = false;
|
||||||
|
|
||||||
CV_PossibleValue_t dummystaff_cons_t[] = {{0, "MIN"}, {999, "MAX"}, {0, NULL}};
|
CV_PossibleValue_t dummystaff_cons_t[] = {{0, "MIN"}, {999, "MAX"}, {0, NULL}};
|
||||||
|
|
||||||
// ==========================================================================
|
|
||||||
// CVAR ONCHANGE EVENTS GO HERE
|
|
||||||
// ==========================================================================
|
|
||||||
// (there's only a couple anyway)
|
|
||||||
|
|
||||||
void Dummystaff_OnChange(void);
|
|
||||||
void Dummystaff_OnChange(void)
|
|
||||||
{
|
|
||||||
if (mapheaderinfo[levellist.choosemap] == NULL || mapheaderinfo[levellist.choosemap]->ghostCount <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
dummystaff_cons_t[1].value = mapheaderinfo[levellist.choosemap]->ghostCount-1;
|
|
||||||
if (cv_dummystaff.value > dummystaff_cons_t[1].value)
|
|
||||||
{
|
|
||||||
CV_StealthSetValue(&cv_dummystaff, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
// BASIC MENU HANDLING
|
// BASIC MENU HANDLING
|
||||||
|
|
|
||||||
|
|
@ -335,9 +335,12 @@ void CV_SPBAttackChanged(void)
|
||||||
PLAY_TAGhosts[taghost_staff].status = IT_DISABLED;
|
PLAY_TAGhosts[taghost_staff].status = IT_DISABLED;
|
||||||
if (mapheaderinfo[levellist.choosemap]->ghostCount > 0 && !modeprefix[0])
|
if (mapheaderinfo[levellist.choosemap]->ghostCount > 0 && !modeprefix[0])
|
||||||
{
|
{
|
||||||
|
extern CV_PossibleValue_t dummystaff_cons_t[];
|
||||||
|
dummystaff_cons_t[1].value = mapheaderinfo[levellist.choosemap]->ghostCount-1;
|
||||||
|
CV_SetValue(&cv_dummystaff, 0);
|
||||||
|
|
||||||
PLAY_TAReplay[tareplay_staff].status = IT_STRING|IT_ARROWS;
|
PLAY_TAReplay[tareplay_staff].status = IT_STRING|IT_ARROWS;
|
||||||
PLAY_TAGhosts[taghost_staff].status = IT_STRING|IT_CVAR;
|
PLAY_TAGhosts[taghost_staff].status = IT_STRING|IT_CVAR;
|
||||||
CV_SetValue(&cv_dummystaff, 0);
|
|
||||||
active |= 1|4;
|
active |= 1|4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue