diff -r 69898c6ede14 -r 14d12df0d363 hedgewars/VGSHandlers.inc --- a/hedgewars/VGSHandlers.inc Fri May 07 04:52:46 2010 +0000 +++ b/hedgewars/VGSHandlers.inc Fri May 07 06:29:46 2010 +0000 @@ -429,13 +429,8 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepHealthTagWork(Gear: PVisualGear; Steps: Longword); begin -//if Gear^.Kind = gtHealthTag then -// AllInactive:= false; - if Steps > Gear^.Timer then begin -// if (Gear^.Kind = vgtHealthTag) and (PHedgehog(Gear^.Hedgehog)^.Gear <> nil) then -// PHedgehog(Gear^.Hedgehog)^.Gear^.Active:= true; // to let current hh die DeleteVisualGear(Gear); end else @@ -447,8 +442,6 @@ procedure doStepHealthTagWorkUnderWater(Gear: PVisualGear; Steps: Longword); begin -//AllInactive:= false; - if hwRound(Gear^.Y) < cWaterLine + 10 then DeleteVisualGear(Gear) else @@ -459,14 +452,14 @@ procedure doStepHealthTag(Gear: PVisualGear; Steps: Longword); var s: shortstring; begin -//AllInactive:= false; - s:= ''; 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 hwRound(Gear^.Y) < cWaterLine then Gear^.doStep:= @doStepHealthTagWork