aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/motion.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 30f71aa0b3..978ef3ac48 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -201,9 +201,22 @@ MctlLadder::~MctlLadder() {
}
int MctlLadder::collisionDetection(StaticANIObject *man) {
- warning("STUB: MctlLaddercollisionDetection()");
+ if (findObjectPos(man) < 0)
+ return 0;
- return 0;
+ double delta;
+
+ if ((double)(man->_oy - _ladder_field_10) / (double)_ladder_field_1C < 0.0)
+ delta = -0.5;
+ else
+ delta = 0.5;
+
+ int res = (int)((double)(man->_oy - _ladder_field_10) / (double)_ladder_field_1C + delta);
+
+ if (res < 0)
+ return 0;
+
+ return res;
}
void MctlLadder::addObject(StaticANIObject *obj) {