From d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e Mon Sep 17 00:00:00 2001 From: James Haley Date: Sat, 19 Oct 2013 18:22:22 +0000 Subject: Correct up/down look logic that was incorrectly allowing 6 degrees of additional freedom. Subversion-branch: /branches/v2-branch Subversion-revision: 2713 --- src/strife/p_user.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/strife') diff --git a/src/strife/p_user.c b/src/strife/p_user.c index aa2ba430..a6d74b9f 100644 --- a/src/strife/p_user.c +++ b/src/strife/p_user.c @@ -248,8 +248,8 @@ void P_MovePlayer (player_t* player) if (cmd->buttons2 & BT2_LOOKUP) { player->pitch += LOOKPITCHAMOUNT; - if ((player->pitch + LOOKPITCHAMOUNT) > LOOKUPMAX || - (player->pitch + LOOKPITCHAMOUNT) < LOOKDOWNMAX) + if (player->pitch > LOOKUPMAX || + player->pitch < LOOKDOWNMAX) player->pitch -= LOOKPITCHAMOUNT; } else @@ -258,8 +258,8 @@ void P_MovePlayer (player_t* player) if (cmd->buttons2 & BT2_LOOKDOWN) { player->pitch -= LOOKPITCHAMOUNT; - if ((player->pitch - LOOKPITCHAMOUNT) > LOOKUPMAX || - (player->pitch - LOOKPITCHAMOUNT) < LOOKDOWNMAX) + if (player->pitch > LOOKUPMAX || + player->pitch < LOOKDOWNMAX) player->pitch += LOOKPITCHAMOUNT; } } -- cgit v1.2.3