Not logged inOpenClonk Forum
Up Topic Function pointers

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Zapper
On the OCM Guenther asked me to make a list of what is not optimal about the current effect implementation.

- the "target" parameter
..is unneeded. The only parameter needed is "effect" with the target as a property. Maybe same for "time" (in Fx*Timer)?

- temporary callbacks / Initialize / Destruction
You probably see the line if(temp) return; more than Start-calls without it.
Effects should have additional callbacks Fx*Initialize and Fx*Destruction that are meant to f.e. initialize variables. Those callbacks are obviously only called once on creation/removal - not on temporary Start/Stop

- all callbacks should automatically be forwarded to all effects on the object

- too few seem to use the return-value constants for Fx*Timer
Including me... why? Are they too hard to remember? In the docs it even says If this function is not implemented or returns -1, the effect will be deleted after this call.

Something else that I needed once:
- when is Fx*Stop called? After the items are dropped but before the Death()-callback in the object?
There is no possibility to easily f.e. remove the items of a Clonk when he dies(?)

- constants for some effect priorities (minor)

Anything else?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill