The if statements incorrectly used the && operator, instead of the
bitwise operator &.  Even so, the if statements are unneeded, since
the "tstdir &= ~EAST" works whether the bit is set or not.
---
 src/world/character.cc |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/world/character.cc b/src/world/character.cc
index 2b0a562..a61f052 100644
--- a/src/world/character.cc
+++ b/src/world/character.cc
@@ -87,16 +87,16 @@ void character::add_direction(direction ndir)
     switch (ndir)
     {
         case WEST:
-            if (tstdir && EAST) tstdir &= ~EAST;
+            tstdir &= ~EAST;
             break;
         case EAST:
-            if (tstdir && WEST) tstdir &= ~WEST;
+            tstdir &= ~WEST;
             break;
         case SOUTH:
-            if (tstdir && NORTH) tstdir &= ~NORTH;
+            tstdir &= ~NORTH;
             break;
         case NORTH:
-            if (tstdir && SOUTH) tstdir &= ~SOUTH;
+            tstdir &= ~SOUTH;
             break;
         default:
             break;
-- 
1.6.0.2



_______________________________________________
Adonthell-devel mailing list
Adonthell-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/adonthell-devel

Reply via email to