hedgewars/VGSHandlers.inc
changeset 5576 bf30c60786a5
parent 5563 fc73b6e941f7
child 5578 153e32989646
equal deleted inserted replaced
5575:41ee1c71deb3 5576:bf30c60786a5
   513 procedure doStepHealthTag(Gear: PVisualGear; Steps: Longword);
   513 procedure doStepHealthTag(Gear: PVisualGear; Steps: Longword);
   514 var s: shortstring;
   514 var s: shortstring;
   515 begin
   515 begin
   516 s:= '';
   516 s:= '';
   517 
   517 
   518 Gear^.dY:= -0.08;
       
   519 
       
   520 str(Gear^.State, s);
   518 str(Gear^.State, s);
   521 if Gear^.Hedgehog <> nil then
   519 if Gear^.Hedgehog <> nil then
   522     Gear^.Tex:= RenderStringTex(s, Gear^.Hedgehog^.Team^.Clan^.Color, fnt16)
   520     Gear^.Tex:= RenderStringTex(s, Gear^.Hedgehog^.Team^.Clan^.Color, fnt16)
   523 else
   521 else
   524     Gear^.Tex:= RenderStringTex(s, cWhiteColor, fnt16);
   522     Gear^.Tex:= RenderStringTex(s, cWhiteColor, fnt16);
   525 
   523 
   526 if round(Gear^.Y) < cWaterLine then
   524 Gear^.doStep:= @doStepHealthTagWork
   527     Gear^.doStep:= @doStepHealthTagWork
   525 
   528 else
   526 if (round(Gear^.Y) < cWaterLine) and (Frame = 0)  then
   529     Gear^.doStep:= @doStepHealthTagWorkUnderWater;
   527     Gear^.doStep:= @doStepHealthTagWorkUnderWater;
   530 
   528 
   531 Gear^.Y:= Gear^.Y - Gear^.Tex^.h;
   529 Gear^.Y:= Gear^.Y - Gear^.Tex^.h;
   532 
   530 
   533 if Steps > 1 then Gear^.doStep(Gear, Steps-1);
   531 if Steps > 1 then Gear^.doStep(Gear, Steps-1);