hedgewars/uScript.pas
changeset 7887 e987dff8e5f2
parent 7805 2a249a4faf5b
child 7889 57b117d441b9
equal deleted inserted replaced
7885:2a3a9e385cac 7887:e987dff8e5f2
  1667         begin
  1667         begin
  1668         gear:= GearByUID(lua_tointeger(L, 1));
  1668         gear:= GearByUID(lua_tointeger(L, 1));
  1669         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
  1669         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
  1670             hat:= lua_tostring(L, 2);
  1670             hat:= lua_tostring(L, 2);
  1671             gear^.Hedgehog^.Hat:= hat;
  1671             gear^.Hedgehog^.Hat:= hat;
  1672             LoadHedgehogHat(gear^.Hedgehog^, hat);
  1672             if (Length(hat) > 39) and (Copy(hat,1,8) = 'Reserved') and (Copy(hat,9,32) = gear^.Hedgehog^.Team^.PlayerHash) then
       
  1673                 LoadHedgehogHat(gear^.Hedgehog^, 'Reserved/' + Copy(hat,9,Length(hat)-8))
       
  1674             else
       
  1675                 LoadHedgehogHat(gear^.Hedgehog^, hat);
  1673         end;
  1676         end;
  1674     lc_sethoghat:= 0;
  1677     lc_sethoghat:= 0;
  1675 end;
  1678 end;
  1676 
  1679 
  1677 function lc_placegirder(L : Plua_State) : LongInt; Cdecl;
  1680 function lc_placegirder(L : Plua_State) : LongInt; Cdecl;