equal
deleted
inserted
replaced
663 tx:= ropeDx + HHGear^.dX; |
663 tx:= ropeDx + HHGear^.dX; |
664 ty:= ropeDy + HHGear^.dY; |
664 ty:= ropeDy + HHGear^.dY; |
665 len:= _1 / Distance(tx, ty); |
665 len:= _1 / Distance(tx, ty); |
666 tx:= tx * len; // rope vector plus hedgehog direction vector normalized |
666 tx:= tx * len; // rope vector plus hedgehog direction vector normalized |
667 ty:= ty * len; |
667 ty:= ty * len; |
|
668 |
|
669 Gear^.dX:= tx; // for visual purposes only |
|
670 Gear^.dY:= ty; |
668 |
671 |
669 haveDivided:= false; |
672 haveDivided:= false; |
670 // check whether rope needs dividing |
673 // check whether rope needs dividing |
671 len:= _1 / Distance(ropeDx, ropeDy); // old rope pos |
674 len:= _1 / Distance(ropeDx, ropeDy); // old rope pos |
672 nx:= ropeDx * len; |
675 nx:= ropeDx * len; |