tags 662300 + patch

Here is a patch which fixes this issue for me, it is based on a
suggestion at
http://egoboo.sourceforge.net/phpBB3/viewtopic.php?f=3&t=1177&p=61333#p61333, 
see the DEP-3 header for more information.

Please consider applying it.

Thanks.
-- 
Martin Erik Werner <martinerikwer...@gmail.com>
Author: Pozzo
Description: Fix left-up movement bug
 Fix player only being able to move right and down:
 Cast return value from control_is_pressed to int in order to avoid doing math
 on booleans.
Origin: Upstream forum:
 http://egoboo.sourceforge.net/phpBB3/viewtopic.php?f=3&t=1177&p=61333#p61333
 Explanation:
 http://egoboo.sourceforge.net/forum/viewtopic.php?p=54235#54235
Bug: https://sourceforge.net/apps/mantisbt/egoboo/view.php?id=74
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662300
Last-Update: 2012-03-12

diff --git a/src/game/game.c b/src/game/game.c
index 9012525..4e1b2ff 100755
--- a/src/game/game.c
+++ b/src/game/game.c
@@ -2052,8 +2052,8 @@ void set_one_player_latch( const PLA_REF player )
         if (( CAM_TURN_GOOD == PCamera->turn_mode && 1 == local_numlpla ) ||
             !control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_CAMERA ) )
         {
-            joy_pos.x = ( control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_RIGHT ) - control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_LEFT ) );
-            joy_pos.y = ( control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_DOWN ) - control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_UP ) );
+            joy_pos.x = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_RIGHT ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_LEFT ) );
+            joy_pos.y = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_DOWN ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD,  CONTROL_UP ) );
 
             if ( CAM_TURN_GOOD == PCamera->turn_mode &&
                  1 == local_numlpla )  joy_pos.x = 0;

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to