Loop inclusive for r_splitscreen

r_splitscreen indexes from 0 inclusively
This commit is contained in:
Eidolon 2022-10-27 19:11:35 -05:00
parent a1fd605a24
commit 2476455195
3 changed files with 3 additions and 3 deletions

View file

@ -3741,7 +3741,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
UINT8 i = 0;
INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers);
for (i = 0; i < r_splitscreen; i++)
for (i = 0; i <= r_splitscreen; i++)
{
if (localplayertable[i] == playernum)
{

View file

@ -3474,7 +3474,7 @@ boolean P_SpectatorJoinGame(player_t *player)
UINT8 i = 0;
INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers);
for (i = 0; i < r_splitscreen; i++)
for (i = 0; i <= r_splitscreen; i++)
{
if (localplayertable[i] == (player-players))
{

View file

@ -331,7 +331,7 @@ angle_t R_PointToAnglePlayer(player_t *player, fixed_t x, fixed_t y)
camera_t *cam = NULL;
UINT8 i;
for (i = 0; i < r_splitscreen; i++)
for (i = 0; i <= r_splitscreen; i++)
{
if (player == &players[displayplayers[i]])
{