aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kohaut2019-01-08 20:49:59 +0100
committerPeter Kohaut2019-01-08 20:49:59 +0100
commit03319bcc7d3e12c51995a72b709c633d2f42fd08 (patch)
tree186de15f278fa5976dd47361d747b53adce7fef4
parentd14c6976da1f1bfa5e66ae23b512ab9129eba6a1 (diff)
downloadscummvm-rg350-03319bcc7d3e12c51995a72b709c633d2f42fd08.tar.gz
scummvm-rg350-03319bcc7d3e12c51995a72b709c633d2f42fd08.tar.bz2
scummvm-rg350-03319bcc7d3e12c51995a72b709c633d2f42fd08.zip
BLADERUNNER: Fixed Zuben death animation
Animation was not playing due to wrong switch statment
-rw-r--r--engines/bladerunner/combat.cpp4
-rw-r--r--engines/bladerunner/script/ai/zuben.cpp26
2 files changed, 14 insertions, 16 deletions
diff --git a/engines/bladerunner/combat.cpp b/engines/bladerunner/combat.cpp
index e1dc6b1044..90c879f6d1 100644
--- a/engines/bladerunner/combat.cpp
+++ b/engines/bladerunner/combat.cpp
@@ -159,10 +159,12 @@ void Combat::shoot(int actorId, Vector3 &to, int screenX) {
actor->combatModeOff();
}
actor->stopWalking(false);
- actor->changeAnimationMode(48, false);
+ actor->changeAnimationMode(kAnimationModeDie, false);
+
actor->retire(true, 72, 36, kActorMcCoy);
actor->setAtXYZ(actor->getXYZ(), actor->getFacing(), true, false, true);
_vm->_sceneObjects->setRetired(actorId + kSceneObjectOffsetActors, true);
+
sentenceId = 9020;
}
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index 58cea9d39d..e0f69be88c 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -375,7 +375,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case 14:
if (Actor_Query_Goal_Number(kActorMcCoy) != 1) {
Player_Loses_Control();
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
Game_Flag_Set(210);
Game_Flag_Set(719);
}
@@ -720,7 +720,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 13;
*animation = 405;
- Actor_Change_Animation_Mode(kActorZuben, 48);
+ Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 0;
@@ -737,7 +737,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 13;
*animation = 405;
- Actor_Change_Animation_Mode(kActorZuben, 48);
+ Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 0;
@@ -754,7 +754,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 14;
*animation = 393;
- Actor_Change_Animation_Mode(kActorZuben, 48);
+ Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 7;
@@ -771,7 +771,7 @@ bool AIScriptZuben::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 14;
*animation = 393;
- Actor_Change_Animation_Mode(kActorZuben, 48);
+ Actor_Change_Animation_Mode(kActorZuben, kAnimationModeDie);
} else {
_animationFrame = 0;
_animationState = 7;
@@ -1021,7 +1021,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
_animationState = 25;
_animationFrame = 0;
break;
- case 21:
+ case kAnimationModeHit:
switch (_animationState) {
case 2:
case 4:
@@ -1035,8 +1035,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
- case 3:
- case 6:
+ default:
if (Random_Query(0, 1)) {
_animationState = 9;
} else {
@@ -1046,7 +1045,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
break;
}
break;
- case 22:
+ case kAnimationModeCombatHit:
if (Random_Query(0, 1)) {
_animationState = 11;
} else {
@@ -1066,7 +1065,7 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
_animationState = 28;
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
Actor_Set_Targetable(kActorZuben, false);
switch (_animationState) {
case 2:
@@ -1079,16 +1078,13 @@ bool AIScriptZuben::ChangeAnimationMode(int mode) {
_animationState = 14;
_animationFrame = 0;
break;
- case 3:
- case 6:
- case 9:
- case 10:
+ default:
_animationState = 13;
_animationFrame = 0;
break;
}
break;
- case 49:
+ case kAnimationModeCombatDie:
Actor_Set_Targetable(kActorZuben, false);
_animationState = 14;
_animationFrame = 0;