Fix hedgehog being able to make walk/jump sounds before it was placed
authorWuzzy <Wuzzy2@mail.ru>
Wed, 19 Sep 2018 10:23:01 +0200
changeset 13798 4e5fcfc6f033
parent 13797 5d46b4fae757
child 13799 ced1e6ecaaad
Fix hedgehog being able to make walk/jump sounds before it was placed If in hog placement phase you select Skip and then pressed the walk/jump keys, you heard sounds although the hedgehog is not placed yet.
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Wed Sep 19 09:45:45 2018 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Wed Sep 19 10:23:01 2018 +0200
@@ -869,6 +869,9 @@
     exit
     end;
 
+if (Gear^.Hedgehog^.Unplaced) then
+    exit;
+
     if ((Gear^.Message and gmAnimate) <> 0) then
         begin
         Gear^.Message:= 0;