mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 07:22:10 +00:00
Merge branch 'battle-cusp' into 'master'
Battle: small balance changes (also setspheres command) See merge request KartKrew/Kart!1313
This commit is contained in:
commit
45d1d2cd48
6 changed files with 36 additions and 3 deletions
|
|
@ -1118,6 +1118,7 @@ void D_RegisterClientCommands(void)
|
||||||
COM_AddCommand("noclip", Command_CheatNoClip_f);
|
COM_AddCommand("noclip", Command_CheatNoClip_f);
|
||||||
COM_AddCommand("god", Command_CheatGod_f);
|
COM_AddCommand("god", Command_CheatGod_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("setscore", Command_Setscore_f);
|
COM_AddCommand("setscore", Command_Setscore_f);
|
||||||
COM_AddCommand("devmode", Command_Devmode_f);
|
COM_AddCommand("devmode", Command_Devmode_f);
|
||||||
|
|
@ -2094,6 +2095,10 @@ void D_Cheat(INT32 playernum, INT32 cheat, ...)
|
||||||
case CHEAT_RESPAWNAT:
|
case CHEAT_RESPAWNAT:
|
||||||
COPY(WRITEINT32, INT32);
|
COPY(WRITEINT32, INT32);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CHEAT_SPHERES:
|
||||||
|
COPY(WRITEINT16, int);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef COPY
|
#undef COPY
|
||||||
|
|
@ -6242,6 +6247,17 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case CHEAT_SPHERES: {
|
||||||
|
INT16 spheres = READINT16(*cp);
|
||||||
|
|
||||||
|
// P_GivePlayerSpheres does value clamping
|
||||||
|
player->spheres = 0;
|
||||||
|
P_GivePlayerSpheres(player, spheres);
|
||||||
|
|
||||||
|
CV_CheaterWarning(targetPlayer, va("spheres = %d", spheres));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NUMBER_OF_CHEATS:
|
case NUMBER_OF_CHEATS:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -435,6 +435,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
mobj_t *spotList[MAXITEM];
|
mobj_t *spotList[MAXITEM];
|
||||||
UINT8 spotMap[MAXITEM];
|
UINT8 spotMap[MAXITEM];
|
||||||
UINT8 spotCount = 0, spotBackup = 0, spotAvailable = 0;
|
UINT8 spotCount = 0, spotBackup = 0, spotAvailable = 0;
|
||||||
|
UINT8 monitorsSpawned = 0;
|
||||||
|
|
||||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||||
{
|
{
|
||||||
|
|
@ -458,6 +459,10 @@ void K_RunPaperItemSpawners(void)
|
||||||
spotMap[spotAvailable] = spotCount;
|
spotMap[spotAvailable] = spotCount;
|
||||||
spotAvailable++;
|
spotAvailable++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
monitorsSpawned++;
|
||||||
|
}
|
||||||
|
|
||||||
spotList[spotCount] = mo;
|
spotList[spotCount] = mo;
|
||||||
spotCount++;
|
spotCount++;
|
||||||
|
|
@ -484,7 +489,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
|
|
||||||
//CONS_Printf("leveltime = %d ", leveltime);
|
//CONS_Printf("leveltime = %d ", leveltime);
|
||||||
|
|
||||||
if (spotAvailable > 0)
|
if (spotAvailable > 0 && monitorsSpawned < BATTLE_MONITOR_SPAWN_LIMIT)
|
||||||
{
|
{
|
||||||
const UINT8 r = spotMap[P_RandomKey(PR_ITEM_ROULETTE, spotAvailable)];
|
const UINT8 r = spotMap[P_RandomKey(PR_ITEM_ROULETTE, spotAvailable)];
|
||||||
|
|
||||||
|
|
@ -498,7 +503,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
spotMap[i] = i;
|
spotMap[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gametyperules & GTR_SPHERES) && IsOnInterval(2 * interval))
|
if ((gametyperules & GTR_SPHERES) && IsOnInterval(16 * interval))
|
||||||
{
|
{
|
||||||
spotBackup = spotCount;
|
spotBackup = spotCount;
|
||||||
for (i = 0; i < pcount; i++)
|
for (i = 0; i < pcount; i++)
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ extern "C" {
|
||||||
#define BATTLE_DESPAWN_TIME (15*TICRATE)
|
#define BATTLE_DESPAWN_TIME (15*TICRATE)
|
||||||
#define BATTLE_POWERUP_TIME (20*TICRATE)
|
#define BATTLE_POWERUP_TIME (20*TICRATE)
|
||||||
|
|
||||||
|
#define BATTLE_MONITOR_SPAWN_LIMIT (3)
|
||||||
|
|
||||||
extern struct battleovertime
|
extern struct battleovertime
|
||||||
{
|
{
|
||||||
UINT16 enabled; ///< Has this been initalized yet?
|
UINT16 enabled; ///< Has this been initalized yet?
|
||||||
|
|
|
||||||
|
|
@ -12195,7 +12195,7 @@ UINT32 K_PointLimitForGametype(void)
|
||||||
{
|
{
|
||||||
if (D_IsPlayerHumanAndGaming(i))
|
if (D_IsPlayerHumanAndGaming(i))
|
||||||
{
|
{
|
||||||
ptsCap += 5;
|
ptsCap += 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -560,6 +560,14 @@ void Command_Setrings_f(void)
|
||||||
D_Cheat(consoleplayer, CHEAT_RINGS, atoi(COM_Argv(1)));
|
D_Cheat(consoleplayer, CHEAT_RINGS, atoi(COM_Argv(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Command_Setspheres_f(void)
|
||||||
|
{
|
||||||
|
REQUIRE_CHEATS;
|
||||||
|
REQUIRE_INLEVEL;
|
||||||
|
|
||||||
|
D_Cheat(consoleplayer, CHEAT_SPHERES, atoi(COM_Argv(1)));
|
||||||
|
}
|
||||||
|
|
||||||
void Command_Setlives_f(void)
|
void Command_Setlives_f(void)
|
||||||
{
|
{
|
||||||
REQUIRE_CHEATS;
|
REQUIRE_CHEATS;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ typedef enum {
|
||||||
CHEAT_ANGLE,
|
CHEAT_ANGLE,
|
||||||
CHEAT_RESPAWNAT,
|
CHEAT_RESPAWNAT,
|
||||||
CHEAT_GIVEPOWERUP,
|
CHEAT_GIVEPOWERUP,
|
||||||
|
CHEAT_SPHERES,
|
||||||
|
|
||||||
NUMBER_OF_CHEATS
|
NUMBER_OF_CHEATS
|
||||||
} cheat_t;
|
} cheat_t;
|
||||||
|
|
@ -75,6 +76,7 @@ void Command_CheatNoClip_f(void);
|
||||||
void Command_CheatGod_f(void);
|
void Command_CheatGod_f(void);
|
||||||
void Command_Savecheckpoint_f(void);
|
void Command_Savecheckpoint_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_Setscore_f(void);
|
void Command_Setscore_f(void);
|
||||||
void Command_Devmode_f(void);
|
void Command_Devmode_f(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue