Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objective can be completed with only half of humans to hoist #20

Closed
jmbau opened this issue Mar 7, 2021 · 2 comments
Closed

Objective can be completed with only half of humans to hoist #20

jmbau opened this issue Mar 7, 2021 · 2 comments

Comments

@jmbau
Copy link
Collaborator

jmbau commented Mar 7, 2021

Hello,

objective->humans_need_rescue is decremented twice when a hoisted human enters aircraft.

Here is the result:
When number of humans to rescue is an even number, hoisting half of humans to rescue is enough to complete objective.
When number of humans to rescue is an odd number, hoisting half of humans to rescue plus one humans is enough to complete objective.

I made some test:

  • the first decrementation is in mission.c / SARMissionPassengersEnterNotify() function, line #906 (objective->humans_need_rescue -= passengers_entered;)
  • the second one is in mission.c / SARMissionHoistInNotify() function, line #810 (objective->humans_need_rescue -= hoisted_in;). This decrementation occurs only when objective->humans_need_rescue is greater than 0.

I don't have enough programming knowledge to go further...

@hsanjuan
Copy link
Member

So one decrement is related to humans entering the aircraft, and the other with humans being hoisted-in. Do you think both are called for the same human?

Given the human objects are deleted when doing that I would expect that they cannot be counted twice.

@jmbau
Copy link
Collaborator Author

jmbau commented Nov 29, 2023

I don't know if both are called for the same human. I just made a test with Training 6: Medium Endurance mission : there are 3 humans to hoist, but when the second one is aboard, the first mission_objective_message_success appears, and if you land at hospital without the third mock victim, the second mission_objective_message_success appears and mission is considered as accomplished. I think that the 3rd guy is not very happy about that ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants