hedgewars/GSHandlers.inc
changeset 109 ab0340f580c2
parent 108 08f1fe6f21f8
child 113 d975a426ebf7
equal deleted inserted replaced
108:08f1fe6f21f8 109:ab0340f580c2
   531         or TestCollisionYwithGear(HHGear, -hwSign(Gear.dY))) then Gear.Elasticity:= Gear.Elasticity - 0.3;
   531         or TestCollisionYwithGear(HHGear, -hwSign(Gear.dY))) then Gear.Elasticity:= Gear.Elasticity - 0.3;
   532 
   532 
   533 HHGear.X:= Gear.X + cc*Gear.Elasticity;
   533 HHGear.X:= Gear.X + cc*Gear.Elasticity;
   534 HHGear.Y:= Gear.Y + cs*Gear.Elasticity;
   534 HHGear.Y:= Gear.Y + cs*Gear.Elasticity;
   535 
   535 
   536 if (GameTicks >= 165118) and (GameTicks <= 165121) then
       
   537    begin
       
   538    AddFileLog('==9==> ('+floattostr(cc)+','+floattostr(cs)+')');
       
   539    AddFileLog('==a==>  '+floattostr(Gear.Elasticity));
       
   540    AddFileLog('==b==> ('+floattostr(HHGear.X)+','+floattostr(HHGear.Y)+')');
       
   541    end;
       
   542 
       
   543 HHGear.dX:= HHGear.X - HHGear.dX;
   536 HHGear.dX:= HHGear.X - HHGear.dX;
   544 HHGear.dY:= HHGear.Y - HHGear.dY;
   537 HHGear.dY:= HHGear.Y - HHGear.dY;
   545 
   538 
   546 if TestCollisionXwithGear(HHGear, hwSign(HHGear.dX)) then
   539 if TestCollisionXwithGear(HHGear, hwSign(HHGear.dX)) then
   547    HHGear.dX:= -0.6 * HHGear.dX;
   540    HHGear.dX:= -0.6 * HHGear.dX;