sar2 icon indicating copy to clipboard operation
sar2 copied to clipboard

Objective can be completed with only half of humans to hoist

Open jmbau opened this issue 3 years ago • 2 comments

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...

jmbau avatar Mar 07 '21 19:03 jmbau