removed redundant band, added touch of consistency w/ everywhere else
authornemo
Fri, 21 Jun 2013 12:26:55 -0400
changeset 9245 1dfdf35dd35d
parent 9243 d8f6a396d98e
child 9247 68bbe56badcc
removed redundant band, added touch of consistency w/ everywhere else
hedgewars/uScript.pas
share/hedgewars/Data/Scripts/Animate.lua
--- a/hedgewars/uScript.pas	Thu Jun 20 11:15:50 2013 +0400
+++ b/hedgewars/uScript.pas	Fri Jun 21 12:26:55 2013 -0400
@@ -231,8 +231,7 @@
 var i : integer;
 begin
     for i:= 1 to lua_gettop(L) do
-        if (GameFlags and lua_tointeger(L, i)) = 0 then
-            GameFlags := GameFlags + LongWord(lua_tointeger(L, i));
+        GameFlags := GameFlags or LongWord(lua_tointeger(L, i));
     ScriptSetInteger('GameFlags', GameFlags);
     lc_enablegameflags:= 0;
 end;
@@ -241,8 +240,7 @@
 var i : integer;
 begin
     for i:= 1 to lua_gettop(L) do
-        if (GameFlags and lua_tointeger(L, i)) <> 0 then
-            GameFlags := GameFlags - LongWord(lua_tointeger(L, i));
+        GameFlags := GameFlags and not(LongWord(lua_tointeger(L, i)));
     ScriptSetInteger('GameFlags', GameFlags);
     lc_disablegameflags:= 0;
 end;
--- a/share/hedgewars/Data/Scripts/Animate.lua	Thu Jun 20 11:15:50 2013 +0400
+++ b/share/hedgewars/Data/Scripts/Animate.lua	Fri Jun 21 12:26:55 2013 -0400
@@ -308,7 +308,7 @@
       AnimSwitchHog(steps[animPos].args[1])
   end
 
-  SetInputMask(band(0xFFFFFFFF, bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLeft+gmLJump+gmRight+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon)))
+  SetInputMask(bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLeft+gmLJump+gmRight+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon))
   retVal = steps[animPos].func(unpack(steps[animPos].args))
   if (retVal ~= false) then
     animPos = animPos + 1