aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2017-11-12 10:13:22 -0600
committerEugene Sandulenko2017-11-18 22:35:12 +0100
commit92f5718e2b5a28a6c6a0b9a221079e7fd2d42438 (patch)
tree40e1c80eb60ccb316e532125e728a7d2d7ce2547 /engines
parent076667dc0064432a3d4e3cf696d6688ee01a17a9 (diff)
downloadscummvm-rg350-92f5718e2b5a28a6c6a0b9a221079e7fd2d42438.tar.gz
scummvm-rg350-92f5718e2b5a28a6c6a0b9a221079e7fd2d42438.tar.bz2
scummvm-rg350-92f5718e2b5a28a6c6a0b9a221079e7fd2d42438.zip
FULLPIPE: Fix illegal C-style cast to incompatible type
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/interaction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index 8a959260ab..f13d826879 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -518,12 +518,11 @@ bool Interaction::canInteract(GameObject *obj1, GameObject *obj2, int invId) {
}
bool Interaction::isOverlapping(StaticANIObject *subj, GameObject *obj) {
- StaticANIObject *ani = (StaticANIObject *)obj;
-
if (abs(_xOffs + obj->_ox - subj->_ox) <= 1
&& abs(obj->_oy + _yOffs - subj->_oy) <= 1) {
if (!_staticsId2 || (subj->_statics != 0 && subj->_statics->_staticsId == _staticsId2)) {
- if (!_staticsId1 || !(_flags & 1) || (ani->_statics != 0 && ani->_statics->_staticsId == _staticsId1))
+ StaticANIObject *ani = dynamic_cast<StaticANIObject *>(obj);
+ if (!_staticsId1 || !(_flags & 1) || (ani && ani->_statics != 0 && ani->_statics->_staticsId == _staticsId1))
return true;
}
}