1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-30 19:52:17 +01:00

Updated for API 004, also added sourcehook stuff again

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%4021
This commit is contained in:
David Anderson 2005-04-18 19:33:44 +00:00
parent 8861a85102
commit 7eecefe875
2 changed files with 11 additions and 5 deletions

View File

@ -5,9 +5,9 @@ SamplePlugin g_SamplePlugin;
PLUGIN_EXPOSE(SamplePlugin, g_SamplePlugin);
//SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const *, char const *, char const *, char const *, bool, bool);
SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const *, char const *, char const *, char const *, bool, bool);
//bool LevelInit_handler( char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background );
bool LevelInit_handler( char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background );
bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, factories *list, char *error, size_t maxlen)
{
@ -21,7 +21,7 @@ bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, factories *list, char *error
return false;
}
//SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelInit, isgd, LevelInit_handler, false);
SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelInit, isgd, LevelInit_handler, false);
return true;
}
@ -31,7 +31,12 @@ bool SamplePlugin::Unload(char *error, size_t maxlen)
return true;
}
/*bool LevelInit_handler( char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background )
void SamplePlugin::AllPluginsLoaded()
{
//we don't really care
}
bool LevelInit_handler( char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background )
{
FILE *fp = fopen("c:\\dump.txt", "at");
if (!fp)
@ -42,4 +47,4 @@ bool SamplePlugin::Unload(char *error, size_t maxlen)
fclose(fp);
RETURN_META_VALUE(MRES_IGNORED, false);
}*/
}

View File

@ -8,6 +8,7 @@ class SamplePlugin : public ISmmPlugin
public:
bool Load(PluginId id, ISmmAPI *ismm, factories *list, char *error, size_t maxlen);
bool Unload(char *error, size_t maxlen);
void AllPluginsLoaded();
bool Pause(char *error, size_t maxlen)
{
return true;