hedgewars/GSHandlers.inc
changeset 5470 b07eb408c5e4
parent 5461 3c2d4e46440f
child 5474 d5b392e02403
equal deleted inserted replaced
5461:3c2d4e46440f 5470:b07eb408c5e4
   354        (not isFalling) then
   354        (not isFalling) then
   355         Gear^.State := Gear^.State and not gstMoving
   355         Gear^.State := Gear^.State and not gstMoving
   356     else
   356     else
   357         Gear^.State := Gear^.State or      gstMoving;
   357         Gear^.State := Gear^.State or      gstMoving;
   358 
   358 
   359     if (Gear^.nImpactSounds > 0) and (Gear^.ImpactSound <> sndNone) and
   359     if (Gear^.nImpactSounds > 0) and 
   360        ((Gear^.Damage <> 0) or 
   360        ((Gear^.Damage <> 0) or 
   361           ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving))) and
   361           ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving))) and
   362        ((Gear^.dX.QWordValue > _0_1.QWordValue) or 
   362        ((Gear^.dX.QWordValue > _0_1.QWordValue) or 
   363           (Gear^.dY.QWordValue > _0_1.QWordValue)) then
   363           (Gear^.dY.QWordValue > _0_1.QWordValue)) then
   364         PlaySound(TSound(ord(Gear^.ImpactSound) + LongInt(GetRandom(Gear^.nImpactSounds))), true);
   364         PlaySound(TSound(ord(Gear^.ImpactSound) + LongInt(GetRandom(Gear^.nImpactSounds))), true);