Changing the forwards' order?
I have 2 plugins:
A.smx B.smx A.smx is a plugin that reads buttons from OnPlayerRunCmd. B.smx is a plugin that modifies the buttons in OnPlayerRunCmd. A.smx sees the pre-modify value (which is 0 for me). To make A.smx see the value B.smx modifies, I need to reload A.smx. Is there anything I can do to accomplish the bold scenario without reloading the plugins or without changing A.smx's name to be alphabetically after B.smx? |
Re: Changing the forwards' order?
It all depends on the order plugins were loaded in as the internal forward system for global forwards adds functions to forwards after the plugin is either compiled (before OnPluginStart) or after fully loaded (after OnPluginStart), not only that, there is no concrete order plugins are loaded in, it's undefined what the order will be.
|
Re: Changing the forwards' order?
Could call a forward from B.smx after buttons modified like OnPlayerRunCmdPost or something, and read in A.smx from there.
|
Re: Changing the forwards' order?
Quote:
|
Re: Changing the forwards' order?
Relevant: https://github.com/alliedmodders/sourcemod/pull/591
You could try GetClientButtons on PostThink |
Re: Changing the forwards' order?
merge A and B into one thing.
|
Re: Changing the forwards' order?
What if set dependence for plugin A from B. Will it do loading A only after B?
Also you can check in plugin A plugin loading order with plugin iterator and force A to reload if it loaded before B. |
Re: Changing the forwards' order?
Quote:
|
Re: Changing the forwards' order?
That makes me wonder how many other function hooks SourceMod has where there is just a pre forward and no post forward.
|
All times are GMT -4. The time now is 00:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.