Fixed warning when building stub_mm plugin.
4 // dll_plugin.cpp - implementation of plugin's HL DLL routines
9 * This file is part of Metamod.
11 * Metamod is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at
14 * your option) any later version.
16 * Metamod is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with Metamod; if not, write to the Free Software Foundation,
23 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * In addition, as a special exception, the author gives permission to
26 * link the code of this program with the Half-Life Game Engine ("HL
27 * Engine") and Modified Game Libraries ("MODs") developed by Valve,
28 * L.L.C ("Valve"). You must obey the GNU General Public License in all
29 * respects for all of the code used other than the HL Engine and MODs
30 * from Valve. If you modify this file, you may extend this exception
31 * to your version of the file, but you are not obligated to do so. If
32 * you do not wish to do so, delete this exception statement from your
44 #include "dll_plugin.h"
45 #include "log_plugin.h"
47 void wd_ServerDeactivate( void ) {
49 RETURN_META(MRES_HANDLED);
52 static DLL_FUNCTIONS gFunctionTable =
54 NULL, //! pfnGameInit()
59 NULL, //! pfnBlocked()
60 NULL, //! pfnKeyValue()
62 NULL, //! pfnRestore()
63 NULL, //! pfnSetAbsBox()
65 NULL, //! pfnSaveWriteFields()
66 NULL, //! pfnSaveReadFields()
68 NULL, //! pfnSaveGlobalState()
69 NULL, //! pfnRestoreGlobalState()
70 NULL, //! pfnResetGlobalState()
72 NULL, //! pfnClientConnect()
73 NULL, //! pfnClientDisconnect()
74 NULL, //! pfnClientKill()
75 NULL, //! pfnClientPutInServer()
76 NULL, //! pfnClientCommand()
77 NULL, //! pfnClientUserInfoChanged()
78 NULL, //! pfnServerActivate()
79 wd_ServerDeactivate, //! pfnServerDeactivate()
81 NULL, //! pfnPlayerPreThink()
82 NULL, //! pfnPlayerPostThink()
84 NULL, //! pfnStartFrame()
85 NULL, //! pfnParmsNewLevel()
86 NULL, //! pfnParmsChangeLevel()
88 NULL, //! pfnGetGameDescription()
89 NULL, //! pfnPlayerCustomization()
91 NULL, //! pfnSpectatorConnect()
92 NULL, //! pfnSpectatorDisconnect()
93 NULL, //! pfnSpectatorThink()
95 NULL, //! pfnSys_Error()
97 NULL, //! pfnPM_Move()
98 NULL, //! pfnPM_Init()
99 NULL, //! pfnPM_FindTextureType()
101 NULL, //! pfnSetupVisibility()
102 NULL, //! pfnUpdateClientData()
103 NULL, //! pfnAddToFullPack()
104 NULL, //! pfnCreateBaseline()
105 NULL, //! pfnRegisterEncoders()
106 NULL, //! pfnGetWeaponData()
107 NULL, //! pfnCmdStart()
108 NULL, //! pfnCmdEnd()
109 NULL, //! pfnConnectionlessPacket()
110 NULL, //! pfnGetHullBounds()
111 NULL, //! pfnCreateInstancedBaselines()
112 NULL, //! pfnInconsistentFile()
113 NULL, //! pfnAllowLagCompensation()
116 C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable,
117 int *interfaceVersion)
119 LOG_DEVELOPER(PLID, "called: GetEntityAPI2; version=%d", *interfaceVersion);
120 if(!pFunctionTable) {
121 LOG_ERROR(PLID, "GetEntityAPI2 called with null pFunctionTable");
124 else if(*interfaceVersion != INTERFACE_VERSION) {
125 LOG_ERROR(PLID, "GetEntityAPI2 version mismatch; requested=%d ours=%d",
126 *interfaceVersion, INTERFACE_VERSION);
127 //! Tell engine what version we had, so it can figure out who is
129 *interfaceVersion = INTERFACE_VERSION;
132 memcpy(pFunctionTable, &gFunctionTable, sizeof(DLL_FUNCTIONS));