hedgewars/uGearsUtils.pas
changeset 14297 1d4f1d700cdc
parent 14287 6015b74eea55
child 14341 9e8e64b2bb9e
equal deleted inserted replaced
14296:f1a5b7baa87f 14297:1d4f1d700cdc
   177                                 Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, tdY)/(Gear^.Density/_3);
   177                                 Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, tdY)/(Gear^.Density/_3);
   178 
   178 
   179                                 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser);
   179                                 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser);
   180                                 if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision);
   180                                 if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision);
   181                                 if (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) then
   181                                 if (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) then
   182                                     Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner);
   182                                     Gear^.State:= (Gear^.State or gstMoving) and (not (gstWinner or gstHHJumping or gstHHHJump));
   183                                 Gear^.Active:= true;
   183                                 Gear^.Active:= true;
   184                                 if Gear^.Kind <> gtFlame then FollowGear:= Gear;
   184                                 if Gear^.Kind <> gtFlame then FollowGear:= Gear;
   185                                 if Gear^.Kind = gtAirMine then
   185                                 if Gear^.Kind = gtAirMine then
   186                                     begin
   186                                     begin
   187                                     Gear^.Tag:= 1;
   187                                     Gear^.Tag:= 1;