Merge branch 'shitty-sign-markedfordeath' into 'master'

Add ability for shitty signs to display when 1st place finishes while markedfordeath

See merge request kart-krew-dev/ring-racers!28
This commit is contained in:
Eidolon 2025-09-30 17:16:26 -05:00
commit 6f61cfaefa
6 changed files with 20 additions and 2 deletions

View file

@ -1129,6 +1129,8 @@ struct player_t
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?
UINT32 lastringboost; // What was our accumulated boost when locking the award? UINT32 lastringboost; // What was our accumulated boost when locking the award?

View file

@ -2313,6 +2313,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
INT16 duelscore; INT16 duelscore;
boolean mfdfinish;
roundconditions_t roundconditions; roundconditions_t roundconditions;
boolean saveroundconditions; boolean saveroundconditions;
@ -2407,6 +2409,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;
@ -2676,6 +2681,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
p->finalized = finalized; p->finalized = finalized;
p->mfdfinish = mfdfinish;
// SRB2kart // SRB2kart
p->itemtype = itemtype; p->itemtype = itemtype;
p->itemamount = itemamount; p->itemamount = itemamount;

View file

@ -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"))

View file

@ -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])

View file

@ -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);

View file

@ -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)