Skip to content

Commit

Permalink
BLADERUNNER: _playerActorIdle should affect McCoy only
Browse files Browse the repository at this point in the history
Should be set or cleared only when McCoy is the actor who is walking and affect only McCoy
  • Loading branch information
antoniou79 committed Jun 22, 2019
1 parent 2287a4f commit f3cdbd2
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
9 changes: 9 additions & 0 deletions engines/bladerunner/actor.cpp
Expand Up @@ -493,9 +493,18 @@ bool Actor::loopWalk(const Vector3 &destination, int proximity, bool interruptib
_vm->playerGainsControl();
}

#if BLADERUNNER_ORIGINAL_BUGS
if (!wasInterrupted && proximity == 0 && !_vm->_playerActorIdle) {
setAtXYZ(destination, _facing, true, false, false);
}
#else
if (!wasInterrupted && proximity == 0
&& (_id == kActorMcCoy && !_vm->_playerActorIdle)
&& !isRetired()
) {
setAtXYZ(destination, _facing, true, false, false);
}
#endif // BLADERUNNER_ORIGINAL_BUGS

if (_id != kActorMcCoy) {
_vm->_mouse->enable();
Expand Down
5 changes: 5 additions & 0 deletions engines/bladerunner/script/ai/clovis.cpp
Expand Up @@ -353,8 +353,13 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
} else {
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
}
#if BLADERUNNER_ORIGINAL_BUGS
Delay(3000);
Actor_Retired_Here(kActorMcCoy, 12, 48, true, kActorClovis);
#else
Actor_Retired_Here(kActorMcCoy, 12, 48, true, kActorClovis);
Delay(3000);
#endif // BLADERUNNER_ORIGINAL_BUGS
return true;

case kGoalClovisStartChapter5:
Expand Down
71 changes: 71 additions & 0 deletions engines/bladerunner/script/script.cpp
Expand Up @@ -489,15 +489,29 @@ bool ScriptBase::Loop_Actor_Walk_To_Actor(int actorId, int otherActorId, int pro
run = true;
}

#if BLADERUNNER_ORIGINAL_BUGS
_vm->_playerActorIdle = false;
#else
if (actorId == kActorMcCoy) {
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

bool isRunning;
bool result = _vm->_actors[actorId]->loopWalkToActor(otherActorId, proximity, interruptible, run, true, &isRunning);

#if BLADERUNNER_ORIGINAL_BUGS
if (_vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#else
if (actorId == kActorMcCoy && _vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

if (isRunning) {
_vm->_runningActorId = actorId;
}
Expand All @@ -514,15 +528,29 @@ bool ScriptBase::Loop_Actor_Walk_To_Item(int actorId, int itemId, int proximity,
run = true;
}

#if BLADERUNNER_ORIGINAL_BUGS
_vm->_playerActorIdle = false;
#else
if (actorId == kActorMcCoy) {
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

bool isRunning;
bool result = _vm->_actors[actorId]->loopWalkToItem(itemId, proximity, interruptible, run, true, &isRunning);

#if BLADERUNNER_ORIGINAL_BUGS
if (_vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#else
if (actorId == kActorMcCoy && _vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

if (isRunning) {
_vm->_runningActorId = actorId;
}
Expand All @@ -539,15 +567,29 @@ bool ScriptBase::Loop_Actor_Walk_To_Scene_Object(int actorId, const char *object
run = true;
}

#if BLADERUNNER_ORIGINAL_BUGS
_vm->_playerActorIdle = false;
#else
if (actorId == kActorMcCoy) {
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

bool isRunning;
bool result = _vm->_actors[actorId]->loopWalkToSceneObject(objectName, proximity, interruptible, run, true, &isRunning);

#if BLADERUNNER_ORIGINAL_BUGS
if (_vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#else
if (actorId == kActorMcCoy && _vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

if (isRunning) {
_vm->_runningActorId = actorId;
}
Expand All @@ -564,15 +606,29 @@ bool ScriptBase::Loop_Actor_Walk_To_Waypoint(int actorId, int waypointId, int pr
run = true;
}

#if BLADERUNNER_ORIGINAL_BUGS
_vm->_playerActorIdle = false;
#else
if (actorId == kActorMcCoy) {
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

bool isRunning;
bool result = _vm->_actors[actorId]->loopWalkToWaypoint(waypointId, proximity, interruptible, run, true, &isRunning);

#if BLADERUNNER_ORIGINAL_BUGS
if (_vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#else
if (actorId == kActorMcCoy && _vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

if (isRunning) {
_vm->_runningActorId = actorId;
}
Expand All @@ -592,15 +648,30 @@ bool ScriptBase::Loop_Actor_Walk_To_XYZ(int actorId, float x, float y, float z,
run = true;
}
}

#if BLADERUNNER_ORIGINAL_BUGS
_vm->_playerActorIdle = false;
#else
if (actorId == kActorMcCoy) {
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

bool isRunning;
bool result = _vm->_actors[actorId]->loopWalkToXYZ(Vector3(x, y, z), proximity, interruptible, run, true, &isRunning);

#if BLADERUNNER_ORIGINAL_BUGS
if (_vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#else
if (actorId == kActorMcCoy && _vm->_playerActorIdle) {
result = true;
_vm->_playerActorIdle = false;
}
#endif // BLADERUNNER_ORIGINAL_BUGS

if (isRunning) {
_vm->_runningActorId = actorId;
}
Expand Down

0 comments on commit f3cdbd2

Please sign in to comment.