mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Add ability for shitty signs to display when 1st place finishes while markedfordeath
This commit is contained in:
parent
daa6dbd667
commit
932deb0b3f
6 changed files with 20 additions and 2 deletions
|
|
@ -1128,6 +1128,8 @@ struct player_t
|
||||||
boolean dotrickfx;
|
boolean dotrickfx;
|
||||||
boolean stingfx;
|
boolean stingfx;
|
||||||
UINT8 bumperinflate;
|
UINT8 bumperinflate;
|
||||||
|
|
||||||
|
boolean mfdfinish; // Did you cross the finish line while just about to explode?
|
||||||
|
|
||||||
UINT8 ringboxdelay; // Delay until Ring Box auto-activates
|
UINT8 ringboxdelay; // Delay until Ring Box auto-activates
|
||||||
UINT8 ringboxaward; // Where did we stop?
|
UINT8 ringboxaward; // Where did we stop?
|
||||||
|
|
|
||||||
|
|
@ -2312,6 +2312,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
UINT16 bigwaypointgap;
|
UINT16 bigwaypointgap;
|
||||||
|
|
||||||
INT16 duelscore;
|
INT16 duelscore;
|
||||||
|
|
||||||
|
boolean mfdfinish;
|
||||||
|
|
||||||
roundconditions_t roundconditions;
|
roundconditions_t roundconditions;
|
||||||
boolean saveroundconditions;
|
boolean saveroundconditions;
|
||||||
|
|
@ -2406,6 +2408,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
|
|
||||||
totalring = players[player].totalring;
|
totalring = players[player].totalring;
|
||||||
xtralife = players[player].xtralife;
|
xtralife = players[player].xtralife;
|
||||||
|
|
||||||
|
mfdfinish = players[player].mfdfinish;
|
||||||
|
|
||||||
pflags = (players[player].pflags & (PF_WANTSTOJOIN|PF_KICKSTARTACCEL|PF_SHRINKME|PF_SHRINKACTIVE|PF_AUTOROULETTE|PF_ANALOGSTICK|PF_AUTORING));
|
pflags = (players[player].pflags & (PF_WANTSTOJOIN|PF_KICKSTARTACCEL|PF_SHRINKME|PF_SHRINKACTIVE|PF_AUTOROULETTE|PF_ANALOGSTICK|PF_AUTORING));
|
||||||
pflags2 = (players[player].pflags2 & (PF2_SELFMUTE | PF2_SELFDEAFEN | PF2_SERVERTEMPMUTE | PF2_SERVERMUTE | PF2_SERVERDEAFEN | PF2_STRICTFASTFALL));
|
pflags2 = (players[player].pflags2 & (PF2_SELFMUTE | PF2_SELFDEAFEN | PF2_SERVERTEMPMUTE | PF2_SERVERMUTE | PF2_SERVERDEAFEN | PF2_STRICTFASTFALL));
|
||||||
|
|
@ -2483,6 +2487,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
lastsafecheatcheck = 0;
|
lastsafecheatcheck = 0;
|
||||||
bigwaypointgap = 0;
|
bigwaypointgap = 0;
|
||||||
duelscore = 0;
|
duelscore = 0;
|
||||||
|
mfdfinish = 0;
|
||||||
|
|
||||||
finalized = false;
|
finalized = false;
|
||||||
|
|
||||||
|
|
@ -2675,6 +2680,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
p->xtralife = xtralife;
|
p->xtralife = xtralife;
|
||||||
|
|
||||||
p->finalized = finalized;
|
p->finalized = finalized;
|
||||||
|
|
||||||
|
p->mfdfinish = mfdfinish;
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
p->itemtype = itemtype;
|
p->itemtype = itemtype;
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushboolean(L, plr->transfer);
|
lua_pushboolean(L, plr->transfer);
|
||||||
else if (fastcmp(field,"markedfordeath"))
|
else if (fastcmp(field,"markedfordeath"))
|
||||||
lua_pushboolean(L, plr->markedfordeath);
|
lua_pushboolean(L, plr->markedfordeath);
|
||||||
|
else if (fastcmp(field,"mfdfinish"))
|
||||||
|
lua_pushboolean(L, plr->mfdfinish);
|
||||||
else if (fastcmp(field,"incontrol"))
|
else if (fastcmp(field,"incontrol"))
|
||||||
lua_pushboolean(L, plr->incontrol);
|
lua_pushboolean(L, plr->incontrol);
|
||||||
else if (fastcmp(field,"progressivethrust"))
|
else if (fastcmp(field,"progressivethrust"))
|
||||||
|
|
@ -948,6 +950,8 @@ static int player_set(lua_State *L)
|
||||||
plr->transfer = luaL_checkboolean(L, 3);
|
plr->transfer = luaL_checkboolean(L, 3);
|
||||||
else if (fastcmp(field,"markedfordeath"))
|
else if (fastcmp(field,"markedfordeath"))
|
||||||
plr->markedfordeath = luaL_checkboolean(L, 3);
|
plr->markedfordeath = luaL_checkboolean(L, 3);
|
||||||
|
else if (fastcmp(field,"mfdfinish"))
|
||||||
|
plr->mfdfinish = luaL_checkboolean(L, 3);
|
||||||
else if (fastcmp(field,"dotrickfx"))
|
else if (fastcmp(field,"dotrickfx"))
|
||||||
plr->dotrickfx = luaL_checkboolean(L, 3);
|
plr->dotrickfx = luaL_checkboolean(L, 3);
|
||||||
else if (fastcmp(field,"stingfx"))
|
else if (fastcmp(field,"stingfx"))
|
||||||
|
|
|
||||||
|
|
@ -9476,8 +9476,10 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
// it's still necessary to refresh SPR2 on skin changes.
|
// it's still necessary to refresh SPR2 on skin changes.
|
||||||
P_SetMobjState(cur, (newperfect == true) ? S_KART_SIGL : S_KART_SIGN);
|
P_SetMobjState(cur, (newperfect == true) ? S_KART_SIGL : S_KART_SIGN);
|
||||||
|
|
||||||
if (cv_shittysigns.value && cur->state != &states[S_KART_SIGL])
|
if ((cv_shittysigns.value || newplayer->mfdfinish) && cur->state != &states[S_KART_SIGL])
|
||||||
cur->sprite2 = P_GetSkinSprite2(skins[newplayer->skin], SPR2_SSIG, NULL);;
|
{
|
||||||
|
cur->sprite2 = P_GetSkinSprite2(skins[newplayer->skin], SPR2_SSIG, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (cur->state == &states[S_SIGN_ERROR])
|
else if (cur->state == &states[S_SIGN_ERROR])
|
||||||
|
|
|
||||||
|
|
@ -700,6 +700,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
WRITEUINT8(save->p, players[i].analoginput);
|
WRITEUINT8(save->p, players[i].analoginput);
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].markedfordeath);
|
WRITEUINT8(save->p, players[i].markedfordeath);
|
||||||
|
WRITEUINT8(save->p, players[i].mfdfinish);
|
||||||
WRITEUINT8(save->p, players[i].dotrickfx);
|
WRITEUINT8(save->p, players[i].dotrickfx);
|
||||||
WRITEUINT8(save->p, players[i].stingfx);
|
WRITEUINT8(save->p, players[i].stingfx);
|
||||||
WRITEUINT8(save->p, players[i].bumperinflate);
|
WRITEUINT8(save->p, players[i].bumperinflate);
|
||||||
|
|
@ -1377,6 +1378,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
players[i].analoginput = READUINT8(save->p);
|
players[i].analoginput = READUINT8(save->p);
|
||||||
|
|
||||||
players[i].markedfordeath = READUINT8(save->p);
|
players[i].markedfordeath = READUINT8(save->p);
|
||||||
|
players[i].mfdfinish = READUINT8(save->p);
|
||||||
players[i].dotrickfx = READUINT8(save->p);
|
players[i].dotrickfx = READUINT8(save->p);
|
||||||
players[i].stingfx = READUINT8(save->p);
|
players[i].stingfx = READUINT8(save->p);
|
||||||
players[i].bumperinflate = READUINT8(save->p);
|
players[i].bumperinflate = READUINT8(save->p);
|
||||||
|
|
|
||||||
|
|
@ -1272,6 +1272,7 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
||||||
if (!player->spectator && (gametyperules & GTR_CIRCUIT)) // Special Race-like handling
|
if (!player->spectator && (gametyperules & GTR_CIRCUIT)) // Special Race-like handling
|
||||||
{
|
{
|
||||||
K_UpdateAllPlayerPositions();
|
K_UpdateAllPlayerPositions();
|
||||||
|
player->mfdfinish = player->markedfordeath;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gametyperules & GTR_SPHERES) && (player->pflags & PF_RINGLOCK) && grandprixinfo.gp)
|
if (!(gametyperules & GTR_SPHERES) && (player->pflags & PF_RINGLOCK) && grandprixinfo.gp)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue