hedgewars/GSHandlers.inc
changeset 2278 28519f4f3f21
parent 2267 ad372e549cc5
child 2280 786fb5d8107d
--- a/hedgewars/GSHandlers.inc	Sun Jul 26 19:56:40 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Jul 26 20:56:18 2009 +0000
@@ -2243,6 +2243,7 @@
        Gear^.Tex:= RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(round(Gear^.Health / 20)) + '%', $FFFFFFFF, fntSmall)
        end;
 
+if HHGear^.Message and (gm_Attack or gm_Up or gm_Precise or gm_Left or gm_Right) <> 0 then Gear^.State:= Gear^.State and not gsttmpFlag;
 HHGear^.Message:= HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right);
 HHGear^.State:= HHGear^.State or gstMoving; 
 
@@ -2250,7 +2251,8 @@
 Gear^.Y:= HHGear^.Y;
 // For some reason I need to reapply followgear here, something else grabs it otherwise.
 if not bShowAmmoMenu then FollowGear:= HHGear;
-doStepHedgehogMoving(HHGear);
+
+if ((Gear^.State and gsttmpFlag) = 0) or (HHGear^.dY < _0) then doStepHedgehogMoving(HHGear);
 
 if  (Gear^.Health = 0)
     or (HHGear^.Damage <> 0)
@@ -2283,10 +2285,11 @@
 FollowGear:= HHGear;
 OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^);
 ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+Gear^.State:= Gear^.State or gsttmpFlag;
 with HHGear^ do
 	begin
 	State:= State and not gstAttacking;
-	Message:= Message and not gm_Attack;
+	Message:= Message and not (gm_Attack or gm_Up or gm_Precise or gm_Left or gm_Right);
     dY:= dY - _0_2
 	end
 end;