As title. I encounter this bug when I try to test my patch for the builders.
The cause of crash is that, Pak96.Comic sets the productivity's range [i.e. fab_besch->get_bereich()] to 0 for many of the factories (I didn't check all), and thus when 0 is fed into sim_async_rand(), division-by-zero error occurs.
Relevant code below :
I don't know whether setting productivity range to 0 is valid or not, so I will leave it to Prissi/Dwachs to decide on how to fix it.
Edit :Forgot to mention, the Pak96.Comic I used for testing is the latest version, v0.4.6.
No prob to change this. I can use 1 in future. What do you think about it?
The game should never crash just because of the data in a pakset.
Problem sovled. Thank you Prissi. :)
@Sojo
Judging from the change, Prissi has chosen to allow 0 for productivity range, so you don't need to change your pakset. ;)