Skip to content

Commit

Permalink
Fixed|libcommon: Don’t check control input of remote players
Browse files Browse the repository at this point in the history
Remote players are moved according to a smoothed path of received
coordinates, not any control input values.
  • Loading branch information
skyjake committed Jan 3, 2014
1 parent 9634c68 commit 2dd9566
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doomsday/plugins/common/src/p_user.c
Expand Up @@ -1620,6 +1620,12 @@ void P_PlayerThinkLookYaw(player_t* player, timespan_t ticLength)
if(!plr->mo || player->playerState == PST_DEAD || player->viewLock)
return;

if(IS_CLIENT && playerNum != CONSOLEPLAYER)
{
// This is only for the local player.
return;
}

// Turn the head?
P_PlayerThinkHeadTurning(playerNum, ticLength);

Expand Down Expand Up @@ -1673,6 +1679,12 @@ void P_PlayerThinkLookPitch(player_t* player, timespan_t ticLength)
if(!plr->mo || player->playerState == PST_DEAD || player->viewLock)
return; // Nothing to control.

if(IS_CLIENT && playerNum != CONSOLEPLAYER)
{
// This is only for the local player.
return;
}

// The absolute look pitch overrides CTL_LOOK.
if(P_IsControlBound(playerNum, CTL_LOOK_PITCH))
{
Expand Down

0 comments on commit 2dd9566

Please sign in to comment.