diff options
author | Thomas Fach-Pedersen | 2018-03-10 08:37:29 +0100 |
---|---|---|
committer | Thomas Fach-Pedersen | 2018-03-10 08:37:29 +0100 |
commit | ed38407aa6118ab1b86b118efe5a91e65ba07a0a (patch) | |
tree | 52f8e6942cd39bd7080c3208f6b9869bf4c5228b /engines/bladerunner/script/ai/desk_clerk.cpp | |
parent | fce8b911a65a1278b55a754665ce02f4c6b44f49 (diff) | |
download | scummvm-rg350-ed38407aa6118ab1b86b118efe5a91e65ba07a0a.tar.gz scummvm-rg350-ed38407aa6118ab1b86b118efe5a91e65ba07a0a.tar.bz2 scummvm-rg350-ed38407aa6118ab1b86b118efe5a91e65ba07a0a.zip |
BLADERUNNER: Formatting, unify some goal cases
Diffstat (limited to 'engines/bladerunner/script/ai/desk_clerk.cpp')
-rw-r--r-- | engines/bladerunner/script/ai/desk_clerk.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/engines/bladerunner/script/ai/desk_clerk.cpp b/engines/bladerunner/script/ai/desk_clerk.cpp index 9a14508053..6af7d5d4ca 100644 --- a/engines/bladerunner/script/ai/desk_clerk.cpp +++ b/engines/bladerunner/script/ai/desk_clerk.cpp @@ -113,24 +113,18 @@ int AIScriptDeskClerk::GetFriendlinessModifierIfGetsClue(int otherActorId, int c } bool AIScriptDeskClerk::GoalChanged(int currentGoalNumber, int newGoalNumber) { - if (newGoalNumber > 2) { - if (newGoalNumber == 400) { - Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); - Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); - } - } else if (newGoalNumber) { - if (newGoalNumber == 1) { - Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); - Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); - } else { - Actor_Put_In_Set(kActorDeskClerk, kSetCT09); - Actor_Set_At_XYZ(kActorDeskClerk, 282.0f, 360.52f, 743.0f, 513); - } - } else { + switch (newGoalNumber) { + case 0: + case 2: Actor_Put_In_Set(kActorDeskClerk, kSetCT09); Actor_Set_At_XYZ(kActorDeskClerk, 282.0f, 360.52f, 743.0f, 513); + break; + case 1: + case 400: + Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); + Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); + break; } - return false; } |