mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-25 13:21:05 +00:00
Splitscreen fixes
initialize flipcam2 player 2 gets game over music now. restore the other player's music when the dead player is done sulking about their game over
This commit is contained in:
parent
5aea82ec91
commit
3117a6a16e
4 changed files with 24 additions and 6 deletions
|
@ -2935,9 +2935,9 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
||||||
if (botingame)
|
if (botingame)
|
||||||
players[newplayernum].bot = 1;
|
players[newplayernum].bot = 1;
|
||||||
// Same goes for player 2 when relevant
|
// Same goes for player 2 when relevant
|
||||||
players[newplayernum].pflags &= ~(/*PF_FLIPCAM|*/PF_ANALOGMODE);
|
players[newplayernum].pflags &= ~(PF_FLIPCAM|PF_ANALOGMODE);
|
||||||
//if (cv_flipcam2.value)
|
if (cv_flipcam2.value)
|
||||||
//players[newplayernum].pflags |= PF_FLIPCAM;
|
players[newplayernum].pflags |= PF_FLIPCAM;
|
||||||
if (cv_analog2.value)
|
if (cv_analog2.value)
|
||||||
players[newplayernum].pflags |= PF_ANALOGMODE;
|
players[newplayernum].pflags |= PF_ANALOGMODE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2068,7 +2068,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
|
|
||||||
if (target->player->lives <= 0) // Tails 03-14-2000
|
if (target->player->lives <= 0) // Tails 03-14-2000
|
||||||
{
|
{
|
||||||
if (P_IsLocalPlayer(target->player) && target->player == &players[consoleplayer])
|
if (P_IsLocalPlayer(target->player)/* && target->player == &players[consoleplayer] */)
|
||||||
{
|
{
|
||||||
S_StopMusic(); // Stop the Music! Tails 03-14-2000
|
S_StopMusic(); // Stop the Music! Tails 03-14-2000
|
||||||
S_ChangeMusicInternal("gmover", false); // Yousa dead now, Okieday? Tails 03-14-2000
|
S_ChangeMusicInternal("gmover", false); // Yousa dead now, Okieday? Tails 03-14-2000
|
||||||
|
|
19
src/p_user.c
19
src/p_user.c
|
@ -7716,9 +7716,26 @@ static void P_DeathThink(player_t *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return to level music
|
// Return to level music
|
||||||
if (netgame && player->deadtimer == gameovertics && P_IsLocalPlayer(player))
|
if (player->lives <= 0)
|
||||||
|
{
|
||||||
|
if (netgame)
|
||||||
|
{
|
||||||
|
if (player->deadtimer == gameovertics && P_IsLocalPlayer(player))
|
||||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||||
}
|
}
|
||||||
|
else if (multiplayer) // local multiplayer only
|
||||||
|
{
|
||||||
|
if (player->deadtimer != gameovertics)
|
||||||
|
;
|
||||||
|
// Restore the other player's music once we're dead for long enough
|
||||||
|
// -- that is, as long as they aren't dead too
|
||||||
|
else if (player == &players[displayplayer] && players[secondarydisplayplayer].lives > 0)
|
||||||
|
P_RestoreMusic(&players[secondarydisplayplayer]);
|
||||||
|
else if (player == &players[secondarydisplayplayer] && players[displayplayer].lives > 0)
|
||||||
|
P_RestoreMusic(&players[displayplayer]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!player->mo)
|
if (!player->mo)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1382,6 +1382,7 @@ void R_RegisterEngineStuff(void)
|
||||||
CV_RegisterVar(&cv_allowmlook);
|
CV_RegisterVar(&cv_allowmlook);
|
||||||
CV_RegisterVar(&cv_homremoval);
|
CV_RegisterVar(&cv_homremoval);
|
||||||
CV_RegisterVar(&cv_flipcam);
|
CV_RegisterVar(&cv_flipcam);
|
||||||
|
CV_RegisterVar(&cv_flipcam2);
|
||||||
|
|
||||||
// Enough for dedicated server
|
// Enough for dedicated server
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
|
|
Loading…
Reference in a new issue