--- 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