mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Merge branch 'debug-challenges' into 'master'
DEVELOP: add debugchallenges cheat See merge request KartKrew/Kart!1822
This commit is contained in:
commit
1e916dee77
3 changed files with 41 additions and 11 deletions
|
|
@ -856,6 +856,10 @@ consvar_t cv_kartdebugnodes = ServerCheat("debugnodes", "Off").on_off().descript
|
||||||
|
|
||||||
consvar_t cv_1pswap = PlayerCheat("1pswap", "1").min_max(1, MAXSPLITSCREENPLAYERS).description("Let P1's Profile control a different splitscreen player");
|
consvar_t cv_1pswap = PlayerCheat("1pswap", "1").min_max(1, MAXSPLITSCREENPLAYERS).description("Let P1's Profile control a different splitscreen player");
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
consvar_t cv_debugchallenges = PlayerCheat("debugchallenges", "Off").on_off().description("Chao keys are infinite, unlock any tile, relock tiles, animations play quickly");
|
||||||
|
#endif
|
||||||
|
|
||||||
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");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6036,6 +6036,12 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
categoryside = (challengesmenu.extradata[id].flip <= TILEFLIP_MAX/4
|
categoryside = (challengesmenu.extradata[id].flip <= TILEFLIP_MAX/4
|
||||||
|| challengesmenu.extradata[id].flip > (3*TILEFLIP_MAX)/4);
|
|| challengesmenu.extradata[id].flip > (3*TILEFLIP_MAX)/4);
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
extern consvar_t cv_debugchallenges;
|
||||||
|
if (cv_debugchallenges.value)
|
||||||
|
categoryside = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (categoryside)
|
if (categoryside)
|
||||||
{
|
{
|
||||||
char categoryid = '0';
|
char categoryid = '0';
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@
|
||||||
#include "../r_skins.h"
|
#include "../r_skins.h"
|
||||||
#include "../s_sound.h"
|
#include "../s_sound.h"
|
||||||
|
|
||||||
//#define CHAOKEYDEBUG
|
#ifdef DEVELOP
|
||||||
|
extern consvar_t cv_debugchallenges;
|
||||||
|
#endif
|
||||||
|
|
||||||
menuitem_t MISC_ChallengesStatsDummyMenu[] =
|
menuitem_t MISC_ChallengesStatsDummyMenu[] =
|
||||||
{
|
{
|
||||||
|
|
@ -382,10 +384,6 @@ void M_Challenges(INT32 choice)
|
||||||
|
|
||||||
boolean M_CanKeyHiliTile(void)
|
boolean M_CanKeyHiliTile(void)
|
||||||
{
|
{
|
||||||
// No keys to do it with?
|
|
||||||
if (gamedata->chaokeys == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// No tile data?
|
// No tile data?
|
||||||
if (challengesmenu.extradata == NULL)
|
if (challengesmenu.extradata == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -398,6 +396,16 @@ boolean M_CanKeyHiliTile(void)
|
||||||
if (gamedata->unlocked[challengesmenu.currentunlock] == true)
|
if (gamedata->unlocked[challengesmenu.currentunlock] == true)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
// Ignore game design?
|
||||||
|
if (cv_debugchallenges.value)
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// No keys to do it with?
|
||||||
|
if (gamedata->chaokeys == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
UINT16 i = (challengesmenu.hilix * CHALLENGEGRIDHEIGHT) + challengesmenu.hiliy;
|
UINT16 i = (challengesmenu.hilix * CHALLENGEGRIDHEIGHT) + challengesmenu.hiliy;
|
||||||
|
|
||||||
// Not a hinted tile.
|
// Not a hinted tile.
|
||||||
|
|
@ -517,19 +525,26 @@ void M_ChallengesTick(void)
|
||||||
{
|
{
|
||||||
challengesmenu.chaokeyhold++;
|
challengesmenu.chaokeyhold++;
|
||||||
|
|
||||||
const UINT32 chaohold_duration =
|
UINT32 chaohold_duration =
|
||||||
CHAOHOLD_PADDING
|
CHAOHOLD_PADDING
|
||||||
+ ((unlockables[challengesmenu.currentunlock].majorunlock == true)
|
+ ((unlockables[challengesmenu.currentunlock].majorunlock == true)
|
||||||
? CHAOHOLD_MAJOR
|
? CHAOHOLD_MAJOR
|
||||||
: CHAOHOLD_STANDARD
|
: CHAOHOLD_STANDARD
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
if (cv_debugchallenges.value)
|
||||||
|
chaohold_duration = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (challengesmenu.chaokeyhold > chaohold_duration)
|
if (challengesmenu.chaokeyhold > chaohold_duration)
|
||||||
{
|
{
|
||||||
#ifndef CHAOKEYDEBUG
|
#ifdef DEVELOP
|
||||||
gamedata->chaokeys -= (unlockables[challengesmenu.currentunlock].majorunlock == true)
|
if (!cv_debugchallenges.value)
|
||||||
? 10 : 1;
|
|
||||||
#endif
|
#endif
|
||||||
|
gamedata->chaokeys -= (unlockables[challengesmenu.currentunlock].majorunlock == true)
|
||||||
|
? 10 : 1;
|
||||||
|
|
||||||
challengesmenu.chaokeyhold = 0;
|
challengesmenu.chaokeyhold = 0;
|
||||||
challengesmenu.unlockcount[CMC_CHAOANIM]++;
|
challengesmenu.unlockcount[CMC_CHAOANIM]++;
|
||||||
|
|
||||||
|
|
@ -640,6 +655,11 @@ void M_ChallengesTick(void)
|
||||||
{
|
{
|
||||||
tic_t nexttime = M_MenuExtraHeld(pid) ? (UNLOCKTIME*2) : MAXUNLOCKTIME;
|
tic_t nexttime = M_MenuExtraHeld(pid) ? (UNLOCKTIME*2) : MAXUNLOCKTIME;
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
if (cv_debugchallenges.value)
|
||||||
|
nexttime = UNLOCKTIME;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (++challengesmenu.unlockanim >= nexttime)
|
if (++challengesmenu.unlockanim >= nexttime)
|
||||||
{
|
{
|
||||||
challengesmenu.requestnew = true;
|
challengesmenu.requestnew = true;
|
||||||
|
|
@ -768,8 +788,8 @@ boolean M_ChallengesInputs(INT32 ch)
|
||||||
challengesmenu.unlockcount[CMC_CHAONOPE] = 6;
|
challengesmenu.unlockcount[CMC_CHAONOPE] = 6;
|
||||||
S_StartSound(NULL, sfx_s3k7b); //sfx_s3kb2
|
S_StartSound(NULL, sfx_s3k7b); //sfx_s3kb2
|
||||||
|
|
||||||
#ifdef CHAOKEYDEBUG
|
#ifdef DEVELOP
|
||||||
if (challengesmenu.currentunlock < MAXUNLOCKABLES && challengesmenu.unlockanim >= UNLOCKTIME && gamedata->unlocked[challengesmenu.currentunlock] == true)
|
if (cv_debugchallenges.value && challengesmenu.currentunlock < MAXUNLOCKABLES && challengesmenu.unlockanim >= UNLOCKTIME && gamedata->unlocked[challengesmenu.currentunlock] == true)
|
||||||
{
|
{
|
||||||
gamedata->unlocked[challengesmenu.currentunlock] = gamedata->unlockpending[challengesmenu.currentunlock] = false;
|
gamedata->unlocked[challengesmenu.currentunlock] = gamedata->unlockpending[challengesmenu.currentunlock] = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue