From ac3ed34610c89911127d1335012583f7e92bccb7 Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Wed, 28 Aug 2019 21:32:12 +0300 Subject: BLADERUNNER: Fix restored walkers idle behavior and AI_Movement_Track_Append_With_Facing --- engines/bladerunner/script/ai/generic_walker_a.cpp | 21 ++++++++++++++++----- engines/bladerunner/script/ai/generic_walker_b.cpp | 19 +++++++++++++++---- engines/bladerunner/script/ai/generic_walker_c.cpp | 19 +++++++++++++++---- 3 files changed, 46 insertions(+), 13 deletions(-) (limited to 'engines/bladerunner/script/ai') diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp index d1e0d0469e..131e7befc6 100644 --- a/engines/bladerunner/script/ai/generic_walker_a.cpp +++ b/engines/bladerunner/script/ai/generic_walker_a.cpp @@ -226,7 +226,14 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) { *animation = 430; // Hooded person with umbrella still break; case 2: - *animation = 437; // Hatted lady with wooden umbrella still (different from 436 model!) +#if BLADERUNNER_ORIGINAL_BUGS + // Hatted lady with wooden umbrella still (different from 436 model!) + *animation = 437; +#else + // use model 436 and animation frame 4 + *animation = 436; + _animationFrame = 4; +#endif // BLADERUNNER_ORIGINAL_BUGS break; case 3: *animation = 431; // Person with glasses and beard still @@ -242,8 +249,8 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) { _animationFrame = 11; break; case 7: - *animation = 435; // Child walking // frame 5 could be used for still - _animationFrame = 5; + *animation = 435; // Child walking // frame 5 or 0 could be used for still + _animationFrame = 0; break; case 8: *animation = 422; // Hatted person walking fast // frame 1 could be used for still @@ -255,7 +262,7 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) { break; } if (!_vm->_cutContent - || Global_Variable_Query(kVariableGenericWalkerAModel) < 6 + || (Global_Variable_Query(kVariableGenericWalkerAModel) < 6 && Global_Variable_Query(kVariableGenericWalkerAModel) != 2) ) { _animationFrame = 0; } @@ -328,7 +335,11 @@ bool AIScriptGenericWalkerA::ChangeAnimationMode(int mode) { switch (mode) { case kAnimationModeIdle: _animationState = kGenericWalkerAStatesIdle; - _animationFrame = 0; + if (!_vm->_cutContent + || (Global_Variable_Query(kVariableGenericWalkerAModel) < 6 && Global_Variable_Query(kVariableGenericWalkerAModel) != 2) + ) { + _animationFrame = 0; + } break; case kAnimationModeWalk: _animationState = kGenericWalkerAStatesWalk; diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp index 4f8d4d3d60..748748b228 100644 --- a/engines/bladerunner/script/ai/generic_walker_b.cpp +++ b/engines/bladerunner/script/ai/generic_walker_b.cpp @@ -190,7 +190,14 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { *animation = 430; break; case 2: +#if BLADERUNNER_ORIGINAL_BUGS + // Hatted lady with wooden umbrella still (different from 436 model!) *animation = 437; +#else + // use model 436 and animation frame 4 + *animation = 436; + _animationFrame = 4; +#endif // BLADERUNNER_ORIGINAL_BUGS break; case 3: *animation = 431; @@ -206,8 +213,8 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { _animationFrame = 11; break; case 7: - *animation = 435; // Child walking // frame 5 could be used for still - _animationFrame = 5; + *animation = 435; // Child walking // frame 5 or 0 could be used for still + _animationFrame = 0; break; case 8: *animation = 422; // Hatted person walking fast // frame 1 could be used for still @@ -219,7 +226,7 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { break; } if (!_vm->_cutContent - || Global_Variable_Query(kVariableGenericWalkerAModel) < 6 + || (Global_Variable_Query(kVariableGenericWalkerBModel) < 6 && Global_Variable_Query(kVariableGenericWalkerBModel) != 2) ) { _animationFrame = 0; } @@ -285,7 +292,11 @@ bool AIScriptGenericWalkerB::ChangeAnimationMode(int mode) { switch (mode) { case kAnimationModeIdle: _animationState = kGenericWalkerBStatesIdle; - _animationFrame = 0; + if (!_vm->_cutContent + || (Global_Variable_Query(kVariableGenericWalkerBModel) < 6 && Global_Variable_Query(kVariableGenericWalkerBModel) != 2) + ) { + _animationFrame = 0; + } break; case kAnimationModeWalk: _animationState = kGenericWalkerBStatesWalk; diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp index b92cf71622..9a07aff73d 100644 --- a/engines/bladerunner/script/ai/generic_walker_c.cpp +++ b/engines/bladerunner/script/ai/generic_walker_c.cpp @@ -191,7 +191,14 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { *animation = 430; break; case 2: +#if BLADERUNNER_ORIGINAL_BUGS + // Hatted lady with wooden umbrella still (different from 436 model!) *animation = 437; +#else + // use model 436 and animation frame 4 + *animation = 436; + _animationFrame = 4; +#endif // BLADERUNNER_ORIGINAL_BUGS break; case 3: *animation = 431; @@ -207,8 +214,8 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { _animationFrame = 11; break; case 7: - *animation = 435; // Child walking // frame 5 could be used for still - _animationFrame = 5; + *animation = 435; // Child walking // frame 5 or 0 could be used for still + _animationFrame = 0; break; case 8: *animation = 422; // Hatted person walking fast // frame 1 could be used for still @@ -220,7 +227,7 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { break; } if (!_vm->_cutContent - || Global_Variable_Query(kVariableGenericWalkerAModel) < 6 + || (Global_Variable_Query(kVariableGenericWalkerCModel) < 6 && Global_Variable_Query(kVariableGenericWalkerCModel) != 2) ) { _animationFrame = 0; } @@ -286,7 +293,11 @@ bool AIScriptGenericWalkerC::ChangeAnimationMode(int mode) { switch (mode) { case kAnimationModeIdle: _animationState = kGenericWalkerCStatesIdle; - _animationFrame = 0; + if (!_vm->_cutContent + || (Global_Variable_Query(kVariableGenericWalkerCModel) < 6 && Global_Variable_Query(kVariableGenericWalkerCModel) != 2) + ) { + _animationFrame = 0; + } break; case kAnimationModeWalk: _animationState = kGenericWalkerCStatesWalk; -- cgit v1.2.3