mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
* Fix some music and visual bugs with dying in Battle at the conclusion of the round.
* Fix emeralds HUD overlapping minimap in 2P splits.
This commit is contained in:
parent
ab132300a9
commit
f518ae5c58
5 changed files with 41 additions and 27 deletions
28
src/g_game.c
28
src/g_game.c
|
|
@ -2099,6 +2099,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
|
|
||||||
INT32 starpostnum;
|
INT32 starpostnum;
|
||||||
INT32 exiting;
|
INT32 exiting;
|
||||||
|
INT32 khudcardanimation;
|
||||||
INT16 totalring;
|
INT16 totalring;
|
||||||
UINT8 laps;
|
UINT8 laps;
|
||||||
UINT16 skincolor;
|
UINT16 skincolor;
|
||||||
|
|
@ -2186,11 +2187,13 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
rings = ((gametyperules & GTR_SPHERES) ? 0 : 5);
|
rings = ((gametyperules & GTR_SPHERES) ? 0 : 5);
|
||||||
spheres = 0;
|
spheres = 0;
|
||||||
kickstartaccel = 0;
|
kickstartaccel = 0;
|
||||||
khudfault = nocontrol = 0;
|
khudfault = 0;
|
||||||
|
nocontrol = 0;
|
||||||
laps = 0;
|
laps = 0;
|
||||||
totalring = 0;
|
totalring = 0;
|
||||||
roundscore = 0;
|
roundscore = 0;
|
||||||
exiting = 0;
|
exiting = 0;
|
||||||
|
khudcardanimation = 0;
|
||||||
starpostnum = 0;
|
starpostnum = 0;
|
||||||
xtralife = 0;
|
xtralife = 0;
|
||||||
|
|
||||||
|
|
@ -2229,7 +2232,10 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
laps = players[player].laps;
|
laps = players[player].laps;
|
||||||
totalring = players[player].totalring;
|
totalring = players[player].totalring;
|
||||||
roundscore = players[player].roundscore;
|
roundscore = players[player].roundscore;
|
||||||
|
|
||||||
exiting = players[player].exiting;
|
exiting = players[player].exiting;
|
||||||
|
khudcardanimation = (exiting > 0) ? players[player].karthud[khud_cardanimation] : 0;
|
||||||
|
|
||||||
starpostnum = players[player].starpostnum;
|
starpostnum = players[player].starpostnum;
|
||||||
|
|
||||||
xtralife = players[player].xtralife;
|
xtralife = players[player].xtralife;
|
||||||
|
|
@ -2275,6 +2281,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
|
|
||||||
p->starpostnum = starpostnum;
|
p->starpostnum = starpostnum;
|
||||||
p->exiting = exiting;
|
p->exiting = exiting;
|
||||||
|
p->karthud[khud_cardanimation] = khudcardanimation;
|
||||||
|
|
||||||
p->laps = laps;
|
p->laps = laps;
|
||||||
p->totalring = totalring;
|
p->totalring = totalring;
|
||||||
|
|
@ -2358,23 +2365,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
if (leveltime < starttime)
|
if (leveltime < starttime)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (p-players == consoleplayer)
|
if (exiting)
|
||||||
{
|
return;
|
||||||
if (mapmusflags & MUSIC_RELOADRESET)
|
|
||||||
{
|
|
||||||
strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7);
|
|
||||||
mapmusname[6] = 0;
|
|
||||||
mapmusflags = (mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK);
|
|
||||||
mapmusposition = mapheaderinfo[gamemap-1]->muspos;
|
|
||||||
mapmusresume = 0;
|
|
||||||
songcredit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is in S_Start, but this was not here previously.
|
|
||||||
// if (RESETMUSIC)
|
|
||||||
// S_StopMusic();
|
|
||||||
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
P_RestoreMusic(p);
|
P_RestoreMusic(p);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2066,6 +2066,10 @@ static void K_drawKartEmeralds(void)
|
||||||
if (r_splitscreen < 2)
|
if (r_splitscreen < 2)
|
||||||
{
|
{
|
||||||
startx -= 8;
|
startx -= 8;
|
||||||
|
if (r_splitscreen == 1 && stplyr == &players[displayplayers[0]])
|
||||||
|
{
|
||||||
|
starty = 1;
|
||||||
|
}
|
||||||
V_DrawScaledPatch(startx, starty, V_HUDTRANS|splitflags, kp_rankemeraldback);
|
V_DrawScaledPatch(startx, starty, V_HUDTRANS|splitflags, kp_rankemeraldback);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2935,7 +2939,9 @@ static boolean K_ShowPlayerNametag(player_t *p)
|
||||||
|
|
||||||
if (gametyperules & GTR_CIRCUIT)
|
if (gametyperules & GTR_CIRCUIT)
|
||||||
{
|
{
|
||||||
if ((p->position < stplyr->position-2)
|
if ((p->position == 0)
|
||||||
|
|| (stplyr->position == 0)
|
||||||
|
|| (p->position < stplyr->position-2)
|
||||||
|| (p->position > stplyr->position+2))
|
|| (p->position > stplyr->position+2))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -7206,7 +7206,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
|
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((battleovertime.enabled >= 10*TICRATE) && !(player->pflags & PF_ELIMINATED))
|
if ((battleovertime.enabled >= 10*TICRATE) && !(player->pflags & PF_ELIMINATED) && !player->exiting)
|
||||||
{
|
{
|
||||||
fixed_t distanceToBarrier = 0;
|
fixed_t distanceToBarrier = 0;
|
||||||
|
|
||||||
|
|
@ -8416,7 +8416,10 @@ void K_StripOther(player_t *player)
|
||||||
player->roulettetype = 0;
|
player->roulettetype = 0;
|
||||||
|
|
||||||
player->invincibilitytimer = 0;
|
player->invincibilitytimer = 0;
|
||||||
|
if (player->growshrinktimer)
|
||||||
|
{
|
||||||
K_RemoveGrowShrink(player);
|
K_RemoveGrowShrink(player);
|
||||||
|
}
|
||||||
|
|
||||||
if (player->eggmanexplode)
|
if (player->eggmanexplode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10788,7 +10788,7 @@ void P_RespawnSpecials(void)
|
||||||
//
|
//
|
||||||
void P_SpawnPlayer(INT32 playernum)
|
void P_SpawnPlayer(INT32 playernum)
|
||||||
{
|
{
|
||||||
UINT8 i, pcount = 0;
|
UINT8 i, pcount = 0; // MAXPLAYERS if exiting
|
||||||
player_t *p = &players[playernum];
|
player_t *p = &players[playernum];
|
||||||
mobj_t *mobj;
|
mobj_t *mobj;
|
||||||
|
|
||||||
|
|
@ -10801,6 +10801,11 @@ void P_SpawnPlayer(INT32 playernum)
|
||||||
continue;
|
continue;
|
||||||
if (!playeringame[i] || players[i].spectator)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
continue;
|
continue;
|
||||||
|
if (players[i].exiting)
|
||||||
|
{
|
||||||
|
pcount = MAXPLAYERS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (players[i].jointime <= 1) // Prevent splitscreen hosters/joiners from only adding 1 player at a time in empty servers
|
if (players[i].jointime <= 1) // Prevent splitscreen hosters/joiners from only adding 1 player at a time in empty servers
|
||||||
continue;
|
continue;
|
||||||
pcount++;
|
pcount++;
|
||||||
|
|
|
||||||
18
src/p_user.c
18
src/p_user.c
|
|
@ -708,7 +708,7 @@ boolean P_EndingMusic(player_t *player)
|
||||||
{
|
{
|
||||||
char buffer[9];
|
char buffer[9];
|
||||||
boolean looping = true;
|
boolean looping = true;
|
||||||
INT32 bestlocalpos;
|
INT32 bestlocalpos, test;
|
||||||
player_t *bestlocalplayer;
|
player_t *bestlocalplayer;
|
||||||
|
|
||||||
if (!P_IsLocalPlayer(player)) // Only applies to a local player
|
if (!P_IsLocalPlayer(player)) // Only applies to a local player
|
||||||
|
|
@ -719,6 +719,11 @@ boolean P_EndingMusic(player_t *player)
|
||||||
|
|
||||||
// Event - Level Finish
|
// Event - Level Finish
|
||||||
// Check for if this is valid or not
|
// Check for if this is valid or not
|
||||||
|
#define getplayerpos(p) \
|
||||||
|
(((players[p].position < 1) || (players[p].pflags & PF_NOCONTEST)) \
|
||||||
|
? MAXPLAYERS+1 \
|
||||||
|
: players[p].position);
|
||||||
|
|
||||||
if (r_splitscreen)
|
if (r_splitscreen)
|
||||||
{
|
{
|
||||||
if (!((players[displayplayers[0]].exiting || (players[displayplayers[0]].pflags & PF_NOCONTEST))
|
if (!((players[displayplayers[0]].exiting || (players[displayplayers[0]].pflags & PF_NOCONTEST))
|
||||||
|
|
@ -728,12 +733,13 @@ boolean P_EndingMusic(player_t *player)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bestlocalplayer = &players[displayplayers[0]];
|
bestlocalplayer = &players[displayplayers[0]];
|
||||||
bestlocalpos = ((players[displayplayers[0]].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[displayplayers[0]].position);
|
bestlocalpos = getplayerpos(displayplayers[0]);
|
||||||
#define setbests(p) \
|
#define setbests(p) \
|
||||||
if (((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].position) < bestlocalpos) \
|
test = getplayerpos(p); \
|
||||||
|
if (test < bestlocalpos) \
|
||||||
{ \
|
{ \
|
||||||
bestlocalplayer = &players[p]; \
|
bestlocalplayer = &players[p]; \
|
||||||
bestlocalpos = ((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].position); \
|
bestlocalpos = test; \
|
||||||
}
|
}
|
||||||
setbests(displayplayers[1]);
|
setbests(displayplayers[1]);
|
||||||
if (r_splitscreen > 1)
|
if (r_splitscreen > 1)
|
||||||
|
|
@ -748,9 +754,11 @@ boolean P_EndingMusic(player_t *player)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bestlocalplayer = player;
|
bestlocalplayer = player;
|
||||||
bestlocalpos = ((player->pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : player->position);
|
bestlocalpos = getplayerpos((player-players));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef getplayerpos
|
||||||
|
|
||||||
if ((gametyperules & GTR_CIRCUIT) && bestlocalpos == MAXPLAYERS+1)
|
if ((gametyperules & GTR_CIRCUIT) && bestlocalpos == MAXPLAYERS+1)
|
||||||
sprintf(buffer, "k*fail"); // F-Zero death results theme
|
sprintf(buffer, "k*fail"); // F-Zero death results theme
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue