hedgewars/uScript.pas
changeset 10496 ba166d4e66f3
parent 10421 87e47843018e
child 10516 e2aee295cb16
equal deleted inserted replaced
10495:6d61b44a5652 10496:ba166d4e66f3
  1571         gear:= GearByUID(lua_tointeger(L, 1));
  1571         gear:= GearByUID(lua_tointeger(L, 1));
  1572         fall:= lua_toboolean(L, 2);
  1572         fall:= lua_toboolean(L, 2);
  1573         left:= lua_tointeger(L, 3);
  1573         left:= lua_tointeger(L, 3);
  1574         right:= lua_tointeger(L, 4);
  1574         right:= lua_tointeger(L, 4);
  1575         if n = 5 then
  1575         if n = 5 then
  1576             tryhard:= lua_toboolean(L, 5);
  1576             tryhard:= lua_toboolean(L, 5)
       
  1577         else
       
  1578             tryhard:= false;
  1577         if gear <> nil then
  1579         if gear <> nil then
  1578             FindPlace(gear, fall, left, right, tryhard);
  1580             FindPlace(gear, fall, left, right, tryhard);
  1579         if gear <> nil then
  1581         if gear <> nil then
  1580             lua_pushinteger(L, gear^.uid)
  1582             lua_pushinteger(L, gear^.uid)
  1581         else
  1583         else