Fix for broken physics in exteriors (Fixes #1446)

The wrong function was being used to check the distance between old and new positions. It took the length of the vectors into account, which makes no sense for positions. The issue was only observed in exteriors, since most interiors are relatively close to the origin.
deque
scrawl 11 years ago
parent c23e9e03fd
commit 013916fca3

@ -304,7 +304,7 @@ namespace MWWorld
continue; // velocity updated, calculate nextpos again
}
if(!newPosition.positionCloses(nextpos, 0.00000001))
if(newPosition.squaredDistance(nextpos) > 0.00000001*0.00000001)
{
// trace to where character would go if there were no obstructions
tracer.doTrace(colobj, newPosition, nextpos, engine);

Loading…
Cancel
Save