diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/actor.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/actor_combat.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/actor_walk.cpp | 11 | ||||
-rw-r--r-- | engines/bladerunner/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/scene_objects.cpp | 21 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_grayford.cpp | 40 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_leary.cpp | 34 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct11.cpp | 5 |
8 files changed, 102 insertions, 15 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index b00b870929..1c87d8e668 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -871,7 +871,7 @@ void Actor::stopWalking(bool value) { } if (isWalking()) { - _walkInfo->stop(_id, true, _animationModeCombatIdle, 0); + _walkInfo->stop(_id, true, _animationModeCombatIdle, kAnimationModeIdle); } else if (inCombat()) { changeAnimationMode(_animationModeCombatIdle, false); } else { diff --git a/engines/bladerunner/actor_combat.cpp b/engines/bladerunner/actor_combat.cpp index 400e3e704e..869ccdfd86 100644 --- a/engines/bladerunner/actor_combat.cpp +++ b/engines/bladerunner/actor_combat.cpp @@ -686,7 +686,7 @@ bool ActorCombat::findClosestPositionToEnemy(Vector3 &output) const { Vector3 test = _enemyPosition + offsets[i]; float dist = distance(_actorPosition, test); if ( min == -1.0f || dist < min) { - if (!_vm->_sceneObjects->existsOnXZ(_actorId, test.x, test.z, true, true) && _vm->_scene->_set->findWalkbox(test.x, test.z) >= 0) { + if (!_vm->_sceneObjects->existsOnXZ(_actorId + kSceneObjectOffsetActors, test.x, test.z, true, true) && _vm->_scene->_set->findWalkbox(test.x, test.z) >= 0) { output = test; min = dist; } diff --git a/engines/bladerunner/actor_walk.cpp b/engines/bladerunner/actor_walk.cpp index daa28b6350..1c91ce0155 100644 --- a/engines/bladerunner/actor_walk.cpp +++ b/engines/bladerunner/actor_walk.cpp @@ -73,12 +73,14 @@ bool ActorWalk::setup(int actorId, bool runFlag, const Vector3 &from, const Vect } else { stop(actorId, true, kAnimationModeCombatIdle, kAnimationModeIdle); } +// debug("actor id: %d, arrived: %d - false setup 01", actorId, (*arrived)? 1:0); return false; } if (r == -1) { stop(actorId, true, kAnimationModeCombatIdle, kAnimationModeIdle); *arrived = true; +// debug("actor id: %d, arrived: %d - false setup 02", actorId, (*arrived)? 1:0); return false; } @@ -107,6 +109,7 @@ bool ActorWalk::setup(int actorId, bool runFlag, const Vector3 &from, const Vect if (next.x == _current.x && next.z == _current.z) { stop(actorId, true, kAnimationModeCombatIdle, kAnimationModeIdle); *arrived = true; +// debug("actor id: %d, arrived: %d - false setup 03", actorId, (*arrived)? 1:0); return false; } @@ -115,6 +118,7 @@ bool ActorWalk::setup(int actorId, bool runFlag, const Vector3 &from, const Vect _running = runFlag; _status = 2; +// debug("actor id: %d, arrived: %d - true setup 01", actorId, (*arrived)? 1:0); return true; } @@ -201,6 +205,9 @@ bool ActorWalk::tick(int actorId, float stepDistance, bool mustReachWalkDestinat if (nextIsCloseEnough) { return false; } + } else { + stop(actorId, true, kAnimationModeCombatIdle, kAnimationModeIdle); // too close + return true; } } @@ -419,6 +426,7 @@ int ActorWalk::nextOnPath(int actorId, const Vector3 &from, const Vector3 &to, V next = from; if (distance(from, to) < 6.0) { +// debug("Id: %d Distance: %f::Result -1", actorId, distance(from, to)); return -1; } @@ -427,9 +435,11 @@ int ActorWalk::nextOnPath(int actorId, const Vector3 &from, const Vector3 &to, V return 1; } if (_vm->_scene->_set->findWalkbox(to.x, to.z) == -1) { +// debug("Id: %d No walkbox::Result 0", actorId); return 0; } if (_vm->_sceneObjects->existsOnXZ(actorId + kSceneObjectOffsetActors, to.x, to.z, false, false)) { +// debug("Actor Id: %d existsOnXZ::Result 0", actorId); return 0; } Vector3 next1; @@ -437,6 +447,7 @@ int ActorWalk::nextOnPath(int actorId, const Vector3 &from, const Vector3 &to, V next = next1; return 1; } +// debug("Id: %d DEFAULTED::Result 0", actorId); return 0; } diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp index d19e221c80..354e899bd6 100644 --- a/engines/bladerunner/debugger.cpp +++ b/engines/bladerunner/debugger.cpp @@ -1580,7 +1580,7 @@ bool Debugger::cmdList(int argc, const char **argv) { actor->getAnimationId(), actor->getPosition().x, actor->getPosition().y, - _vm->_actors[sceneObject->id - kSceneObjectOffsetActors]->getPosition().z); + actor->getPosition().z); ++count; } } diff --git a/engines/bladerunner/scene_objects.cpp b/engines/bladerunner/scene_objects.cpp index 5eace21736..12e4e599b5 100644 --- a/engines/bladerunner/scene_objects.cpp +++ b/engines/bladerunner/scene_objects.cpp @@ -27,6 +27,8 @@ #include "bladerunner/obstacles.h" #include "bladerunner/savefile.h" #include "bladerunner/view.h" +//#include "bladerunner/scene.h" // asdf to REMOVE +//#include "bladerunner/game_constants.h" // asdf to REMOVE namespace BladeRunner { @@ -144,9 +146,9 @@ bool SceneObjects::existsOnXZ(int exceptSceneObjectId, float x, float z, bool mo if (sceneObject->isRetired) { isObstacle = false; } else if (sceneObject->isMoving) { - isObstacle = movingActorIsObstacle != 0; + isObstacle = movingActorIsObstacle; } else { - isObstacle = standingActorIsObstacle != 0; + isObstacle = standingActorIsObstacle; } } else { isObstacle = sceneObject->isObstacle; @@ -156,6 +158,21 @@ bool SceneObjects::existsOnXZ(int exceptSceneObjectId, float x, float z, bool mo float x1, y1, z1, x2, y2, z2; sceneObject->boundingBox.getXYZ(&x1, &y1, &z1, &x2, &y2, &z2); if (z1 <= zMax && z2 >= zMin && x1 <= xMax && x2 >= xMin) { +// if (sceneObject->type == kSceneObjectTypeObject) { +// Vector3 a(x1,y1,z1); +// Vector3 b(x2,y2,z2); +// Vector3 pos = _vm->_view->calculateScreenPosition(0.5 * (a + b)); +// debug("%d: %s (Clk: %s, Trg: %s, Prs: %s, Obs: %s, Mvg: %s), Pos(%02.2f,%02.2f,%02.2f)\n Bbox(%02.2f,%02.2f,%02.2f) ~ (%02.2f,%02.2f,%02.2f)\n", +// sceneObject->id - kSceneObjectOffsetObjects, +// _vm->_scene->objectGetName(sceneObject->id - kSceneObjectOffsetObjects).c_str(), +// sceneObject->isClickable? "T" : "F", +// sceneObject->isTarget? "T" : "F", +// sceneObject->isPresent? "T" : "F", +// sceneObject->isObstacle? "T" : "F", +// sceneObject->isMoving? "T" : "F", +// pos.x, pos.y, pos.z, +// a.x, a.y, a.z, b.x, b.y, b.z); +// } return true; } } diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp index 82ae1b5d81..1dcbf72e6b 100644 --- a/engines/bladerunner/script/ai/officer_grayford.cpp +++ b/engines/bladerunner/script/ai/officer_grayford.cpp @@ -21,6 +21,7 @@ */ #include "bladerunner/script/ai_script.h" +//#include "common/debug.h" namespace BladeRunner { AIScriptOfficerGrayford::AIScriptOfficerGrayford(BladeRunnerEngine *vm) : AIScriptBase(vm) { @@ -112,6 +113,7 @@ bool AIScriptOfficerGrayford::Update() { switch (Actor_Query_Which_Set_In(kActorOfficerGrayford)) { case kSetRC03: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { +// asdf restore Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 18, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } @@ -134,14 +136,14 @@ bool AIScriptOfficerGrayford::Update() { Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; -// asdf UG07 whould be a type 10 combat, 12 flee? +// asdf missing UG07 case - would be a type 10 combat, 12 flee? case kSetUG08: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 13, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; -// asdf UG09 whould be a type ?? // +// asdf missing UG09 case - would be a type ?? // case kSetUG10: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { @@ -268,6 +270,7 @@ void AIScriptOfficerGrayford::CompletedMovementTrack() { break; case kGoalOfficerGrayfordHuntingAroundAct4: +// debug("Grayford completed Movement"); Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPrepareToHuntAroundAct4); break; @@ -326,9 +329,9 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); if (Random_Query(1, 2) == 1) { - Actor_Says(kActorMcCoy, 5075, 14); + Actor_Says(kActorMcCoy, 5075, 14); // Hey, pal. } else { - Actor_Says(kActorMcCoy, 5075, 14); // bug in the original? Matches the above statement + Actor_Says(kActorMcCoy, 5075, 14); // Hey, pal. TODO asdf bug in the original? Matches the above statement } Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS03c); break; @@ -614,10 +617,13 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb return true; case kGoalOfficerGrayfordHuntingAroundAct4: +// debug("Flushing Grayford movement track"); AI_Movement_Track_Flush(kActorOfficerGrayford); - switch (Random_Query(1, 10)) { + switch (Random_Query(1, 10)) { // asdf restore +// switch (1) { case 1: // kSetNR01 +// debug("gray 1 kSetNR01"); AI_Movement_Track_Append(kActorOfficerGrayford, 398, 15); AI_Movement_Track_Append(kActorOfficerGrayford, 399, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 400, 0); @@ -631,6 +637,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 2: // kSetCT11 +// debug("gray 2 kSetCT11"); AI_Movement_Track_Append(kActorOfficerGrayford, 385, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 242, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 386, 2); @@ -641,6 +648,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 3: // kSetDR01_DR02_DR04 +// debug("gray 3 kSetDR01_DR02_DR04"); AI_Movement_Track_Append(kActorOfficerGrayford, 390, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 391, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 392, 5); @@ -652,6 +660,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 4: // kSetRC03 -> kSetFreeSlotC +// debug("gray 4 kSetRC03 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 381, 15); AI_Movement_Track_Append(kActorOfficerGrayford, 382, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 383, 15); @@ -664,6 +673,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 5: // kSetBB01 -> kSetFreeSlotC +// debug("gray 5 kSetBB01 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 388, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 389, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC @@ -673,6 +683,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 6: // kSetCT11 - identical to case 2 +// debug("gray 6 kSetCT11"); AI_Movement_Track_Append(kActorOfficerGrayford, 385, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 242, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 386, 2); @@ -700,6 +711,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb return true; #else case 7: +// debug("gray 7 MA07 changed to kSetFreeSlotC"); // just put him away for a few seconds AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); @@ -707,9 +719,11 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb #endif // BLADERUNNER_ORIGINAL_BUGS case 8: - switch (Random_Query(1, 7)) { + switch (Random_Query(1, 7)) { // asdf restore +// switch (1) { case 1: // kSetUG10 -> kSetFreeSlotC +// debug("gray 8-1 kSetUG10 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 302, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 407, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 408, 0); @@ -719,6 +733,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 2: // kSetUG14 +// debug("gray 8-2 kSetUG14"); AI_Movement_Track_Append(kActorOfficerGrayford, 536, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 537, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 538, 5); @@ -729,6 +744,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 3: // kSetUG04 -> kSetFreeSlotC +// debug("gray 8-3 kSetUG04 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 296, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 409, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 296, 10); @@ -738,6 +754,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 4: // kSetUG05 -> kSetFreeSlotC +// debug("gray 8-4 kSetUG05 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 411, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 412, 5); AI_Movement_Track_Append(kActorOfficerGrayford, 411, 0); @@ -747,6 +764,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 5: // kSetUG06 -> kSetFreeSlotC +// debug("gray 8-5 kSetUG06 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 413, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 414, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 431, 0, 1017); @@ -757,6 +775,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 6: // kSetUG07 -> kSetFreeSlotC +// debug("gray 8-6 kSetUG07 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 416, 0, 620); AI_Movement_Track_Append(kActorOfficerGrayford, 417, 0); @@ -767,6 +786,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 7: // kSetUG01 -> kSetFreeSlotC +// debug("gray 8-7 kSetUG01 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 405, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 406, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC @@ -781,8 +801,10 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb return false; // does it matter if false or true? case 9 and 10 return false #endif // BLADERUNNER_ORIGINAL_BUGS case 9: - if (Random_Query(0, 1)) { + if (Random_Query(0, 1)) { // asdf restore +// if (1) { // kSetUG09 -> kSetFreeSlotC +// debug("gray 9-1 kSetUG09 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 433, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 434, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 435, 0); @@ -790,6 +812,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb AI_Movement_Track_Repeat(kActorOfficerGrayford); } else { // kSetUG08 -> kSetFreeSlotC +// debug("gray 9-0 kSetUG08 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 420, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 422, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 421, 1); @@ -811,6 +834,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case 10: // kSetUG12 -> kSetFreeSlotC +// debug("gray 10 kSetUG12 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 310, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 307, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 309, 0); @@ -825,6 +849,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb case kGoalOfficerGrayfordPrepareToHuntAroundAct4: // aux goal in order to immediately switch back to kGoalOfficerGrayfordHuntingAroundAct4 goal // and run GoalChanged() for kGoalOfficerGrayfordHuntingAroundAct4 again +// debug("Setting Grayford goal to kGoalOfficerGrayfordHuntingAroundAct4"); Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); return true; @@ -1508,6 +1533,7 @@ void AIScriptOfficerGrayford::SetAnimationState(int animationState, int animatio } bool AIScriptOfficerGrayford::ReachedMovementTrackWaypoint(int waypointId) { +// debug("Grayford reached waypoint: %d", waypointId); return true; } diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp index 11c3b7c770..169e5b4146 100644 --- a/engines/bladerunner/script/ai/officer_leary.cpp +++ b/engines/bladerunner/script/ai/officer_leary.cpp @@ -21,6 +21,7 @@ */ #include "bladerunner/script/ai_script.h" +//#include "common/debug.h" namespace BladeRunner { @@ -121,6 +122,7 @@ bool AIScriptOfficerLeary::Update() { switch (Actor_Query_Which_Set_In(kActorOfficerLeary)) { case kSetDR01_DR02_DR04: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { +// asdf restore Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 0, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } @@ -169,12 +171,14 @@ bool AIScriptOfficerLeary::Update() { Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; +// asdf Missing UG07 case - would be a type 10 combat, 12 flee? case kSetUG08: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateIdle, true, kActorMcCoy, 13, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; +// asdf Missing UG09 case - would be a type ?? // case kSetUG10: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); @@ -233,6 +237,7 @@ void AIScriptOfficerLeary::CompletedMovementTrack() { return; } if (goal == kGoalOfficerLearyHuntingAroundAct4) { +// debug("Leary completed Movement"); Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPrepareToHuntAroundAct4); return; } @@ -378,10 +383,13 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return true; case kGoalOfficerLearyHuntingAroundAct4: +// debug("Flushing Leary movement track"); AI_Movement_Track_Flush(kActorOfficerLeary); - switch (Random_Query(1, 10)) { + switch (Random_Query(1, 10)) { // asdf restore +// switch (1) { case 1: // kSetNR01 +// debug("leary 1 kSetNR01"); AI_Movement_Track_Append(kActorOfficerLeary, 398, 15); AI_Movement_Track_Append(kActorOfficerLeary, 399, 0); AI_Movement_Track_Append(kActorOfficerLeary, 400, 0); @@ -393,6 +401,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 2: // kSetCT11 +// debug("leary 2 kSetCT11"); AI_Movement_Track_Append(kActorOfficerLeary, 385, 10); AI_Movement_Track_Append(kActorOfficerLeary, 242, 2); AI_Movement_Track_Append(kActorOfficerLeary, 386, 2); @@ -401,6 +410,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 3: // kSetDR01_DR02_DR04 +// debug("leary 3 kSetDR01_DR02_DR04"); AI_Movement_Track_Append(kActorOfficerLeary, 390, 10); AI_Movement_Track_Append(kActorOfficerLeary, 391, 0); AI_Movement_Track_Append(kActorOfficerLeary, 392, 5); @@ -410,6 +420,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 4: // kSetRC03 -> kSetFreeSlotC +// debug("leary 4 kSetRC03 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 381, 15); AI_Movement_Track_Append(kActorOfficerLeary, 382, 0); AI_Movement_Track_Append(kActorOfficerLeary, 383, 15); @@ -420,6 +431,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 5: // kSetBB01 -> kSetFreeSlotC +// debug("leary 5 kSetBB01 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 388, 10); AI_Movement_Track_Append(kActorOfficerLeary, 389, 10); AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC @@ -427,6 +439,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 6: // kSetCT11 - identical to case 2 +// debug("leary 6 kSetCT11 - identical to case 2"); AI_Movement_Track_Append(kActorOfficerLeary, 385, 10); AI_Movement_Track_Append(kActorOfficerLeary, 242, 2); AI_Movement_Track_Append(kActorOfficerLeary, 386, 2); @@ -452,15 +465,18 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) #else case 7: // kSetFreeSlotC +// debug("leary 7 MA07 changed to kSetFreeSlotC"); // just put him away for a few seconds AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; #endif // BLADERUNNER_ORIGINAL_BUGS case 8: - switch (Random_Query(1, 7)) { + switch (Random_Query(1, 7)) { // asdf restore +// switch (1) { case 1: // kSetUG10 -> kSetFreeSlotC +// debug("leary 8-1 kSetUG10 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 302, 0); AI_Movement_Track_Append(kActorOfficerLeary, 407, 0); AI_Movement_Track_Append(kActorOfficerLeary, 408, 0); @@ -469,6 +485,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 2: // kSetUG14 +// debug("leary 8-2 kSetUG14"); AI_Movement_Track_Append(kActorOfficerLeary, 536, 0); AI_Movement_Track_Append(kActorOfficerLeary, 537, 0); AI_Movement_Track_Append(kActorOfficerLeary, 538, 1); @@ -478,6 +495,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 3: // kSetUG04 -> kSetFreeSlotC +// debug("leary 8-3 kSetUG04 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 296, 10); AI_Movement_Track_Append(kActorOfficerLeary, 409, 2); AI_Movement_Track_Append(kActorOfficerLeary, 296, 10); @@ -486,6 +504,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 4: // kSetUG05 -> kSetFreeSlotC +// debug("leary 8-4 kSetUG05 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 411, 10); AI_Movement_Track_Append(kActorOfficerLeary, 412, 5); AI_Movement_Track_Append(kActorOfficerLeary, 411, 0); @@ -494,6 +513,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 5: // kSetUG06 -> kSetFreeSlotC +// debug("leary 8-5 kSetUG06 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 413, 10); AI_Movement_Track_Append(kActorOfficerLeary, 414, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 431, 0, 1017); @@ -503,6 +523,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 6: // kSetUG07 -> kSetFreeSlotC +// debug("leary 8-6 kSetUG07 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 416, 0, 620); AI_Movement_Track_Append(kActorOfficerLeary, 417, 0); @@ -512,6 +533,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; case 7: // kSetUG01 -> kSetFreeSlotC +// debug("leary 8-7 kSetUG01 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 405, 10); AI_Movement_Track_Append(kActorOfficerLeary, 406, 0); AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC @@ -526,8 +548,10 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) break; #endif // BLADERUNNER_ORIGINAL_BUGS case 9: - if (Random_Query(1, 2) == 2) { + if (Random_Query(1, 2) == 2) { // asdf restore +// if (1) { // kSetUG09 -> kSetFreeSlotC +// debug("leary 9-2 kSetUG09 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 433, 10); AI_Movement_Track_Append(kActorOfficerLeary, 434, 0); AI_Movement_Track_Append(kActorOfficerLeary, 435, 0); @@ -536,6 +560,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) return false; } // kSetUG08 -> kSetFreeSlotC +// debug("leary 9-1 kSetUG08 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 420, 10); AI_Movement_Track_Append(kActorOfficerLeary, 422, 2); AI_Movement_Track_Append(kActorOfficerLeary, 421, 1); @@ -550,6 +575,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) #endif // BLADERUNNER_ORIGINAL_BUGS case 10: // kSetUG12 -> kSetFreeSlotC +// debug("leary 10 kSetUG12 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 310, 0); AI_Movement_Track_Append(kActorOfficerLeary, 307, 0); AI_Movement_Track_Append(kActorOfficerLeary, 309, 0); @@ -568,6 +594,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) case kGoalOfficerLearyPrepareToHuntAroundAct4: // aux goal in order to immediately switch back to kGoalOfficerLearyHuntingAroundAct4 goal // and run GoalChanged() for kGoalOfficerLearyHuntingAroundAct4 again +// debug("Setting Leary goal to kGoalOfficerLearyHuntingAroundAct4"); Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return true; case kGoalOfficerLearyBlockingUG07: @@ -1296,6 +1323,7 @@ void AIScriptOfficerLeary::SetAnimationState(int animationState, int animationFr } bool AIScriptOfficerLeary::ReachedMovementTrackWaypoint(int waypointId) { +// debug("Leary reached waypoint: %d", waypointId); if (waypointId == 57 || waypointId == 58) { // Interrogating crowd in kSetRC01 Game_Flag_Set(kFlagOfficerLearyTakingNotes); diff --git a/engines/bladerunner/script/scene/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp index 2ea639f861..8910e9277c 100644 --- a/engines/bladerunner/script/scene/ct11.cpp +++ b/engines/bladerunner/script/scene/ct11.cpp @@ -85,6 +85,11 @@ void SceneScriptCT11::SceneLoaded() { Unobstacle_Object("RIM RF", true); Unobstacle_Object("DOOR RIGHT", true); Unobstacle_Object("BUMPER REAR", true); +#if BLADERUNNER_ORIGINAL_BUGS +#else + // this street sign blocks police officers from moving to waypoint 386 after they reach waypoint 242 + Unobstacle_Object("STREET SIGN", true); +#endif // BLADERUNNER_ORIGINAL_BUGS } Unclickable_Object("TRASH CAN"); } |