hedgewars/GSHandlers.inc
changeset 1142 2c522c1ded31
parent 1133 5d5a912d6fc2
child 1158 d03d12ef8971
equal deleted inserted replaced
1141:44d4d6aaecb5 1142:2c522c1ded31
   606 cc:= Gear^.dX + HHGear^.dX;
   606 cc:= Gear^.dX + HHGear^.dX;
   607 len:= _1 / Distance(cc, cs);
   607 len:= _1 / Distance(cc, cs);
   608 cc:= cc * len; // rope vector plus hedgehog direction vector normalized
   608 cc:= cc * len; // rope vector plus hedgehog direction vector normalized
   609 cs:= cs * len;
   609 cs:= cs * len;
   610 
   610 
   611 nx:= hwAbs(cs) * hwSign(HHGear^.dX) * 5; // hedgehog direction normalized with length 3
   611 nx:= hwAbs(cs) * hwSign(HHGear^.dX) * 7; // hedgehog direction normalized with length 7
   612 ny:= hwAbs(cc) * hwSign(HHGear^.dY) * 5;
   612 ny:= hwAbs(cc) * hwSign(HHGear^.dY) * 7;
   613 
   613 
   614 flCheck:= not flCheck;
   614 flCheck:= not flCheck;
   615 if flCheck then  // check whether rope needs dividing
   615 if flCheck then  // check whether rope needs dividing
   616    begin
   616    begin
   617    len:= Gear^.Elasticity - _20;
   617    len:= Gear^.Elasticity - _20;