hedgewars/uWorld.pas
changeset 7374 514138949c76
parent 7304 8b3575750cd2
parent 7368 20448801e86a
child 11317 62287d4044e7
--- a/hedgewars/uWorld.pas	Tue Jul 10 11:08:35 2012 +0200
+++ b/hedgewars/uWorld.pas	Tue Jul 10 11:09:38 2012 +0200
@@ -1346,6 +1346,19 @@
             r.w:= TeamHealthBarWidth + 1;
             r.h:= HealthTex^.h - 4;
             DrawTextureFromRect(16, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, HealthTex);
+            if not hasGone and (TeamHealth > 1) then
+                begin
+                Tint(Clan^.Color shl 8 or $FF);
+                for i:= 0 to cMaxHHIndex do
+                    if Hedgehogs[i].Gear <> nil then
+                        begin
+                        inc(h,Hedgehogs[i].Gear^.Health);
+                        if h < TeamHealth then DrawTexture(15 + h*TeamHealthBarWidth div TeamHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);
+                        end;
+                if TeamsCount * 20 > Longword(cScreenHeight) div 5 then
+                    Tint($FF,$FF,$FF,$80)
+                else Tint($FF, $FF, $FF, $FF);
+                end;
             end;
         end;
 if smallScreenOffset <> 0 then
@@ -1568,9 +1581,10 @@
 isFirstFrame:= false
 end;
 
+var PrevSentPointTime: LongWord = 0;
+
 procedure MoveCamera;
 var EdgesDist, wdy, shs,z: LongInt;
-    PrevSentPointTime: LongWord = 0;
 begin
 {$IFNDEF MOBILE}
 if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu))) and cHasFocus and (GameState <> gsConfirm) then
@@ -1580,7 +1594,7 @@
 if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) then
     if (not autoCameraOn) then
         FollowGear:= nil
-    else        
+    else
     if ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then
         begin
         FollowGear:= nil;
@@ -1793,6 +1807,7 @@
     Frames:= 0;
     WorldDx:= -512;
     WorldDy:= -256;
+    PrevSentPointTime:= 0;
 
     FPS:= 0;
     CountTicks:= 0;