hedgewars/GSHandlers.inc
changeset 7186 013deb83086b
parent 7170 84ac6c6d2d8e
child 7195 9e6e8e5a4c2e
--- a/hedgewars/GSHandlers.inc	Mon May 28 10:38:27 2012 +0200
+++ b/hedgewars/GSHandlers.inc	Tue Jun 05 22:17:06 2012 +0200
@@ -702,14 +702,14 @@
             //Land[py, px+1]:= lfBasic;
             
             if allpx then
-                UpdateLandTexture(xx, Pred(s^.h), yy, Pred(s^.w))
+                UpdateLandTexture(xx, Pred(s^.h), yy, Pred(s^.w), true)
             else
                 begin
                 UpdateLandTexture(
                     max(0, min(LAND_WIDTH, xx)),
                     min(LAND_WIDTH - xx, Pred(s^.w)),
                     max(0, min(LAND_WIDTH, yy)),
-                    min(LAND_HEIGHT - yy, Pred(s^.h))
+                    min(LAND_HEIGHT - yy, Pred(s^.h)), false // could this be true without unnecessarily creating blanks?
                 );
                 end;
 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
@@ -2077,6 +2077,7 @@
     exBoom: boolean;
     dX, dY: HWFloat;
     hog: PHedgehog;
+    sparkles: PVisualGear;
 begin
     k := Gear^.Kind;
     exBoom := false;
@@ -2108,6 +2109,21 @@
         Gear^.Damage := 0;
         if Gear^.Health <= 0 then
             exBoom := true;
+        end
+    else
+        begin 
+        if Gear^.Timer = 0 then
+        begin
+(* 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
+   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
+   has its own complexities. *)
+        sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1);
+        if sparkles <> nil then
+            begin
+            sparkles^.Tint:= $FAB22CFF
+            end
+        end;
+        if (GameTicks and $1 = 0) and (Gear^.Timer < 255) then inc(Gear^.Timer)
         end;
 
     if (Gear^.Damage > 0) or exBoom then