115 pluginPtrs.Reserve(regCount);
127 pluginPtrs.Insert(moduleNew);
145 for (
int i = 0; i < nPlugins; ++i)
148 if ( plugin != NULL )
192 protected void RegisterPlugin(
string plugin_class_name,
bool reg_on_client,
bool reg_on_server,
bool reg_on_release =
true )
194 if ( !reg_on_client )
202 if ( !reg_on_server )
204 if (
g_Game.IsMultiplayer() )
213 if ( !reg_on_release )
242 RegisterPlugin(plugin_class_name, reg_on_client, reg_on_server,
false);
247 protected void RegisterPluginDiag(
string plugin_class_name,
bool reg_on_client,
bool reg_on_server )
249 #ifdef DIAG_DEVELOPER
250 RegisterPlugin(plugin_class_name, reg_on_client, reg_on_server,
true);
261 typename plugin_type = plugin_class_name.
ToType();
333 if ( plugin == null )
335 #ifdef DIAG_DEVELOPER
338 PrintString(
"Module " + plugin_type.ToString() +
" is not Registred in PluginManager.c!");
365 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)
class array< Class T > PrintString
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...