mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
SETSPHERES console command for debugging/cheating
Fixed sphere spill bug where no spheres spill if player->rings is 0
This commit is contained in:
parent
f8a3343500
commit
9e8784a376
4 changed files with 20 additions and 1 deletions
|
|
@ -822,6 +822,7 @@ void D_RegisterClientCommands(void)
|
||||||
COM_AddCommand("getallemeralds", Command_Getallemeralds_f);
|
COM_AddCommand("getallemeralds", Command_Getallemeralds_f);
|
||||||
COM_AddCommand("resetemeralds", Command_Resetemeralds_f);
|
COM_AddCommand("resetemeralds", Command_Resetemeralds_f);
|
||||||
COM_AddCommand("setrings", Command_Setrings_f);
|
COM_AddCommand("setrings", Command_Setrings_f);
|
||||||
|
COM_AddCommand("setspheres", Command_Setspheres_f);
|
||||||
COM_AddCommand("setlives", Command_Setlives_f);
|
COM_AddCommand("setlives", Command_Setlives_f);
|
||||||
COM_AddCommand("setcontinues", Command_Setcontinues_f);
|
COM_AddCommand("setcontinues", Command_Setcontinues_f);
|
||||||
COM_AddCommand("devmode", Command_Devmode_f);
|
COM_AddCommand("devmode", Command_Devmode_f);
|
||||||
|
|
|
||||||
|
|
@ -890,6 +890,23 @@ void Command_Setrings_f(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Command_Setspheres_f(void)
|
||||||
|
{
|
||||||
|
REQUIRE_INLEVEL;
|
||||||
|
REQUIRE_SINGLEPLAYER;
|
||||||
|
REQUIRE_NOULTIMATE;
|
||||||
|
REQUIRE_PANDORA;
|
||||||
|
|
||||||
|
if (COM_Argc() > 1)
|
||||||
|
{
|
||||||
|
// P_GivePlayerRings does value clamping
|
||||||
|
players[consoleplayer].spheres = 0;
|
||||||
|
P_GivePlayerSpheres(&players[consoleplayer], atoi(COM_Argv(1)));
|
||||||
|
|
||||||
|
G_SetGameModified(multiplayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Command_Setlives_f(void)
|
void Command_Setlives_f(void)
|
||||||
{
|
{
|
||||||
REQUIRE_INLEVEL;
|
REQUIRE_INLEVEL;
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ void Command_Savecheckpoint_f(void);
|
||||||
void Command_Getallemeralds_f(void);
|
void Command_Getallemeralds_f(void);
|
||||||
void Command_Resetemeralds_f(void);
|
void Command_Resetemeralds_f(void);
|
||||||
void Command_Setrings_f(void);
|
void Command_Setrings_f(void);
|
||||||
|
void Command_Setspheres_f(void);
|
||||||
void Command_Setlives_f(void);
|
void Command_Setlives_f(void);
|
||||||
void Command_Setcontinues_f(void);
|
void Command_Setcontinues_f(void);
|
||||||
void Command_Devmode_f(void);
|
void Command_Devmode_f(void);
|
||||||
|
|
|
||||||
|
|
@ -3409,7 +3409,7 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If no health, don't spawn ring!
|
// If no health, don't spawn ring!
|
||||||
if (player->rings <= 0)
|
if (((maptol & TOL_NIGHTS) && player->spheres <= 0) || (!(maptol & TOL_NIGHTS) && player->rings <= 0))
|
||||||
num_rings = 0;
|
num_rings = 0;
|
||||||
|
|
||||||
if (num_rings > 32 && player->powers[pw_carry] != CR_NIGHTSFALL)
|
if (num_rings > 32 && player->powers[pw_carry] != CR_NIGHTSFALL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue