stub_mm/stub_mm.h
author Scott Ehlert <ds@alliedmods.net>
Fri Nov 13 18:25:56 2009 -0600 (2009-11-13)
changeset 678 c676a9ce0320
parent 498 c7b2f91c961b
permissions -rw-r--r--
Updated stub_mm, sample_mm, and project templates for changes from 1.8 (bug 4107, r=dvander).

- Added build configurations for Left 4 Dead 2 and Orange Box Valve.
- Now uses MMSOURCE18 as environment variable.
- Removed deprecated callclass usage.
- Now uses GetVSPInfo() API on old engine build.
     1 /**
     2  * vim: set ts=4 sw=4 tw=99 noet :
     3  * ======================================================
     4  * Metamod:Source Stub Plugin
     5  * Written by AlliedModders LLC.
     6  * ======================================================
     7  *
     8  * This software is provided 'as-is', without any express or implied warranty.
     9  * In no event will the authors be held liable for any damages arising from 
    10  * the use of this software.
    11  *
    12  * This stub plugin is public domain.
    13  */
    14 
    15 #ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_
    16 #define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_
    17 
    18 #include <ISmmPlugin.h>
    19 
    20 #if defined WIN32 && !defined snprintf
    21 #define snprintf _snprintf
    22 #endif
    23 
    24 class StubPlugin : public ISmmPlugin
    25 {
    26 public:
    27 	bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
    28 	bool Unload(char *error, size_t maxlen);
    29 	bool Pause(char *error, size_t maxlen);
    30 	bool Unpause(char *error, size_t maxlen);
    31 	void AllPluginsLoaded();
    32 public:
    33 	const char *GetAuthor();
    34 	const char *GetName();
    35 	const char *GetDescription();
    36 	const char *GetURL();
    37 	const char *GetLicense();
    38 	const char *GetVersion();
    39 	const char *GetDate();
    40 	const char *GetLogTag();
    41 };
    42 
    43 void Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
    44 
    45 extern StubPlugin g_StubPlugin;
    46 
    47 PLUGIN_GLOBALVARS();
    48 
    49 #endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_