aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorThanasis Antoniou2019-09-09 16:09:14 +0300
committerThanasis Antoniou2019-09-09 16:10:31 +0300
commita4f9842065351c92dc20677dcc4a5bc2f8dc9542 (patch)
treedc88b3070815979aa8da1196290df09dbb5ed8f7 /engines/bladerunner
parentded24d9b8c506ab972821a12cefa9c46bf24b94e (diff)
downloadscummvm-rg350-a4f9842065351c92dc20677dcc4a5bc2f8dc9542.tar.gz
scummvm-rg350-a4f9842065351c92dc20677dcc4a5bc2f8dc9542.tar.bz2
scummvm-rg350-a4f9842065351c92dc20677dcc4a5bc2f8dc9542.zip
BLADERUNNER: Fix CT02 map obstacles glitches
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/script/scene/ct02.cpp28
-rw-r--r--engines/bladerunner/set.cpp15
2 files changed, 42 insertions, 1 deletions
diff --git a/engines/bladerunner/script/scene/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp
index 97efa5113e..7b191ffb32 100644
--- a/engines/bladerunner/script/scene/ct02.cpp
+++ b/engines/bladerunner/script/scene/ct02.cpp
@@ -40,9 +40,15 @@ void SceneScriptCT02::InitializeScene() {
Game_Flag_Reset(kFlagCT03toCT02);
Setup_Scene_Information(-154.83f, -145.11f, 9.39f, 516);
} else if (Game_Flag_Query(kFlagCT02McCoyCombatReady)) {
+ // after soup dumping
Setup_Scene_Information(-213.82f, -145.11f, 214.43f, 82);
} else {
+#if BLADERUNNER_ORIGINAL_BUGS
Setup_Scene_Information(-119.02f, -145.11f, 240.99f, 768);
+#else
+ // puts McCoy within the obstacle map - prevents clipping through objects
+ Setup_Scene_Information(-117.43f, -145.11f, 262.36f, 768);
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
if (_vm->_cutContent
&& Global_Variable_Query(kVariableChapter) == 1
@@ -78,7 +84,23 @@ void SceneScriptCT02::InitializeScene() {
void SceneScriptCT02::SceneLoaded() {
Obstacle_Object("STOVE-1", true);
+#if BLADERUNNER_ORIGINAL_BUGS
Unobstacle_Object("BACK-DOOR", true);
+#else
+ Obstacle_Object("STOVE-2", true);
+ Obstacle_Object("STOVE-4", true);
+ Obstacle_Object("BACKWALL", true);
+ // Back wall is split to two parts since there is a back door in the middle
+ Obstacle_Object("BACKWALL2", true);
+ Obstacle_Object("LFTSTOVE-1", true);
+ Obstacle_Object("FRIDGE-1", true);
+ if (Actor_Clue_Query(kActorMcCoy, kClueZubenRunsAway)) {
+ Unobstacle_Object("BACK-DOOR", true);
+ } else {
+ Obstacle_Object("BACK-DOOR", true);
+ }
+ Unclickable_Object("BACKWALL2");
+#endif // BLADERUNNER_ORIGINAL_BUGS
Unclickable_Object("STOVE-1");
Unclickable_Object("STOVE-2");
Unclickable_Object("STOVE-3");
@@ -106,7 +128,7 @@ void SceneScriptCT02::SceneLoaded() {
}
if (Game_Flag_Query(kFlagCT02McCoyCombatReady)) {
Game_Flag_Reset(kFlagCT02McCoyCombatReady);
- Actor_Change_Animation_Mode(kActorMcCoy, 0);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
Player_Set_Combat_Mode(true);
Player_Gains_Control();
}
@@ -225,6 +247,10 @@ void SceneScriptCT02::dialogueWithZuben() {
if (Actor_Query_Friendliness_To_Other(kActorZuben, kActorMcCoy) < 44) {
Scene_Exits_Disable();
Actor_Clue_Acquire(kActorMcCoy, kClueZubenRunsAway, true, -1);
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ Unobstacle_Object("BACK-DOOR", true);
+#endif // BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT02PushPot);
Game_Flag_Set(kFlagCT02PotTipped);
if (_vm->_cutContent) {
diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp
index e14ffd39ca..17f6c7f45c 100644
--- a/engines/bladerunner/set.cpp
+++ b/engines/bladerunner/set.cpp
@@ -452,6 +452,16 @@ void Set::overrideSceneObjectInfo(int objectId) const {
_objects[objectId].bbox.setXYZ(-75.17f, -1239.29f, 108340.13f, -56.32f, -1221.16f, 108365.65f);
}
break;
+ case kSceneCT02:
+ // prevent McCoy from moving "around and behind" the map
+ if (objectId == 18 && _objects[objectId].name == "BACK-DOOR") {
+ _objects[objectId].bbox.setXYZ(-177.95f, -145.11f, -86.25f, -130.13f, -49.00f, -4.74f);
+ } else if (objectId == 19 && _objects[objectId].name == "BACKWALL") {
+ _objects[objectId].bbox.setXYZ(-323.10f, -162.41f, -16.25f, -177.95f, 160.29f, -4.74f);
+ } else if (objectId == 7 && _objects[objectId].name == "LFTSTOVE-1") {
+ _objects[objectId].bbox.setXYZ(-315.17f, -145.11f, 171.93f, -282.86f, -103.98f, 225.29f);
+ }
+ break;
case kSceneCT04:
// prevent McCoy or transient from blending/glitching with the right wall
if (objectId == 6 && _objects[objectId].name == "BOX04") {
@@ -566,6 +576,11 @@ void Set::patchInAdditionalObjectsInSet() {
Common::String custObjName;
BoundingBox bbox;
switch (_vm->_scene->getSceneId()) {
+ case kSceneCT02:
+ bbox = BoundingBox(-130.13f, -162.41f, -16.25f, -81.74f, 160.29f, -4.74f);
+ custObjName = "BACKWALL2";
+ setupNewObjectInSet(custObjName, bbox);
+ break;
case kSceneHF06:
// block clicking / path access to northern part of the scene
// which causes McCoy and Police officers/ rats to go behind the map