# HG changeset patch # User unc0rr # Date 1224090035 0 # Node ID afdcf39c6bea4419c6fe40ae79983205e58b8886 # Parent d3e285281c2644efddffafc2a7d5977a4778485a Small rope optimization diff -r d3e285281c26 -r afdcf39c6bea hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Wed Oct 15 16:59:11 2008 +0000 +++ b/hedgewars/GSHandlers.inc Wed Oct 15 17:00:35 2008 +0000 @@ -649,8 +649,8 @@ cc:= cc * len; // rope vector plus hedgehog direction vector normalized cs:= cs * len; -nx:= hwAbs(cs) * hwSign(HHGear^.dX) * 7; // hedgehog direction normalized with length 7 -ny:= hwAbs(cc) * hwSign(HHGear^.dY) * 7; +nx:= SignAs(cs, HHGear^.dX) * 7; // hedgehog direction normalized with length 7 +ny:= SignAs(cc, HHGear^.dY) * 7; flCheck:= not flCheck; if flCheck then // check whether rope needs dividing @@ -680,7 +680,7 @@ Gear^.Friction:= Gear^.Friction - len; break end; - len:= len - _0_2 + len:= len - _0_5 end; end else if RopePoints.Count > 0 then // check whether the last dividing point could be removed