sadger / CorsixTH

Open source clone of Theme Hospital
Other
1 stars 0 forks source link

When should the outcome be determined? #24

Closed MarkL1961 closed 10 years ago

MarkL1961 commented 10 years ago

I have noticed that the outcome of the cover up is determined as soon as the timer ends and the inspector is spawned.

I could be wrong here, but I think you have until he arrives at reception. He hears the rumours that there is an epidemic so visits your hospital, until he gets there and see for himself he does not know if the rumours are true or not does he?

I think the results should be determined once he is at the desk.

sadger commented 10 years ago

It is supposed to do this already, a call to finishCoverUp() will calculate the result and it should only end early and work out the result if some patient has left while still infected. I think it may be a borderline condition that it's missing but the only two places it is called is when someone leaves the hospital early and when the inspector arrives. I'll have a look at it and try and see where it's going wrong. I have seen the inspector being spawned twice too, I think it's because both conditions are met at the same time perhaps?

sadger commented 10 years ago

Right I have made some minor changes (and pushed the commit) so hopefully this fixes a few issues. It now works as following in two stages, result (fines and rep loss etc.) calculation and then applying the result.

The result is calculated in two cases:

  1. An infected person leaves the hospital
  2. The inspector arrives at the desk

If the timer ends and then if an infected patient leaves the hospital without being cured the result is calculated immediately - so you can't send patients home to win the epidemic.

The result is applied only when the inspector reaches the desk - the fax is sent etc.

Additionally there was a case where if someone left and was infected while the inspector was on the way a new inspector would come (2 inspectors) I have hopefully solved this too.

MarkL1961 commented 10 years ago

Ahah, It is possible that one of them got fed up and went home towards the end of the epidemic, it was spreading quite a bit and difficult to keep an eye on everyone.