keepParticle is ignored by postPatch
I'm not sure if this is an actual issue or if I missed something in the code, but consider the following:
The cloudFunctionObjects have a hook "postPatch" to allow users to run code if a particle hits a patch:
This hook has a parameter "keepParticle" if the user wants to remove the particle due to e.g. some custom model.
The hook is called here:
The value of "keepParticle" is not used. Right after the hook, the standard patch interaction code is called. Let's say the user chose "rebound". Then the following code is called:
Here, the value of keepParticle is uconditionally set to "true", ignoring the previous value.
To summarize: postPatch may set "keepParticle" to false, but this value is not used until the patch interaction models overwrite this value. Therefore postPatch has no effect on removing particles and the parameter "keepParticle" in postPatch seems to be ignored.