aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saga/scene.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/saga/scene.cpp b/saga/scene.cpp
index 166195827b..a9c2e33f86 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -384,24 +384,22 @@ bool Scene::canWalk(const Point &testPoint) {
}
bool Scene::offscreenPath(Point &testPoint) {
- Point first;
- Point second;
- Point third;
+ Point point;
if (!_bgMask.loaded) {
return false;
}
- first.x = clamp( 0, testPoint.x, _bgMask.w - 1 );
- first.y = clamp( 0, testPoint.y, _bgMask.h - 1 );
- if (first == testPoint) {
+ point.x = clamp( 0, testPoint.x, _bgMask.w - 1 );
+ point.y = clamp( 0, testPoint.y, _bgMask.h - 1 );
+ if (point == testPoint) {
return false;
}
- if (first.y >= _bgMask.h - 1) {
- first.y = _bgMask.h - 2;
+ if (point.y >= _bgMask.h - 1) {
+ point.y = _bgMask.h - 2;
}
- testPoint = first;
+ testPoint = point;
return true;
}