mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
Fixed bug at17021.
This commit is contained in:
parent
572ad38366
commit
4e8eff3e04
@ -244,18 +244,12 @@ void CPluginMngr::CPlugin::Finalize()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginMngr::CPlugin::pauseFunction( int id ) {
|
void CPluginMngr::CPlugin::pauseFunction( int id )
|
||||||
if (isValid()){
|
{
|
||||||
paused_fun |= (1<<id);
|
|
||||||
g_commands.clearBufforedInfo();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginMngr::CPlugin::unpauseFunction( int id ) {
|
void CPluginMngr::CPlugin::unpauseFunction( int id )
|
||||||
if (isValid()) {
|
{
|
||||||
paused_fun &= ~(1<<id);
|
|
||||||
g_commands.clearBufforedInfo();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginMngr::CPlugin::setStatus( int a ) {
|
void CPluginMngr::CPlugin::setStatus( int a ) {
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
inline void setAuthor( const char* n ) { author.assign(n); }
|
inline void setAuthor( const char* n ) { author.assign(n); }
|
||||||
inline void setVersion( const char* n ) { version.assign(n); }
|
inline void setVersion( const char* n ) { version.assign(n); }
|
||||||
inline void setError( const char* n ) { errorMsg.assign(n); }
|
inline void setError( const char* n ) { errorMsg.assign(n); }
|
||||||
inline bool isValid() const { return ((status == ps_running) && (status != ps_locked)); }
|
inline bool isValid() const { return ((status == ps_running || status == ps_paused)); }
|
||||||
inline bool isPaused() const { return ( (status == ps_paused) ); }
|
inline bool isPaused() const { return ( (status == ps_paused) ); }
|
||||||
//inline bool isFunctionPaused( int id ) const { return (paused_fun & (1<<id)) ? true : false; }
|
//inline bool isFunctionPaused( int id ) const { return (paused_fun & (1<<id)) ? true : false; }
|
||||||
inline bool isExecutable(int id) const { return (isValid() && !isPaused()); }
|
inline bool isExecutable(int id) const { return (isValid() && !isPaused()); }
|
||||||
|
@ -1914,7 +1914,8 @@ static cell AMX_NATIVE_CALL unpause(AMX *amx, cell *params) /* 3 param */
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
plugin = g_plugins.findPluginFast( amx);
|
plugin = g_plugins.findPluginFast( amx);
|
||||||
if (plugin && plugin->isValid()) {
|
if (plugin && plugin->isValid() && plugin->isPaused() )
|
||||||
|
{
|
||||||
plugin->unpausePlugin();
|
plugin->unpausePlugin();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -97,12 +97,15 @@ void amx_command(){
|
|||||||
|
|
||||||
CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);
|
CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);
|
||||||
|
|
||||||
if ( plugin && plugin->isValid() )
|
if ( plugin && plugin->isValid() && plugin->isPaused() )
|
||||||
{
|
{
|
||||||
plugin->unpausePlugin();
|
plugin->unpausePlugin();
|
||||||
print_srvconsole("Unpaused plugin \"%s\"\n",plugin->getName() );
|
print_srvconsole("Unpaused plugin \"%s\"\n",plugin->getName() );
|
||||||
|
} else if (!plugin) {
|
||||||
|
print_srvconsole("Couldn't find plugin matching \"%s\"\n",sPlugin);
|
||||||
|
} else {
|
||||||
|
print_srvconsole("Plugin %s can't be unpaused right now.", sPlugin);
|
||||||
}
|
}
|
||||||
else print_srvconsole("Couldn't find plugin matching \"%s\"\n",sPlugin);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (!strcmp(cmd,"cvars"))
|
else if (!strcmp(cmd,"cvars"))
|
||||||
|
Loading…
Reference in New Issue
Block a user