hedgewars/CCHandlers.inc
changeset 2726 a84fc5113d01
parent 2724 601158aaa201
child 2738 bfccb2ec4334
--- a/hedgewars/CCHandlers.inc	Sat Jan 30 18:23:42 2010 +0000
+++ b/hedgewars/CCHandlers.inc	Sun Jan 31 16:20:53 2010 +0000
@@ -149,10 +149,13 @@
 begin
 if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
 with CurrentTeam^ do
-	if s = '' then
-		CurrentHedgehog^.Hat:= 'NoHat'
-	else
-		CurrentHedgehog^.Hat:= s
+    begin
+    if not CurrentHedgehog^.King then
+       if (s = '') or (((GameFlags and gfKing) <> 0) and (s = 'crown')) then
+           CurrentHedgehog^.Hat:= 'NoHat'
+       else
+           CurrentHedgehog^.Hat:= s
+    end;
 end;
 
 procedure chSetHHCoords(var x: shortstring);