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