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 exiting;
|
||||
INT32 khudcardanimation;
|
||||
INT16 totalring;
|
||||
UINT8 laps;
|
||||
UINT16 skincolor;
|
||||
|
|
@ -2186,11 +2187,13 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
rings = ((gametyperules & GTR_SPHERES) ? 0 : 5);
|
||||
spheres = 0;
|
||||
kickstartaccel = 0;
|
||||
khudfault = nocontrol = 0;
|
||||
khudfault = 0;
|
||||
nocontrol = 0;
|
||||
laps = 0;
|
||||
totalring = 0;
|
||||
roundscore = 0;
|
||||
exiting = 0;
|
||||
khudcardanimation = 0;
|
||||
starpostnum = 0;
|
||||
xtralife = 0;
|
||||
|
||||
|
|
@ -2229,7 +2232,10 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
laps = players[player].laps;
|
||||
totalring = players[player].totalring;
|
||||
roundscore = players[player].roundscore;
|
||||
|
||||
exiting = players[player].exiting;
|
||||
khudcardanimation = (exiting > 0) ? players[player].karthud[khud_cardanimation] : 0;
|
||||
|
||||
starpostnum = players[player].starpostnum;
|
||||
|
||||
xtralife = players[player].xtralife;
|
||||
|
|
@ -2275,6 +2281,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
|
||||
p->starpostnum = starpostnum;
|
||||
p->exiting = exiting;
|
||||
p->karthud[khud_cardanimation] = khudcardanimation;
|
||||
|
||||
p->laps = laps;
|
||||
p->totalring = totalring;
|
||||
|
|
@ -2358,23 +2365,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
if (leveltime < starttime)
|
||||
return;
|
||||
|
||||
if (p-players == consoleplayer)
|
||||
{
|
||||
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);
|
||||
}
|
||||
if (exiting)
|
||||
return;
|
||||
|
||||
P_RestoreMusic(p);
|
||||
|
||||
|
|
|
|||
|
|
@ -2066,6 +2066,10 @@ static void K_drawKartEmeralds(void)
|
|||
if (r_splitscreen < 2)
|
||||
{
|
||||
startx -= 8;
|
||||
if (r_splitscreen == 1 && stplyr == &players[displayplayers[0]])
|
||||
{
|
||||
starty = 1;
|
||||
}
|
||||
V_DrawScaledPatch(startx, starty, V_HUDTRANS|splitflags, kp_rankemeraldback);
|
||||
}
|
||||
else
|
||||
|
|
@ -2935,7 +2939,9 @@ static boolean K_ShowPlayerNametag(player_t *p)
|
|||
|
||||
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))
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -7206,7 +7206,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
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;
|
||||
|
||||
|
|
@ -8416,7 +8416,10 @@ void K_StripOther(player_t *player)
|
|||
player->roulettetype = 0;
|
||||
|
||||
player->invincibilitytimer = 0;
|
||||
K_RemoveGrowShrink(player);
|
||||
if (player->growshrinktimer)
|
||||
{
|
||||
K_RemoveGrowShrink(player);
|
||||
}
|
||||
|
||||
if (player->eggmanexplode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10788,7 +10788,7 @@ void P_RespawnSpecials(void)
|
|||
//
|
||||
void P_SpawnPlayer(INT32 playernum)
|
||||
{
|
||||
UINT8 i, pcount = 0;
|
||||
UINT8 i, pcount = 0; // MAXPLAYERS if exiting
|
||||
player_t *p = &players[playernum];
|
||||
mobj_t *mobj;
|
||||
|
||||
|
|
@ -10801,6 +10801,11 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
continue;
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
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
|
||||
continue;
|
||||
pcount++;
|
||||
|
|
|
|||
18
src/p_user.c
18
src/p_user.c
|
|
@ -708,7 +708,7 @@ boolean P_EndingMusic(player_t *player)
|
|||
{
|
||||
char buffer[9];
|
||||
boolean looping = true;
|
||||
INT32 bestlocalpos;
|
||||
INT32 bestlocalpos, test;
|
||||
player_t *bestlocalplayer;
|
||||
|
||||
if (!P_IsLocalPlayer(player)) // Only applies to a local player
|
||||
|
|
@ -719,6 +719,11 @@ boolean P_EndingMusic(player_t *player)
|
|||
|
||||
// Event - Level Finish
|
||||
// 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 (!((players[displayplayers[0]].exiting || (players[displayplayers[0]].pflags & PF_NOCONTEST))
|
||||
|
|
@ -728,12 +733,13 @@ boolean P_EndingMusic(player_t *player)
|
|||
return false;
|
||||
|
||||
bestlocalplayer = &players[displayplayers[0]];
|
||||
bestlocalpos = ((players[displayplayers[0]].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[displayplayers[0]].position);
|
||||
bestlocalpos = getplayerpos(displayplayers[0]);
|
||||
#define setbests(p) \
|
||||
if (((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].position) < bestlocalpos) \
|
||||
test = getplayerpos(p); \
|
||||
if (test < bestlocalpos) \
|
||||
{ \
|
||||
bestlocalplayer = &players[p]; \
|
||||
bestlocalpos = ((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].position); \
|
||||
bestlocalpos = test; \
|
||||
}
|
||||
setbests(displayplayers[1]);
|
||||
if (r_splitscreen > 1)
|
||||
|
|
@ -748,9 +754,11 @@ boolean P_EndingMusic(player_t *player)
|
|||
return false;
|
||||
|
||||
bestlocalplayer = player;
|
||||
bestlocalpos = ((player->pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : player->position);
|
||||
bestlocalpos = getplayerpos((player-players));
|
||||
}
|
||||
|
||||
#undef getplayerpos
|
||||
|
||||
if ((gametyperules & GTR_CIRCUIT) && bestlocalpos == MAXPLAYERS+1)
|
||||
sprintf(buffer, "k*fail"); // F-Zero death results theme
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue