Propagating events
#2
Hello, welcome to the forum.
(I have moved your thread to the Lua discussion subforum, I think this is a better place for it.)
This does make sense for player-based and entity-based hooks, true. It doesn't make much sense for the other hooks.
A slight problem with your approach would be threading - if you removed a hook but it was already trying to execute in a different server thread, the removal code would need to take this into account.

It hasn't been implemented mostly because no-one requested it yet and we have other things to do, usually more important than improving existing API.

I personally think that the performance impact of this hooks being global is negligible, the C++-to-Lua transition is quite fast, so calling it even a few hundred times for a large server shouldn't be that much of a problem. We've had some tests done where the C++ code would call into Lua several hundred thousand times per second and yet it wasn't using the full CPU.
Reply
Thanks given by: Seadragon91


Messages In This Thread
Propagating events - by seiji - 01-26-2015, 02:50 AM
RE: Propagating events - by xoft - 01-26-2015, 03:22 AM
RE: Propagating events - by seiji - 01-26-2015, 04:22 AM
RE: Propagating events - by worktycho - 01-26-2015, 04:39 AM
RE: Propagating events - by xoft - 01-26-2015, 05:03 AM



Users browsing this thread: 1 Guest(s)