mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
Adjust the circumstances players can get lives in GP contexts
- Permit awarding in A_ForceWin
- Set var1 to 1 to do so
- More tightly restrict against awarding in GPEVENT_SPECIAL specifically
This commit is contained in:
parent
9cbaaa2f11
commit
c72fcca57e
3 changed files with 7 additions and 4 deletions
|
|
@ -9232,12 +9232,14 @@ void A_ForceStop(mobj_t *actor)
|
|||
//
|
||||
// Description: Makes all players win the level.
|
||||
//
|
||||
// var1 = unused
|
||||
// var1:
|
||||
// if var1 == 1, give a life in GP contexts
|
||||
// var2 = unused
|
||||
//
|
||||
void A_ForceWin(mobj_t *actor)
|
||||
{
|
||||
INT32 i;
|
||||
INT32 locvar1 = var1;
|
||||
|
||||
if (LUA_CallAction(A_FORCEWIN, actor))
|
||||
return;
|
||||
|
|
@ -9252,7 +9254,7 @@ void A_ForceWin(mobj_t *actor)
|
|||
if (i == MAXPLAYERS)
|
||||
return;
|
||||
|
||||
P_DoAllPlayersExit(0, false);
|
||||
P_DoAllPlayersExit(0, (locvar1 == 1));
|
||||
}
|
||||
|
||||
// Function: A_SpikeRetract
|
||||
|
|
|
|||
|
|
@ -1080,7 +1080,7 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
|||
|
||||
if (++numtargets >= maptargets)
|
||||
{
|
||||
P_DoAllPlayersExit(0, (grandprixinfo.gp == true));
|
||||
P_DoAllPlayersExit(0, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1296,7 +1296,7 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
|||
player->hudrings = 20;
|
||||
|
||||
if (grandprixinfo.gp == true
|
||||
&& grandprixinfo.eventmode == GPEVENT_NONE
|
||||
&& grandprixinfo.eventmode != GPEVENT_SPECIAL
|
||||
&& player->bot == false && losing == false)
|
||||
{
|
||||
const UINT8 lifethreshold = 20;
|
||||
|
|
@ -1365,6 +1365,7 @@ void P_DoAllPlayersExit(pflags_t flags, boolean trygivelife)
|
|||
const boolean dofinishsound = (musiccountdown == 0);
|
||||
|
||||
if (grandprixinfo.gp == false
|
||||
|| grandprixinfo.eventmode == GPEVENT_SPECIAL
|
||||
|| (flags & PF_NOCONTEST))
|
||||
{
|
||||
trygivelife = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue