diff options
author | Peter Kohaut | 2018-03-17 16:40:33 +0100 |
---|---|---|
committer | Peter Kohaut | 2018-03-17 16:42:25 +0100 |
commit | 19d9e4cec818980a75772a204c96774afbd2b17e (patch) | |
tree | aaf4ae3f0322c0a75418451b50c8e09b424c0a7f /engines/bladerunner/script/ai | |
parent | b2727018344535789c96b0e9c95c741d0dd054c5 (diff) | |
download | scummvm-rg350-19d9e4cec818980a75772a204c96774afbd2b17e.tar.gz scummvm-rg350-19d9e4cec818980a75772a204c96774afbd2b17e.tar.bz2 scummvm-rg350-19d9e4cec818980a75772a204c96774afbd2b17e.zip |
BLADERUNNER: Added combat
Math cleanup
Fixed obstacle detection
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r-- | engines/bladerunner/script/ai/clovis.cpp | 12 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/dektora.cpp | 10 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/gaff.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/gordo.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/guzza.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/leon.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/lucy.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mccoy.cpp | 24 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mutant1.cpp | 15 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mutant2.cpp | 12 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mutant3.cpp | 12 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_leary.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/sadik.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/steele.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/taffy_patron.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/zuben.cpp | 4 |
16 files changed, 52 insertions, 66 deletions
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index 9c8976e02d..e55fdb9468 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -440,22 +440,22 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) { Global_Variable_Decrement(51, 1); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorDektora, kSetKP07)) { - Non_Player_Actor_Combat_Mode_On(kActorDektora, 0, 0, 0, 19, 4, 7, 8, 0, 0, 100, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorDektora, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorZuben, kSetKP07)) { - Non_Player_Actor_Combat_Mode_On(kActorZuben, 0, 0, 0, 19, 4, 7, 8, 0, 0, 100, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorZuben, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorSadik, kSetKP07)) { - Non_Player_Actor_Combat_Mode_On(kActorSadik, 0, 1, 0, 19, 4, 7, 8, 0, 0, 100, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorIzo, kSetKP07)) { - Non_Player_Actor_Combat_Mode_On(kActorIzo, 0, 0, 0, 19, 4, 7, 8, 0, 0, 100, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorIzo, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorGordo, kSetKP07)) { - Non_Player_Actor_Combat_Mode_On(kActorGordo, 0, 1, 0, 19, 4, 7, 8, 0, 0, 100, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorGordo, kActorCombatStateIdle, true, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false); } if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorClovis, kSetKP07)) { - Non_Player_Actor_Combat_Mode_On(kActorClovis, 0, 0, 0, 19, 4, 7, 8, 0, 0, 100, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorClovis, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false); } return true; diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp index 905c3d16da..28bdf3c83d 100644 --- a/engines/bladerunner/script/ai/dektora.cpp +++ b/engines/bladerunner/script/ai/dektora.cpp @@ -280,7 +280,7 @@ void AIScriptDektora::Retired(int byActorId) { } if (byActorId == kActorSteele && Actor_Query_In_Set(kActorSteele, kSetHF06) && Actor_Query_In_Set(kActorMcCoy, kSetHF06)) { - Non_Player_Actor_Combat_Mode_On(kActorSteele, 3, 1, 0, 15, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorMcCoy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } if (Actor_Query_In_Set(kActorDektora, kSetKP07)) { @@ -290,8 +290,8 @@ void AIScriptDektora::Retired(int byActorId) { if (!Global_Variable_Query(51)) { Player_Loses_Control(); Delay(2000); - Player_Set_Combat_Mode(0); - Loop_Actor_Walk_To_XYZ(0, -12.0, -41.580002, 72.0, 0, 1, 0, 0); + Player_Set_Combat_Mode(false); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); @@ -1095,11 +1095,11 @@ void AIScriptDektora::checkCombat() { && Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorDektora) != 450) { if (Global_Variable_Query(kVariableAffectionTowards) == 2) { - Global_Variable_Set(45, 0); + Global_Variable_Set(kVariableAffectionTowards, 0); } Actor_Set_Goal_Number(kActorDektora, 450); - Non_Player_Actor_Combat_Mode_On(kActorDektora, 0, 0, kActorMcCoy, 4, 4, 7, 8, 0, -1, -1, 20, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorDektora, kActorCombatStateIdle, false, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 20, 300, false); } } diff --git a/engines/bladerunner/script/ai/gaff.cpp b/engines/bladerunner/script/ai/gaff.cpp index c26f0d907f..c5e629cab0 100644 --- a/engines/bladerunner/script/ai/gaff.cpp +++ b/engines/bladerunner/script/ai/gaff.cpp @@ -287,7 +287,7 @@ bool AIScriptGaff::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 303: Actor_Face_Actor(kActorGaff, kActorMcCoy, 1); - Actor_Change_Animation_Mode(kActorGaff, kAnimationModeCombatShoot); + Actor_Change_Animation_Mode(kActorGaff, kAnimationModeCombatAttack); Sound_Play(27, 100, 0, 0, 50); Actor_Change_Animation_Mode(kActorMcCoy, 48); Actor_Retired_Here(kActorMcCoy, 12, 12, 1, -1); diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp index fd64112897..c44497176a 100644 --- a/engines/bladerunner/script/ai/gordo.cpp +++ b/engines/bladerunner/script/ai/gordo.cpp @@ -1157,7 +1157,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) { break; } break; - case kAnimationModeCombatShoot: + case kAnimationModeCombatAttack: _animationState = 18; _animationFrame = 0; break; diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp index 0f99fa8a46..5a4459535e 100644 --- a/engines/bladerunner/script/ai/guzza.cpp +++ b/engines/bladerunner/script/ai/guzza.cpp @@ -728,7 +728,7 @@ bool AIScriptGuzza::ChangeAnimationMode(int mode) { _animationFrame = 0; } break; - case kAnimationModeCombatShoot: + case kAnimationModeCombatAttack: _animationState = 31; _animationFrame = 0; break; diff --git a/engines/bladerunner/script/ai/leon.cpp b/engines/bladerunner/script/ai/leon.cpp index fad9da3cfb..fdcb538f0a 100644 --- a/engines/bladerunner/script/ai/leon.cpp +++ b/engines/bladerunner/script/ai/leon.cpp @@ -386,7 +386,7 @@ bool AIScriptLeon::ChangeAnimationMode(int mode) { _animationFrame = 0; var_45EDAC = 0; break; - case kAnimationModeCombatShoot: + case kAnimationModeCombatAttack: _animationState = 10; _animationFrame = 0; break; diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp index aebeac7322..464f228179 100644 --- a/engines/bladerunner/script/ai/lucy.cpp +++ b/engines/bladerunner/script/ai/lucy.cpp @@ -227,7 +227,7 @@ void AIScriptLucy::Retired(int byActorId) { if ((byActorId == kActorSteele || byActorId == kActorMcCoy) && Actor_Query_In_Set(kActorSteele, kSetHF06) && Actor_Query_In_Set(kActorMcCoy, kSetHF06)) { - Non_Player_Actor_Combat_Mode_On(kActorSteele, 3, 1, 0, 15, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorMcCoy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } if (Query_Difficulty_Level() && byActorId == kActorMcCoy && Game_Flag_Query(46)) { Global_Variable_Increment(2, 200); @@ -861,10 +861,10 @@ void AIScriptLucy::checkCombat() { && Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorLucy) != 450) { if (Global_Variable_Query(kVariableAffectionTowards) == 3) { - Global_Variable_Set(45, 0); + Global_Variable_Set(kVariableAffectionTowards, 0); } Actor_Set_Goal_Number(kActorLucy, 450); - Non_Player_Actor_Combat_Mode_On(kActorLucy, 0, 0, 0, 4, 0, 1, 2, -1, 0, 0, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorLucy, kActorCombatStateIdle, false, kActorMcCoy, 4, kAnimationModeIdle, kAnimationModeWalk, kAnimationModeRun, -1, 0, 0, 10, 300, false); } } diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 554de0cd80..56b54ac0eb 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -242,22 +242,22 @@ bool AIScriptMcCoy::ShotAtAndHit() { void AIScriptMcCoy::Retired(int byActorId) { if (byActorId == kActorSteele && Actor_Query_In_Set(kActorSteele, kSetHF06)) { if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) != 599) { - Non_Player_Actor_Combat_Mode_On(kActorSteele, 3, 1, kActorDektora, 15, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorDektora, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != 599) { - Non_Player_Actor_Combat_Mode_On(kActorSteele, 3, 1, kActorLucy, 15, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorLucy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } } if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorDektora, kSetHF05) && Actor_Query_Goal_Number(kActorDektora) != 599) { - Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 3, 1, kActorDektora, 4, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorDektora, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorDektora, kSetHF05) && Actor_Query_Goal_Number(kActorDektora) != 599) { - Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, 3, 1, kActorDektora, 4, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorDektora, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) { - Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 3, 1, kActorLucy, 4, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) { - Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, 3, 1, kActorLucy, 4, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } } @@ -307,7 +307,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 230: dword_45A0FC = Actor_Query_Goal_Number(kActorSteele) == 215; - Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatShoot); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAttack); return true; case 220: Actor_Change_Animation_Mode(kActorMcCoy, 75); @@ -412,7 +412,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 400: Actor_Set_Health(kActorMcCoy, 50, 50); Game_Flag_Set(373); - v5 = Global_Variable_Query(45); + v5 = Global_Variable_Query(kVariableAffectionTowards); if (v5 == 1) { Actor_Modify_Friendliness_To_Other(kActorSteele, kActorMcCoy, 3); } else if (v5 == 2) { @@ -428,14 +428,14 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) < Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy)) { Game_Flag_Set(653); } - v7 = Global_Variable_Query(45); + v7 = Global_Variable_Query(kVariableAffectionTowards); if (v7 == 1) { if (Game_Flag_Query(653)) { - Global_Variable_Set(45, 0); + Global_Variable_Set(kVariableAffectionTowards, 0); } } else if (v7 == 2 || v7 == 3) { if (!Game_Flag_Query(653)) { - Global_Variable_Set(45, 0); + Global_Variable_Set(kVariableAffectionTowards, 0); } } if (!Game_Flag_Query(653)) { @@ -1382,7 +1382,7 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) { break; } break; - case kAnimationModeCombatShoot: + case kAnimationModeCombatAttack: _animationState = 21; _animationFrame = 0; break; diff --git a/engines/bladerunner/script/ai/mutant1.cpp b/engines/bladerunner/script/ai/mutant1.cpp index 9ecaf9d80e..eb1c0562af 100644 --- a/engines/bladerunner/script/ai/mutant1.cpp +++ b/engines/bladerunner/script/ai/mutant1.cpp @@ -83,7 +83,7 @@ bool AIScriptMutant1::Update() { case 410: if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { - Non_Player_Actor_Combat_Mode_Off(70); + Non_Player_Actor_Combat_Mode_Off(kActorMutant1); Actor_Set_Goal_Number(kActorMutant1, 403); } break; @@ -326,28 +326,23 @@ bool AIScriptMutant1::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 410: switch (Actor_Query_Which_Set_In(kActorMutant1)) { case kSetUG01: - Non_Player_Actor_Combat_Mode_On(kActorMutant1, 0, 0, 0, 11, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 11, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG04: case kSetUG05: case kSetUG06: - Non_Player_Actor_Combat_Mode_On(kActorMutant1, 0, 0, 0, 10, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG07: - Non_Player_Actor_Combat_Mode_On(kActorMutant1, 0, 0, 0, 12, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 12, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG10: - Non_Player_Actor_Combat_Mode_On(kActorMutant1, 0, 0, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); - break; - case kSetUG12: - Non_Player_Actor_Combat_Mode_On(kActorMutant1, 0, 0, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); - break; case kSetUG14: - Non_Player_Actor_Combat_Mode_On(kActorMutant1, 0, 0, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant1, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; } return true; diff --git a/engines/bladerunner/script/ai/mutant2.cpp b/engines/bladerunner/script/ai/mutant2.cpp index 6a51c710dd..6317311088 100644 --- a/engines/bladerunner/script/ai/mutant2.cpp +++ b/engines/bladerunner/script/ai/mutant2.cpp @@ -305,25 +305,19 @@ bool AIScriptMutant2::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 410: switch (Actor_Query_Which_Set_In(kActorMutant2)) { case kSetUG01: - Non_Player_Actor_Combat_Mode_On(kActorMutant2, 0, 0, 0, 11, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant2, kActorCombatStateIdle, false, kActorMcCoy, 11, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG04: case kSetUG05: case kSetUG06: - Non_Player_Actor_Combat_Mode_On(kActorMutant2, 0, 0, 0, 10, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant2, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG10: - Non_Player_Actor_Combat_Mode_On(kActorMutant2, 0, 0, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); - break; - case kSetUG12: - Non_Player_Actor_Combat_Mode_On(kActorMutant2, 0, 0, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); - break; - case kSetUG14: - Non_Player_Actor_Combat_Mode_On(kActorMutant2, 0, 0, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant2, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; } return true; diff --git a/engines/bladerunner/script/ai/mutant3.cpp b/engines/bladerunner/script/ai/mutant3.cpp index 76a9a0edff..db161d8d5a 100644 --- a/engines/bladerunner/script/ai/mutant3.cpp +++ b/engines/bladerunner/script/ai/mutant3.cpp @@ -316,24 +316,19 @@ bool AIScriptMutant3::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 410: switch (Actor_Query_Which_Set_In(kActorMutant3)) { case kSetUG01: - Non_Player_Actor_Combat_Mode_On(kActorMutant3, 0, 1, 0, 11, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant3, kActorCombatStateIdle, false, kActorMcCoy, 11, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG04: case kSetUG05: case kSetUG06: - Non_Player_Actor_Combat_Mode_On(kActorMutant3, 0, 1, 0, 10, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant3, kActorCombatStateIdle, false, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; case kSetUG10: - Non_Player_Actor_Combat_Mode_On(kActorMutant3, 0, 1, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); - break; case kSetUG12: - Non_Player_Actor_Combat_Mode_On(kActorMutant3, 0, 1, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); - break; - case kSetUG14: - Non_Player_Actor_Combat_Mode_On(kActorMutant3, 0, 1, 0, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorMutant3, kActorCombatStateIdle, false, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); break; } break; @@ -342,6 +337,7 @@ bool AIScriptMutant3::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Flush(kActorMutant3); AI_Movement_Track_Append(kActorMutant3, 39, 100); AI_Movement_Track_Repeat(kActorMutant3); + break; case 599: AI_Movement_Track_Flush(kActorMutant3); diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp index b18ba0869f..0adbe7c1c0 100644 --- a/engines/bladerunner/script/ai/officer_leary.cpp +++ b/engines/bladerunner/script/ai/officer_leary.cpp @@ -979,7 +979,7 @@ bool AIScriptOfficerLeary::ChangeAnimationMode(int mode) { break; } break; - case kAnimationModeCombatShoot: + case kAnimationModeCombatAttack: _animationState = 24; _animationFrame = 0; break; diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp index b6abc8dab8..9fdb889b6c 100644 --- a/engines/bladerunner/script/ai/sadik.cpp +++ b/engines/bladerunner/script/ai/sadik.cpp @@ -356,7 +356,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 413: Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, 0, 1, 0); Actor_Set_Targetable(kActorSadik, 1); - Non_Player_Actor_Combat_Mode_On(kActorSadik, 0, 1, 0, 9, 4, 7, 8, 0, -1, -1, 15, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false); Actor_Set_Goal_Number(kActorSadik, 450); return true; @@ -412,7 +412,7 @@ bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) { case 418: Game_Flag_Reset(653); Actor_Set_Goal_Number(kActorClovis, 518); - Non_Player_Actor_Combat_Mode_On(kActorSadik, 0, 1, 0, 9, 4, 7, 8, 0, -1, -1, 15, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false); return true; case 419: @@ -999,6 +999,7 @@ bool AIScriptSadik::ChangeAnimationMode(int mode) { _animationState = 33; _animationFrame = 0; } + break; case 63: if (Actor_Query_Goal_Number(kActorSadik) != 105 && Actor_Query_Goal_Number(kActorSadik) != 106) { diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index e51a14a8ca..ff2afa1ec3 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -419,7 +419,7 @@ bool AIScriptSteele::ShotAtAndHit() { Actor_Set_Goal_Number(kActorSteele, 271); if (/* !a1 && */ Actor_Query_In_Set(kActorSteele, kSetHF06)) - Non_Player_Actor_Combat_Mode_On(1, 3, 1, 0, 15, 4, 7, 8, 0, 0, 100, 25, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorMcCoy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); return false; } diff --git a/engines/bladerunner/script/ai/taffy_patron.cpp b/engines/bladerunner/script/ai/taffy_patron.cpp index c7fa3a7165..0bf6861d12 100644 --- a/engines/bladerunner/script/ai/taffy_patron.cpp +++ b/engines/bladerunner/script/ai/taffy_patron.cpp @@ -95,13 +95,13 @@ bool AIScriptTaffyPatron::GoalChanged(int currentGoalNumber, int newGoalNumber) case 250: Actor_Put_In_Set(kActorTaffyPatron, kSetNR01); - Actor_Set_At_XYZ(kActorTaffyPatron, -170.39999, 23.68, -850.0, 324); - Async_Actor_Walk_To_XYZ(kActorTaffyPatron, -390.0, 31.549999, -429.0, 24, 1); + Actor_Set_At_XYZ(kActorTaffyPatron, -170.4f, 23.68f, -850.0f, 324); + Async_Actor_Walk_To_XYZ(kActorTaffyPatron, -390.0f, 31.55f, -429.0f, 24, 1); return true; case 255: Actor_Put_In_Set(kActorTaffyPatron, kSetNR01); - Actor_Set_At_XYZ(kActorTaffyPatron, -170.39999, 23.68, -850.0, 324); + Actor_Set_At_XYZ(kActorTaffyPatron, -170.4f, 23.68f, -850.0f, 324); Actor_Change_Animation_Mode(kActorTaffyPatron, 48); return true; diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp index 9fe6aa2f10..58cea9d39d 100644 --- a/engines/bladerunner/script/ai/zuben.cpp +++ b/engines/bladerunner/script/ai/zuben.cpp @@ -152,7 +152,7 @@ void AIScriptZuben::CompletedMovementTrack() { Set_Enter(kSetCT06, kSceneCT06); } if (Actor_Query_Goal_Number(kActorZuben) == 21) { - Non_Player_Actor_Combat_Mode_On(kActorZuben, 0, 0, kActorMcCoy, 6, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 15, 300, 0); + Non_Player_Actor_Combat_Mode_On(kActorZuben, kActorCombatStateIdle, false, kActorMcCoy, 6, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 15, 300, false); } int goal = Actor_Query_Goal_Number(kActorZuben); if (goal == 200) { @@ -977,7 +977,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) { break; } break; - case kAnimationModeCombatShoot: + case kAnimationModeCombatAttack: _animationState = 8; _animationFrame = 0; break; |