--- a/hedgewars/uScript.pas Sun Sep 25 18:22:12 2011 +0200
+++ b/hedgewars/uScript.pas Sun Sep 25 18:24:01 2011 +0200
@@ -1210,6 +1210,11 @@
lua_pushinteger(L, hwRound(gear^.X));
lua_pushinteger(L, hwRound(gear^.Y))
end
+ else
+ begin
+ lua_pushnil(L);
+ lua_pushnil(L)
+ end;
end;
lc_getgearposition:= 2;
end;
@@ -1805,7 +1810,8 @@
procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte);
begin
-if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then
+//if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then
+if (ord(ammo) < 1) or (count > 9) or (propability > 8) or (delay > 9) or (reinforcement > 8) then
exit;
ScriptAmmoLoadout[ord(ammo)]:= inttostr(count)[1];
ScriptAmmoProbability[ord(ammo)]:= inttostr(propability)[1];