--- a/hedgewars/uScript.pas Mon Oct 29 17:17:26 2012 -0400
+++ b/hedgewars/uScript.pas Mon Oct 29 17:38:54 2012 -0400
@@ -1669,7 +1669,10 @@
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
hat:= lua_tostring(L, 2);
gear^.Hedgehog^.Hat:= hat;
- LoadHedgehogHat(gear^.Hedgehog^, hat);
+ if (Length(hat) > 39) and (Copy(hat,1,8) = 'Reserved') and (Copy(hat,9,32) = gear^.Hedgehog^.Team^.PlayerHash) then
+ LoadHedgehogHat(gear^.Hedgehog^, 'Reserved/' + Copy(hat,9,Length(hat)-8))
+ else
+ LoadHedgehogHat(gear^.Hedgehog^, hat);
end;
lc_sethoghat:= 0;
end;