hedgewars/uScript.pas
changeset 4411 79fbc444584c
parent 4403 0dfe26f48ec1
child 4443 d393b9ccd328
equal deleted inserted replaced
4410:f9e38ce1e813 4411:79fbc444584c
   572     if lua_gettop(L) <> 3 then
   572     if lua_gettop(L) <> 3 then
   573         LuaError('Lua: Wrong number of parameters passed to SetEffect!')
   573         LuaError('Lua: Wrong number of parameters passed to SetEffect!')
   574     else begin
   574     else begin
   575         gear := GearByUID(lua_tointeger(L, 1));
   575         gear := GearByUID(lua_tointeger(L, 1));
   576         if gear <> nil then
   576         if gear <> nil then
   577             gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3) <> 0;
   577             gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_toboolean(L, 3);
   578     end;
   578     end;
   579     lc_seteffect := 0;
   579     lc_seteffect := 0;
   580 end;
   580 end;
   581 
   581 
   582 function lc_setstate(L : Plua_State) : LongInt; Cdecl;
   582 function lc_setstate(L : Plua_State) : LongInt; Cdecl;