--- a/hedgewars/VGSHandlers.inc Mon May 10 17:48:06 2010 +0000
+++ b/hedgewars/VGSHandlers.inc Tue May 11 13:59:57 2010 +0000
@@ -430,9 +430,7 @@
procedure doStepHealthTagWork(Gear: PVisualGear; Steps: Longword);
begin
if Steps > Gear^.Timer then
- begin
- DeleteVisualGear(Gear);
- end
+ DeleteVisualGear(Gear)
else
begin
dec(Gear^.Timer, Steps);
@@ -457,9 +455,10 @@
Gear^.dY:= -_0_08;
str(Gear^.State, s);
-Gear^.Tex:= RenderStringTex(s, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color, fnt16);
-// if you segfault here you probably added this healthtag directly
-// maybe you should call spawnHealthTagForHH() in uGears.pas instead
+if Gear^.Hedgehog <> nil then
+ Gear^.Tex:= RenderStringTex(s, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color, fnt16)
+else
+ Gear^.Tex:= RenderStringTex(s, cWhiteColor, fnt16);
if hwRound(Gear^.Y) < cWaterLine then
Gear^.doStep:= @doStepHealthTagWork