aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorThanasis Antoniou2019-06-01 19:15:17 +0300
committerThanasis Antoniou2019-06-01 19:16:34 +0300
commit6a7220170e7bd5e1a7357ea5cb649863ea5f71c1 (patch)
treeedbdfb5c471c19d5c79b6a29fc3b6dbf31ac6972 /engines
parent61800882b7003b80a198aec502ecf8e92bda90d9 (diff)
downloadscummvm-rg350-6a7220170e7bd5e1a7357ea5cb649863ea5f71c1.tar.gz
scummvm-rg350-6a7220170e7bd5e1a7357ea5cb649863ea5f71c1.tar.bz2
scummvm-rg350-6a7220170e7bd5e1a7357ea5cb649863ea5f71c1.zip
BLADERUNNER: Fix paths and map glitched in NR05
McCoy should no longer teleport (occasionally) whne going to NR08
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/script/scene/nr05.cpp15
-rw-r--r--engines/bladerunner/set.cpp25
2 files changed, 40 insertions, 0 deletions
diff --git a/engines/bladerunner/script/scene/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp
index b0ac1b2895..39f8aab373 100644
--- a/engines/bladerunner/script/scene/nr05.cpp
+++ b/engines/bladerunner/script/scene/nr05.cpp
@@ -35,7 +35,11 @@ void SceneScriptNR05::InitializeScene() {
if (Game_Flag_Query(kFlagNR08toNR05)) {
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kNR05LoopPanFromNR08, false);
Scene_Loop_Set_Default(kNR05LoopMainLoop);
+#if BLADERUNNER_ORIGINAL_BUGS
Setup_Scene_Information(-777.56f, 0.0f, -166.86f, 0);
+#else
+ Setup_Scene_Information(-752.09f, 0.0f, -193.58f, 258);
+#endif // BLADERUNNER_ORIGINAL_BUGS
} else if (Game_Flag_Query(kFlagNR03toNR05)) {
Setup_Scene_Information( -456.0f, 0.0f, -611.0f, 0);
} else {
@@ -86,6 +90,10 @@ void SceneScriptNR05::InitializeScene() {
void SceneScriptNR05::SceneLoaded() {
Obstacle_Object("NM1-1+", true);
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ Obstacle_Object("CUSTLFTBLOCK", true);
+#endif // BLADERUNNER_ORIGINAL_BUGS
Clickable_Object("NM1-1+");
Unclickable_Object("NM1-1+");
}
@@ -138,10 +146,17 @@ bool SceneScriptNR05::ClickedOnExit(int exitId) {
}
if (exitId == 1) {
+#if BLADERUNNER_ORIGINAL_BUGS
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -777.56f, 0.0f, -166.86f, 0, true, false, false)) {
Game_Flag_Set(kFlagNR05toNR08);
Set_Enter(kSetNR05_NR08, kSceneNR08);
}
+#else
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -752.09f, 0.0f, -193.58f, 0, true, false, false)) {
+ Game_Flag_Set(kFlagNR05toNR08);
+ Set_Enter(kSetNR05_NR08, kSceneNR08);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return true;
}
return false;
diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp
index f0ae927135..43e69fa38a 100644
--- a/engines/bladerunner/set.cpp
+++ b/engines/bladerunner/set.cpp
@@ -480,6 +480,15 @@ void Set::overrideSceneObjectInfo(int objectId) const {
_objects[objectId].bbox.setXYZ(695.63f, 42.65f, -628.10f, 706.71f, 69.22f, -614.47f);
}
break;
+ case kSceneNR05:
+ if (objectId == 10 && _objects[objectId].name == "BOX08") {
+ _objects[objectId].bbox.setXYZ(-748.75f, 0.0f, -257.39f, -685.37f, 32.01f, -211.47f);
+ } else if (objectId == 11 && _objects[objectId].name == "BOX09") {
+ _objects[objectId].bbox.setXYZ(-729.00f, 0.0f, -179.27f, -690.00f, 33.47f, -15.80f);
+ } else if (objectId == 12 && _objects[objectId].name == "BOX11") {
+ _objects[objectId].bbox.setXYZ(-688.03f, 0.0f, -67.41f, -490.38f, 29.10f, -32.86f);
+ }
+ break;
case kSceneNR11:
// Right coat rack needs adjustment of bounding box
if (objectId == 1 && _objects[objectId].name == "COATRACK") {
@@ -565,6 +574,12 @@ void Set::patchInAdditionalObjectsInSet() {
setupNewObjectInSet(custObjName, bbox);
break;
+ case kSceneNR05:
+ bbox = BoundingBox(-690.0f, 0.0f, -155.0f, -640.0f, 33.47f, -100.0f);
+ custObjName = "CUSTLFTBLOCK";
+ setupNewObjectInSet(custObjName, bbox);
+ break;
+
case kSceneUG08:
// block clicking / path access to northern part of the scene
// which causes McCoy and Police officers/ rats to go behind the map
@@ -598,6 +613,16 @@ void Set::patchOutBadObjectsFromSet() {
bool removeCurrObj = false;
for (int objectId = 0; objectId < _objectCount; ++objectId) {
switch (_vm->_scene->getSceneId()) {
+ case kSceneNR05:
+ if ((objectId == 0 && _objects[objectId].name == "NM1-1+")
+ || (objectId == 2 && _objects[objectId].name == "NM1-1+")
+ || (objectId == 3 && _objects[objectId].name == "NM1-1+")
+ ) {
+ // Remove objects that are named the same and set as clickables
+ // leave only objectId == 1, named "NM1-1+"
+ removeCurrObj = true;
+ }
+ break;
case kSceneNR11:
if ((objectId == 46 && _objects[objectId].name == "BOX53")
|| (objectId == 36 && _objects[objectId].name == "BOX43")