116 pluginPtrs.Reserve(regCount);
128 pluginPtrs.Insert(moduleNew);
146 for (
int i = 0; i < nPlugins; ++i)
149 if ( plugin != NULL )
193 protected void RegisterPlugin(
string plugin_class_name,
bool reg_on_client,
bool reg_on_server,
bool reg_on_release =
true )
195 if ( !reg_on_client )
203 if ( !reg_on_server )
205 if (
g_Game.IsMultiplayer() )
214 if ( !reg_on_release )
243 RegisterPlugin(plugin_class_name, reg_on_client, reg_on_server,
false);
248 protected void RegisterPluginDiag(
string plugin_class_name,
bool reg_on_client,
bool reg_on_server )
250 #ifdef DIAG_DEVELOPER
251 RegisterPlugin(plugin_class_name, reg_on_client, reg_on_server,
true);
262 typename plugin_type = plugin_class_name.
ToType();
334 if ( plugin == null )
336 #ifdef DIAG_DEVELOPER
339 PrintString(
"Module " + plugin_type.ToString() +
" is not Registred in PluginManager.c!");
366 return (
GetPlugin(plugin_type) != NULL );
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
PluginBase GetPlugin(typename plugin_type)
bool IsPluginManagerExists()
bool IsModuleExist(typename plugin_type)
PluginBase GetPluginSafe(typename plugin_type)
class PluginManager g_Plugins
void PluginManagerDelete()
void OnUpdate(float delta_time)
Plugin interface for controlling of agent pool system.
PluginBase GetPluginByType(typename plugin_type)
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
void RegisterPluginDebug(string plugin_class_name, bool reg_on_client, bool reg_on_server)
Register new PluginBase to PluginManager for storing and handling plugin.
bool UnregisterPlugin(string plugin_class_name)
ref map< typename, ref PluginBase > m_PluginsPtrs
void RegisterPluginDiag(string plugin_class_name, bool reg_on_client, bool reg_on_server)
void MainOnUpdate(float delta_time)
ref array< typename > m_PluginRegister
void RegisterPlugin(string plugin_class_name, bool reg_on_client, bool reg_on_server, bool reg_on_release=true)
Register new PluginBase to PluginManager for storing and handling plugin.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void DumpStack()
Prints current call stack (stack trace)
Obsolete Managed PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...