mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 08:23:15 +00:00
BLADERUNNER: UG08 and HF06 map glitch fixes
This commit is contained in:
parent
b7e1f8a9ff
commit
7f427ad462
@ -49,6 +49,11 @@ void SceneScriptHF06::InitializeScene() {
|
||||
void SceneScriptHF06::SceneLoaded() {
|
||||
Unobstacle_Object("BOX22", true);
|
||||
Unobstacle_Object("BOX34", true);
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
#else
|
||||
Obstacle_Object("FRONTBLOCK1", true);
|
||||
Obstacle_Object("FRONTBLOCK2", true);
|
||||
#endif // BLADERUNNER_ORIGINAL_BUGS
|
||||
Clickable_Object("BOX19");
|
||||
Clickable_Object("BOX21");
|
||||
Clickable_Object("BOX23");
|
||||
|
@ -76,6 +76,10 @@ void SceneScriptUG08::SceneLoaded() {
|
||||
Obstacle_Object("ELEV LEGS", true);
|
||||
Unobstacle_Object("ELEV LEGS", true);
|
||||
Unobstacle_Object("BOX RIGHT WALL ", true);
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
#else
|
||||
Obstacle_Object("NORTHBLOCK", true);
|
||||
#endif // BLADERUNNER_ORIGINAL_BUGS
|
||||
}
|
||||
|
||||
bool SceneScriptUG08::MouseClick(int x, int y) {
|
||||
|
@ -505,6 +505,17 @@ void Set::overrideSceneObjectInfo(int objectId) const {
|
||||
}
|
||||
}
|
||||
|
||||
void Set::setupNewObjectInSet(Common::String objName, BoundingBox objBbox) {
|
||||
int objectId = _objectCount;
|
||||
_objects[objectId].name = objName.c_str();
|
||||
_objects[objectId].bbox = objBbox;
|
||||
_objects[objectId].isObstacle = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Obstacle_Object()
|
||||
_objects[objectId].isClickable = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Clickable_Object()
|
||||
_objects[objectId].isHotMouse = 0;
|
||||
_objects[objectId].unknown1 = 0;
|
||||
_objects[objectId].isTarget = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un_)Combat_Target_Object
|
||||
_objectCount++;
|
||||
}
|
||||
/**
|
||||
* Used for adding objects in a Set mainly to fix a few "McCoy walking to places he should not" issues
|
||||
* This is called in Set::open()
|
||||
@ -516,33 +527,46 @@ void Set::overrideSceneObjectInfo(int objectId) const {
|
||||
*/
|
||||
void Set::patchInAdditionalObjectsInSet() {
|
||||
Common::String custObjName;
|
||||
int objectId = _objectCount;
|
||||
BoundingBox bbox;
|
||||
switch (_vm->_scene->getSceneId()) {
|
||||
case kSceneHF06:
|
||||
// block clicking / path access to northern part of the scene
|
||||
// which causes McCoy and Police officers/ rats to go behind the map
|
||||
bbox = BoundingBox(220.00f, 350.02f, -90.86f, 310.00f, 380.02f, -70.71f);
|
||||
custObjName = "FRONTBLOCK1";
|
||||
setupNewObjectInSet(custObjName, bbox);
|
||||
|
||||
bbox = BoundingBox(20.00f, 350.02f, -90.86f, 170.00f, 380.02f, -45.71f);
|
||||
custObjName = "FRONTBLOCK2";
|
||||
setupNewObjectInSet(custObjName, bbox);
|
||||
break;
|
||||
|
||||
case kScenePS05:
|
||||
// block actual passage to ESPER room because
|
||||
// it causes McCoy to sometimes go behind the wall
|
||||
bbox = BoundingBox(730.50f, -0.0f, -481.10f, 734.51f, 144.75f, -437.55f);
|
||||
custObjName = "MAINFBLOCK";
|
||||
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
|
||||
bbox = BoundingBox(-386.26f, -8.07f, -1078.99f, 100.00f, 170.63f, -478.99f);
|
||||
custObjName = "NORTHBLOCK";
|
||||
setupNewObjectInSet(custObjName, bbox);
|
||||
break;
|
||||
|
||||
case kSceneUG13:
|
||||
// Underground homeless place
|
||||
// block passage to empty elevator chute
|
||||
bbox = BoundingBox(-80.00f, 35.78f, -951.75f, 74.36f, 364.36f, -810.56f);
|
||||
custObjName = "ELEVBLOCK";
|
||||
setupNewObjectInSet(custObjName, bbox);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
_objectCount++;
|
||||
_objects[objectId].name = custObjName.c_str();
|
||||
_objects[objectId].bbox = bbox;
|
||||
_objects[objectId].isObstacle = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Obstacle_Object()
|
||||
_objects[objectId].isClickable = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Clickable_Object()
|
||||
_objects[objectId].isHotMouse = 0;
|
||||
_objects[objectId].unknown1 = 0;
|
||||
_objects[objectId].isTarget = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un_)Combat_Target_Object
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,6 +110,7 @@ private:
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
#else
|
||||
void overrideSceneObjectInfo(int objectId) const;
|
||||
void setupNewObjectInSet(Common::String objName, BoundingBox objBbox);
|
||||
void patchInAdditionalObjectsInSet();
|
||||
void patchOutBadObjectsFromSet();
|
||||
#endif // BLADERUNNER_ORIGINAL_BUGS
|
||||
|
Loading…
x
Reference in New Issue
Block a user