Not sure whether this is ultimately more of a "source" question or a "script" question, but here we go...
The documentation for OnPCMapLoadEvent implies that it's restricted to triggering only on "flagged" maps because otherwise it would have a terrible impact on the performance of well-trafficked servers:
The fact that this label requires a
mapflag for it to work is because, otherwise, it'd be server-wide and trigger
every time a player would change maps. Imagine the server load with 1,000 players
(oh the pain...)
Notably, there's no similar warning for OnNPCKIllEvent, which when set seems apt to trigger hundreds or thousands of times more often than OnPCMapLoadEvent would. Why is OnPCMapLoadEvent singled out like this? Is there a special concern about it bottlenecking a particular execution thread?
The crux of my interest is that I would ideally like to check for the presence or absence of a particular custom SC status when players change maps. I could do without, but it will make the implementation of a certain bonus feature a little more janky.
I'm willing to drill down into the source code to patch this in directly if it would help, but I would like to understand the basis of the concern about overusing OnPCMapLoadEvent - assuming it's well-founded. Thanks!
Question
INREM
Not sure whether this is ultimately more of a "source" question or a "script" question, but here we go...
The documentation for OnPCMapLoadEvent implies that it's restricted to triggering only on "flagged" maps because otherwise it would have a terrible impact on the performance of well-trafficked servers:
Notably, there's no similar warning for OnNPCKIllEvent, which when set seems apt to trigger hundreds or thousands of times more often than OnPCMapLoadEvent would. Why is OnPCMapLoadEvent singled out like this? Is there a special concern about it bottlenecking a particular execution thread?
The crux of my interest is that I would ideally like to check for the presence or absence of a particular custom SC status when players change maps. I could do without, but it will make the implementation of a certain bonus feature a little more janky.
I'm willing to drill down into the source code to patch this in directly if it would help, but I would like to understand the basis of the concern about overusing OnPCMapLoadEvent - assuming it's well-founded. Thanks!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.