equal
deleted
inserted
replaced
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; |