Merge branch 'sphere-ring-concurrence' into 'master'
Change SETSPHERES console command to SETRINGS to handle player->spheres transparently See merge request STJr/SRB2Internal!167
This commit is contained in:
commit
78c78d9e63
|
@ -823,7 +823,6 @@ 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);
|
||||||
|
|
|
@ -879,29 +879,20 @@ void Command_Setrings_f(void)
|
||||||
REQUIRE_PANDORA;
|
REQUIRE_PANDORA;
|
||||||
|
|
||||||
if (COM_Argc() > 1)
|
if (COM_Argc() > 1)
|
||||||
|
{
|
||||||
|
if (!(maptol & TOL_NIGHTS))
|
||||||
{
|
{
|
||||||
// P_GivePlayerRings does value clamping
|
// P_GivePlayerRings does value clamping
|
||||||
players[consoleplayer].rings = 0;
|
players[consoleplayer].rings = 0;
|
||||||
P_GivePlayerRings(&players[consoleplayer], atoi(COM_Argv(1)));
|
P_GivePlayerRings(&players[consoleplayer], atoi(COM_Argv(1)));
|
||||||
if (!G_IsSpecialStage(gamemap) || !(maptol & TOL_NIGHTS))
|
|
||||||
players[consoleplayer].totalring -= atoi(COM_Argv(1)); //undo totalring addition done in P_GivePlayerRings
|
players[consoleplayer].totalring -= atoi(COM_Argv(1)); //undo totalring addition done in P_GivePlayerRings
|
||||||
|
|
||||||
G_SetGameModified(multiplayer);
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
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;
|
players[consoleplayer].spheres = 0;
|
||||||
P_GivePlayerSpheres(&players[consoleplayer], atoi(COM_Argv(1)));
|
P_GivePlayerSpheres(&player[consoleplayer], atoi(COM_Argv(1)));
|
||||||
|
// no totalsphere addition to revert
|
||||||
|
}
|
||||||
|
|
||||||
G_SetGameModified(multiplayer);
|
G_SetGameModified(multiplayer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ 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);
|
||||||
|
|
Loading…
Reference in New Issue