fix some shadowed variables
This commit is contained in:
1 parent
1fb60e8230
commit
fe0ade1d9c
4 files changed
+9
-13
No files matched your search
+1
-1
@@ -869,7 +869,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||
|
||||
toucher->angle = special->angle;
|
||||
|
||||
for (UINT8 i = 0; i <= splitscreen; i++)
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (player == P_GetLocalPlayerForNum(i))
|
||||
{
|
||||
|
||||
+5
-10
@@ -10758,7 +10758,7 @@ void P_SpawnPlayer(INT32 playernum)
|
||||
{
|
||||
if (!p->spectator)
|
||||
{
|
||||
for (UINT8 i = 0; i <= splitscreen; i++)
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (playernum == P_GetLocalPlayerNumForNum(i))
|
||||
{
|
||||
@@ -10776,17 +10776,12 @@ void P_AfterPlayerSpawn(INT32 playernum)
|
||||
mobj_t *mobj = p->mo;
|
||||
UINT8 i;
|
||||
|
||||
if (playernum == consoleplayer)
|
||||
localangle[0] = mobj->angle;
|
||||
else if (splitscreen)
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
for (i = 1; i <= splitscreen; i++)
|
||||
if (playernum == P_GetLocalPlayerNumForNum(i))
|
||||
{
|
||||
if (playernum == displayplayers[i])
|
||||
{
|
||||
localangle[i] = mobj->angle;
|
||||
break;
|
||||
}
|
||||
localangle[i] = mobj->angle;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2653,7 +2653,8 @@ static void P_SetupPlayer(void)
|
||||
spbplace = -1;
|
||||
|
||||
startedInFreePlay = true;
|
||||
for (UINT8 nump = 0, i = 0; i < MAXPLAYERS; i++)
|
||||
UINT8 nump = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
{
|
||||
|
||||
+1
-1
@@ -5193,7 +5193,7 @@ void P_PlayerAfterThink(player_t *player)
|
||||
player->mo->tracer->target->health += cmd->sidemove;
|
||||
player->mo->angle += cmd->sidemove << ANGLETOFINESHIFT; // 2048 --> ANGLE_MAX
|
||||
|
||||
for (UINT8 i = 0; i <= splitscreen; i++)
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (player == P_GetLocalPlayerForNum(i))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user