I was working on something and noticed that even with an empty update procedure, neutrons still die seemingly randomly. I tried looking in simulation.cpp-under what conditions will they vanish and is there a way to add more/remove existing conditions?
mecha-man:
There is a PROP_LIFE_KILL_DEC in the property value of it which causes the life to decrease until 0 and then kill it.
Something else kills it too. If you set life of neut to 0 via console, it still dies eventually. This does not happen with electrons or protons.
its when the contact a surface there is a chance for them to die.
mecha-man:
There is a PROP_LIFE_KILL_DEC in the property value of it which causes the life to decrease until 0 and then kill it.
yeah- I probably should have mentioned I removed that flag- thus was suprised that it still went down without it and without anything specificly in the element it's self
jacob1:
It is this code that kills it specifically, I think: https://github.com/simtr/The-Powder-Toy/blob/dab25160cc8f0a69488e422d158b3f230f75f326/src/simulation/Simulation.cpp#L4226-L4236
Apparently neutrons die with a 10% chance when bouncing off anything.
ahh thanks.
and seems I also have to take out "continue" as well- even without kill_part it will while that's there, now I can focus on the other stuff :)