mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add debugprisoncd cheat (DEVELOP only)
- Always drops a CD from Prison Eggs
This commit is contained in:
parent
e86ae4b22b
commit
f60309983a
3 changed files with 39 additions and 1 deletions
|
|
@ -873,6 +873,10 @@ consvar_t cv_1pswap = PlayerCheat("1pswap", "1").min_max(1, MAXSPLITSCREENPLAYER
|
||||||
consvar_t cv_debugfinishline = PlayerCheat("debugfinishline", "Off").on_off().description("Highlight finish lines, respawn lines, death pits and instakill planes with high contrast colors");
|
consvar_t cv_debugfinishline = PlayerCheat("debugfinishline", "Off").on_off().description("Highlight finish lines, respawn lines, death pits and instakill planes with high contrast colors");
|
||||||
consvar_t cv_debughudtracker = PlayerCheat("debughudtracker", "Off").on_off().description("Highlight overlapping HUD tracker blocks");
|
consvar_t cv_debughudtracker = PlayerCheat("debughudtracker", "Off").on_off().description("Highlight overlapping HUD tracker blocks");
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
consvar_t cv_debugprisoncd = PlayerCheat("debugprisoncd", "Off").on_off().description("Always drop a CD from breaking Prisons");
|
||||||
|
#endif
|
||||||
|
|
||||||
consvar_t cv_debugrank = PlayerCheat("debugrank", "Off").description("Show GP rank state on the HUD; optionally force a rank grade").values({
|
consvar_t cv_debugrank = PlayerCheat("debugrank", "Off").description("Show GP rank state on the HUD; optionally force a rank grade").values({
|
||||||
{0, "Off"},
|
{0, "Off"},
|
||||||
{1, "On"},
|
{1, "On"},
|
||||||
|
|
|
||||||
26
src/m_cond.c
26
src/m_cond.c
|
|
@ -1019,6 +1019,32 @@ cacheprisoneggpickup:
|
||||||
}
|
}
|
||||||
|
|
||||||
//CONS_Printf("thisprisoneggpickup = %u (MAXCONDITIONSETS is %u)\n", gamedata->thisprisoneggpickup, MAXCONDITIONSETS);
|
//CONS_Printf("thisprisoneggpickup = %u (MAXCONDITIONSETS is %u)\n", gamedata->thisprisoneggpickup, MAXCONDITIONSETS);
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
extern consvar_t cv_debugprisoncd;
|
||||||
|
// If all drops are collected, just force the first valid one.
|
||||||
|
if (cv_debugprisoncd.value && gamedata->thisprisoneggpickup_cached == NULL)
|
||||||
|
{
|
||||||
|
for (i = 0; gamedata->thisprisoneggpickup_cached == NULL &&
|
||||||
|
i < gamedata->numprisoneggpickups; i++)
|
||||||
|
{
|
||||||
|
c = &conditionSets[gamedata->prisoneggpickups[i]];
|
||||||
|
if (c->numconditions)
|
||||||
|
{
|
||||||
|
for (j = 0; j < c->numconditions; ++j)
|
||||||
|
{
|
||||||
|
cn = &c->condition[j];
|
||||||
|
if (cn->type != UC_PRISONEGGCD)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
gamedata->thisprisoneggpickup = gamedata->prisoneggpickups[i];
|
||||||
|
gamedata->thisprisoneggpickup_cached = cn;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_PrecacheLevelLocks(void)
|
static void M_PrecacheLevelLocks(void)
|
||||||
|
|
|
||||||
|
|
@ -1198,7 +1198,11 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
secretextratime = TICRATE/2;
|
secretextratime = TICRATE/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
extern consvar_t cv_debugprisoncd;
|
||||||
|
#endif
|
||||||
|
if ((
|
||||||
grandprixinfo.gp == true // Bonus Round
|
grandprixinfo.gp == true // Bonus Round
|
||||||
&& demo.playback == false // Not playback
|
&& demo.playback == false // Not playback
|
||||||
&& netgame == false // game design + makes it easier to implement
|
&& netgame == false // game design + makes it easier to implement
|
||||||
|
|
@ -1206,6 +1210,10 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
&& gamedata->prisoneggstothispickup == 0
|
&& gamedata->prisoneggstothispickup == 0
|
||||||
&& gamedata->thisprisoneggpickupgrabbed == false
|
&& gamedata->thisprisoneggpickupgrabbed == false
|
||||||
)
|
)
|
||||||
|
#ifdef DEVELOP
|
||||||
|
|| (cv_debugprisoncd.value && gamedata->thisprisoneggpickup_cached != NULL)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Will be 0 for the next level
|
// Will be 0 for the next level
|
||||||
gamedata->prisoneggstothispickup = (maptargets - numtargets);
|
gamedata->prisoneggstothispickup = (maptargets - numtargets);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue