From 553f1a9537d6a507020b70c171153ce6c38aeba2 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Tue, 6 Jun 2017 16:49:14 +0300 Subject: [PATCH] fixed strafe according to Jabberwock note; also, removed redunant code line --- src/game/g_game.pas | 7 +++---- src/game/g_netmsg.pas | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 4cfb4a2..9166021 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1256,10 +1256,9 @@ begin begin // new strafe mechanics if (strafeDir = 0) then strafeDir := MoveButton; // start strafing - // now set direction according to strafe - if (strafeDir = 1) then plr.SetDirection(D_LEFT) - else if (strafeDir = 2) then plr.SetDirection(D_RIGHT) - else if MoveButton <> 0 then plr.SetDirection(TDirection(MoveButton-1)); + // now set direction according to strafe (reversed) + if (strafeDir = 2) then plr.SetDirection(D_LEFT) + else if (strafeDir = 1) then plr.SetDirection(D_RIGHT); end else begin diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index e5cd723..64377a6 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -2805,10 +2805,9 @@ begin begin // new strafe mechanics if (strafeDir = 0) then strafeDir := P1MoveButton; // start strafing - // now set direction according to strafe - if (strafeDir = 1) then gPlayer1.SetDirection(D_LEFT) - else if (strafeDir = 2) then gPlayer1.SetDirection(D_RIGHT) - else if P1MoveButton <> 0 then gPlayer1.SetDirection(TDirection(P1MoveButton-1)); + // now set direction according to strafe (reversed) + if (strafeDir = 2) then gPlayer1.SetDirection(D_LEFT) + else if (strafeDir = 1) then gPlayer1.SetDirection(D_RIGHT); end else begin -- 2.29.2