74 lines
2.3 KiB
C++
74 lines
2.3 KiB
C++
/**
|
|
* =============================================================================
|
|
* Accelerator Extension
|
|
* Copyright (C) 2009-2010 Asher Baker (asherkin). All rights reserved.
|
|
* =============================================================================
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it under
|
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
|
* Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
|
|
|
/**
|
|
* @file extension.hpp
|
|
* @brief Accelerator extension code header.
|
|
*/
|
|
|
|
#include "smsdk_ext.h"
|
|
|
|
/**
|
|
* @brief Sample implementation of the SDK Extension.
|
|
*/
|
|
class Accelerator : public SDKExtension, IPluginsListener
|
|
{
|
|
public: // SDKExtension
|
|
/**
|
|
* @brief This is called after the initial loading sequence has been processed.
|
|
*
|
|
* @param error Error message buffer.
|
|
* @param maxlength Size of error message buffer.
|
|
* @param late Whether or not the module was loaded after map load.
|
|
* @return True to succeed loading, false to fail.
|
|
*/
|
|
virtual bool SDK_OnLoad(char *error, size_t maxlen, bool late);
|
|
|
|
/**
|
|
* @brief This is called right before the extension is unloaded.
|
|
*/
|
|
virtual void SDK_OnUnload();
|
|
|
|
/**
|
|
* @brief Called on server activation before plugins receive the OnServerLoad forward.
|
|
*
|
|
* @param pEdictList Edicts list.
|
|
* @param edictCount Number of edicts in the list.
|
|
* @param clientMax Maximum number of clients allowed in the server.
|
|
*/
|
|
virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
|
|
|
|
public: // IPluginsListener
|
|
/**
|
|
* @brief Called when a plugin is fully loaded successfully.
|
|
*/
|
|
virtual void OnPluginLoaded(IPlugin *plugin);
|
|
|
|
/**
|
|
* @brief Called when a plugin is unloaded (only if fully loaded).
|
|
*/
|
|
virtual void OnPluginUnloaded(IPlugin *plugin);
|
|
};
|
|
|
|
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|