sadger / CorsixTH

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

Epidemics starting for incorrect diseases #7

Closed sadger closed 10 years ago

sadger commented 10 years ago

Apparently there are epidemics appearing for visual diseases such as King Complex or at least showing up in console as such. You should never get a epidemic for a visual disease as you cannot pass it on properly without messing with animations.

MarkL1961 commented 10 years ago

I changed this a little and it does seem to be sticking to the level file now when creating epidemics local potentially_contagious = contRate > 0 and (100 / contRate) >= math.random(1,100)

sadger commented 10 years ago

I have no idea how you managed to get one for king complex even without that change.

math.random(1,100) is always >0 so contRate >= math.random(1,100) should never be true. Mysterious, i'll change it to the correct 1/ContRate though and go from there.

On a side note I have started a new branch for these experimental changes called "experimental-epidemics" so the main branch doesn't get cluttered with stuff, in the branch already I have removed any multiple epidemics so there is only ever one background epidemic OR current active epidemic. You should probably checkout and work from this branch which will be updated as we tackle the issues of the day :P

MarkL1961 commented 10 years ago

On the face of it local potentially_contagious = contRate and contRate >= math.random(1,100) should work. Maybe sometimes local potentially_contagious = contRate slips through before the next step.

sadger commented 10 years ago

It's not directly on this topic but..

why are diseases like sleeping_illness and discrete_itching on the visuals list? They seem to have a visual_id (in the disease file) but they have seemingly normal patients.

MarkL1961 commented 10 years ago

I asked this too a while back, it seems that because there are special animations like yawning they are visuals. I have not seen any scratching though, but is that because they do it discretely?

sadger commented 10 years ago

I was planning, to begin with, leave out epidemics with visual diseases, as to infect another you need to change the animation etc. or, we could include those "visual" disease that don't have any extra animation (yet) and just treat them as non-visual.

MarkL1961 commented 10 years ago

What about limiting it for now to those with contrate > 0 ?

sadger commented 10 years ago

Yes I meant that but additionally without visual-ness such as transparency has contrate >0 in some cases. For now i'll make it just any non-visual disease with contrate > 0 then we can consider the rest later.

sadger commented 10 years ago

I have made it so the even the cheat epidemics only spawn non-visual diseases. Once you are confident you aren't getting any visual disease in the cheats or normally spawning we can close this.

sadger commented 10 years ago

Once pregnancy is made a visual disease this should work as expected.