Modified DrawGear so that it doesn't draw the gear when it has message gmRemoveFromList (it was causing havoc when I used HideHog as it could not access the position of the hog)
authorbelphegorr <szabibibi@gmail.com>
Sat, 21 Jul 2012 01:47:34 +0300
changeset 7257 566bdf2f023b
parent 7255 93cf6b3b89be
child 7259 b630df7ac843
Modified DrawGear so that it doesn't draw the gear when it has message gmRemoveFromList (it was causing havoc when I used HideHog as it could not access the position of the hog)
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Mon Jul 16 20:56:55 2012 +0300
+++ b/hedgewars/uGears.pas	Sat Jul 21 01:47:34 2012 +0300
@@ -556,7 +556,7 @@
 Gear:= GearsList;
 while Gear <> nil do
     begin
-    if Gear^.State and gstInvisible = 0 then
+    if (Gear^.State and gstInvisible = 0) and (Gear^.Message and gmRemoveFromList = 0) then
         begin
         x:= hwRound(Gear^.X) + WorldDx;
         y:= hwRound(Gear^.Y) + WorldDy;