hedgewars/CCHandlers.inc
changeset 2726 a84fc5113d01
parent 2724 601158aaa201
child 2738 bfccb2ec4334
equal deleted inserted replaced
2725:89908847b155 2726:a84fc5113d01
   147 
   147 
   148 procedure chSetHat(var s: shortstring);
   148 procedure chSetHat(var s: shortstring);
   149 begin
   149 begin
   150 if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
   150 if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
   151 with CurrentTeam^ do
   151 with CurrentTeam^ do
   152 	if s = '' then
   152     begin
   153 		CurrentHedgehog^.Hat:= 'NoHat'
   153     if not CurrentHedgehog^.King then
   154 	else
   154        if (s = '') or (((GameFlags and gfKing) <> 0) and (s = 'crown')) then
   155 		CurrentHedgehog^.Hat:= s
   155            CurrentHedgehog^.Hat:= 'NoHat'
       
   156        else
       
   157            CurrentHedgehog^.Hat:= s
       
   158     end;
   156 end;
   159 end;
   157 
   160 
   158 procedure chSetHHCoords(var x: shortstring);
   161 procedure chSetHHCoords(var x: shortstring);
   159 var y: shortstring;
   162 var y: shortstring;
   160     t: Longint;
   163     t: Longint;