equal
deleted
inserted
replaced
1208 if gear <> nil then |
1208 if gear <> nil then |
1209 begin |
1209 begin |
1210 lua_pushinteger(L, hwRound(gear^.X)); |
1210 lua_pushinteger(L, hwRound(gear^.X)); |
1211 lua_pushinteger(L, hwRound(gear^.Y)) |
1211 lua_pushinteger(L, hwRound(gear^.Y)) |
1212 end |
1212 end |
|
1213 else |
|
1214 begin |
|
1215 lua_pushnil(L); |
|
1216 lua_pushnil(L) |
|
1217 end; |
1213 end; |
1218 end; |
1214 lc_getgearposition:= 2; |
1219 lc_getgearposition:= 2; |
1215 end; |
1220 end; |
1216 |
1221 |
1217 function lc_setgearposition(L : Plua_State) : LongInt; Cdecl; |
1222 function lc_setgearposition(L : Plua_State) : LongInt; Cdecl; |
1803 end; |
1808 end; |
1804 end; |
1809 end; |
1805 |
1810 |
1806 procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); |
1811 procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); |
1807 begin |
1812 begin |
1808 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 |
1813 //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 |
|
1814 if (ord(ammo) < 1) or (count > 9) or (propability > 8) or (delay > 9) or (reinforcement > 8) then |
1809 exit; |
1815 exit; |
1810 ScriptAmmoLoadout[ord(ammo)]:= inttostr(count)[1]; |
1816 ScriptAmmoLoadout[ord(ammo)]:= inttostr(count)[1]; |
1811 ScriptAmmoProbability[ord(ammo)]:= inttostr(propability)[1]; |
1817 ScriptAmmoProbability[ord(ammo)]:= inttostr(propability)[1]; |
1812 ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1]; |
1818 ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1]; |
1813 ScriptAmmoReinforcement[ord(ammo)]:= inttostr(reinforcement)[1]; |
1819 ScriptAmmoReinforcement[ord(ammo)]:= inttostr(reinforcement)[1]; |