hedgewars/uGearsHandlersMess.pas
changeset 14759 c6b7f4a4122c
parent 14758 bc0e86b0347b
child 14761 1b82538970ca
equal deleted inserted replaced
14758:bc0e86b0347b 14759:c6b7f4a4122c
  2480         // health texture for health crate
  2480         // health texture for health crate
  2481         if (k = gtCase) and ((Gear^.Pos and $02) <> 0) then
  2481         if (k = gtCase) and ((Gear^.Pos and $02) <> 0) then
  2482             begin
  2482             begin
  2483             FreeAndNilTexture(Gear^.Tex);
  2483             FreeAndNilTexture(Gear^.Tex);
  2484             if ((Gear^.State and gstFrozen) = 0) then
  2484             if ((Gear^.State and gstFrozen) = 0) then
  2485                 Gear^.Tex := RenderStringTex(ansistring(inttostr(Gear^.Health)), $ff80ff80, fnt16);
  2485                 // Karma=2: Always hide health
       
  2486                 if (Gear^.Karma = 2) then
       
  2487                     Gear^.Tex := RenderStringTex(ansistring(trmsg[sidUnknownGearValue]), $ff80ff80, fnt16)
       
  2488                 // Karma=1: Hide health in game, but show in demo
       
  2489                 else if (Gear^.Karma = 1) and (GameType in [gmtDemo, gmtRecord]) then
       
  2490                     Gear^.Tex := RenderStringTex(ansistring(trmsg[sidUnknownGearValue]), $ff80ff80, fnt16)
       
  2491                 // Always show health (default)
       
  2492                 else
       
  2493                     Gear^.Tex := RenderStringTex(ansistring(inttostr(Gear^.Health)), $ff80ff80, fnt16);
  2486             end;
  2494             end;
  2487         if Gear^.Timer = 500 then
  2495         if Gear^.Timer = 500 then
  2488             begin
  2496             begin
  2489 (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up
  2497 (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up
  2490    voices. Reinforcements voices is heard for active team, not team-to-be.  Either that or change crate spawn from end of turn to start, although that
  2498    voices. Reinforcements voices is heard for active team, not team-to-be.  Either that or change crate spawn from end of turn to start, although that