mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-13 14:47:14 +00:00
G_CanView: unconditionally let view a player already viewed on a different splitscreen
This commit is contained in:
parent
8b79689d81
commit
90d8a9643f
1 changed files with 10 additions and 5 deletions
15
src/g_game.c
15
src/g_game.c
|
|
@ -1507,13 +1507,15 @@ boolean G_CouldView(INT32 playernum)
|
|||
//
|
||||
boolean G_CanView(INT32 playernum, UINT8 viewnum, boolean onlyactive)
|
||||
{
|
||||
if (!playeringame[playernum] || players[playernum].spectator)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT8 splits;
|
||||
UINT8 viewd;
|
||||
INT32 *displayplayerp;
|
||||
|
||||
if (!(onlyactive ? G_CouldView(playernum) : (playeringame[playernum] && !players[playernum].spectator)))
|
||||
return false;
|
||||
|
||||
splits = r_splitscreen+1;
|
||||
if (viewnum > splits)
|
||||
viewnum = splits;
|
||||
|
|
@ -1522,15 +1524,18 @@ boolean G_CanView(INT32 playernum, UINT8 viewnum, boolean onlyactive)
|
|||
{
|
||||
displayplayerp = (&displayplayers[viewd-1]);
|
||||
if ((*displayplayerp) == playernum)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
for (viewd = viewnum + 1; viewd <= splits; ++viewd)
|
||||
{
|
||||
displayplayerp = (&displayplayers[viewd-1]);
|
||||
if ((*displayplayerp) == playernum)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (onlyactive && !G_CouldView(playernum))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue