mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Fix the egregrious bugs from our last testing netgame.
* Made Got_Teamchange's level-based stuff only happen in GS_LEVEL. * If, by chance, DoTimeOver gets called on a player without an object, it won't crash either. * Make ending music play when you get time overed. * Make changing-to-spectators get removed from the intermission drawer.
This commit is contained in:
parent
1890eb5df8
commit
c14bdac3c4
3 changed files with 13 additions and 10 deletions
|
|
@ -3232,6 +3232,9 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gamestate != GS_LEVEL)
|
||||||
|
return;
|
||||||
|
|
||||||
// Clear player score and rings if a spectator.
|
// Clear player score and rings if a spectator.
|
||||||
if (players[playernum].spectator)
|
if (players[playernum].spectator)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9065,9 +9065,14 @@ void P_DoTimeOver(player_t *player)
|
||||||
&& !demoplayback)
|
&& !demoplayback)
|
||||||
legitimateexit = true; // SRB2kart: losing a race is still seeing it through to the end :p
|
legitimateexit = true; // SRB2kart: losing a race is still seeing it through to the end :p
|
||||||
|
|
||||||
S_StopSound(player->mo);
|
if (player->mo)
|
||||||
P_DamageMobj(player->mo, NULL, NULL, 10000);
|
{
|
||||||
|
S_StopSound(player->mo);
|
||||||
|
P_DamageMobj(player->mo, NULL, NULL, 10000);
|
||||||
|
}
|
||||||
player->lives = 0;
|
player->lives = 0;
|
||||||
|
|
||||||
|
P_EndingMusic(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -337,9 +337,6 @@ void Y_IntermissionDrawer(void)
|
||||||
char name[MAXPLAYERNAME+1];
|
char name[MAXPLAYERNAME+1];
|
||||||
const char *timeheader = (intertype == int_race) ? "TIME" : "HITS";
|
const char *timeheader = (intertype == int_race) ? "TIME" : "HITS";
|
||||||
|
|
||||||
boolean completed[MAXPLAYERS];
|
|
||||||
memset(completed, 0, sizeof (completed));
|
|
||||||
|
|
||||||
// draw the level name
|
// draw the level name
|
||||||
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20, 0, data.match.levelstring);
|
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20, 0, data.match.levelstring);
|
||||||
V_DrawFill(x, 42, 312, 1, 0);
|
V_DrawFill(x, 42, 312, 1, 0);
|
||||||
|
|
@ -369,12 +366,12 @@ void Y_IntermissionDrawer(void)
|
||||||
|
|
||||||
for (i = 0; i < data.match.numplayers; i++)
|
for (i = 0; i < data.match.numplayers; i++)
|
||||||
{
|
{
|
||||||
V_DrawCenteredString(x+6, y, 0, va("%d", data.match.pos[i]));
|
if (data.match.num[i] != MAXPLAYERS && playeringame[data.match.num[i]] && !players[data.match.num[i]].spectator)
|
||||||
|
|
||||||
if (data.match.num[i] != MAXPLAYERS && playeringame[data.match.num[i]])
|
|
||||||
{
|
{
|
||||||
char strtime[10];
|
char strtime[10];
|
||||||
|
|
||||||
|
V_DrawCenteredString(x+6, y, 0, va("%d", data.match.pos[i]));
|
||||||
|
|
||||||
if (data.match.color[i] == 0)
|
if (data.match.color[i] == 0)
|
||||||
V_DrawSmallScaledPatch(x+16, y-4, 0,faceprefix[*data.match.character[i]]);
|
V_DrawSmallScaledPatch(x+16, y-4, 0,faceprefix[*data.match.character[i]]);
|
||||||
else
|
else
|
||||||
|
|
@ -442,8 +439,6 @@ void Y_IntermissionDrawer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
completed[i] = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
data.match.num[i] = MAXPLAYERS;
|
data.match.num[i] = MAXPLAYERS;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue