darope@0: // vi: set ts=4 sw=4 : darope@0: // vim: set tw=75 : darope@0: darope@0: // engine_api_post.cpp - implementation of "post" versions of Half-Life engine darope@0: // functions darope@0: darope@0: /* darope@0: * Copyright (c) 2001-2003 Will Day darope@0: * darope@0: * This file is part of Metamod. darope@0: * darope@0: * Metamod is free software; you can redistribute it and/or modify it darope@0: * under the terms of the GNU General Public License as published by the darope@0: * Free Software Foundation; either version 2 of the License, or (at darope@0: * your option) any later version. darope@0: * darope@0: * Metamod is distributed in the hope that it will be useful, but darope@0: * WITHOUT ANY WARRANTY; without even the implied warranty of darope@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU darope@0: * General Public License for more details. darope@0: * darope@0: * You should have received a copy of the GNU General Public License darope@0: * along with Metamod; if not, write to the Free Software Foundation, darope@0: * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA darope@0: * darope@0: * In addition, as a special exception, the author gives permission to darope@0: * link the code of this program with the Half-Life Game Engine ("HL darope@0: * Engine") and Modified Game Libraries ("MODs") developed by Valve, darope@0: * L.L.C ("Valve"). You must obey the GNU General Public License in all darope@0: * respects for all of the code used other than the HL Engine and MODs darope@0: * from Valve. If you modify this file, you may extend this exception darope@0: * to your version of the file, but you are not obligated to do so. If darope@0: * you do not wish to do so, delete this exception statement from your darope@0: * version. darope@0: * darope@0: */ darope@0: darope@0: #include darope@0: #include darope@0: darope@0: #include darope@0: darope@0: #include "engine_api.h" darope@0: #include "meta_api.h" darope@0: #include "trace_api.h" darope@0: #include "log_plugin.h" darope@0: darope@0: darope@0: int PrecacheModel_Post(char *s) { darope@0: ENGINE_TRACE(pfnPrecacheModel, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int PrecacheSound_Post(char *s) { darope@0: ENGINE_TRACE(pfnPrecacheSound, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void SetModel_Post(edict_t *e, const char *m) { darope@0: ENGINE_TRACE(pfnSetModel, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int ModelIndex_Post(const char *m) { darope@0: ENGINE_TRACE(pfnModelIndex, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int ModelFrames_Post(int modelIndex) { darope@0: ENGINE_TRACE(pfnModelFrames, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax) { darope@0: ENGINE_TRACE(pfnSetSize, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ChangeLevel_Post(char *s1, char *s2) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnChangeLevel, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void GetSpawnParms_Post(edict_t *ent) { darope@0: ENGINE_TRACE(pfnGetSpawnParms, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SaveSpawnParms_Post(edict_t *ent) { darope@0: ENGINE_TRACE(pfnSaveSpawnParms, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: float VecToYaw_Post(const float *rgflVector) { darope@0: ENGINE_TRACE(pfnVecToYaw, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0.0); darope@0: } darope@0: void VecToAngles_Post(const float *rgflVectorIn, float *rgflVectorOut) { darope@0: ENGINE_TRACE(pfnVecToAngles, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void MoveToOrigin_Post(edict_t *ent, const float *pflGoal, float dist, int iMoveType) { darope@0: ENGINE_TRACE(pfnMoveToOrigin, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ChangeYaw_Post(edict_t *ent) { darope@0: ENGINE_TRACE(pfnChangeYaw, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ChangePitch_Post(edict_t *ent) { darope@0: ENGINE_TRACE(pfnChangePitch, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: edict_t *FindEntityByString_Post(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue) { darope@0: edict_t *ed=META_RESULT_ORIG_RET(edict_t *); darope@0: ENGINE_TRACE(pfnFindEntityByString, P_POST, ("classname=%s netname=%s", darope@0: ed ? STRING(ed->v.classname) : "nil", darope@0: ed ? STRING(ed->v.netname) : "nil")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: int GetEntityIllum_Post(edict_t *pEnt) { darope@0: ENGINE_TRACE(pfnGetEntityIllum, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: edict_t *FindEntityInSphere_Post(edict_t *pEdictStartSearchAfter, const float *org, float rad) { darope@0: edict_t *ret; darope@0: ret=META_RESULT_ORIG_RET(edict_t *); darope@0: ENGINE_TRACE(pfnFindEntityInSphere, P_POST, ("previous=%s current=%s", darope@0: pEdictStartSearchAfter ? STRING(pEdictStartSearchAfter->v.classname) : "nil", darope@0: ret ? STRING(ret->v.classname) : "nil")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: edict_t *FindClientInPVS_Post(edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnFindClientInPVS, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: edict_t *EntitiesInPVS_Post(edict_t *pplayer) { darope@0: ENGINE_TRACE(pfnEntitiesInPVS, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: void MakeVectors_Post(const float *rgflVector) { darope@0: ENGINE_TRACE(pfnMakeVectors, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void AngleVectors_Post(const float *rgflVector, float *forward, float *right, float *up) { darope@0: ENGINE_TRACE(pfnAngleVectors, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: edict_t *CreateEntity_Post(void) { darope@0: ENGINE_TRACE(pfnCreateEntity, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void RemoveEntity_Post(edict_t *e) { darope@0: ENGINE_TRACE(pfnRemoveEntity, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: edict_t *CreateNamedEntity_Post(int className) { darope@0: edict_t *ret; darope@0: ret=META_RESULT_ORIG_RET(edict_t *); darope@0: ENGINE_TRACE(pfnCreateNamedEntity, P_POST, ("created=%s", darope@0: ret ? STRING(ret->v.classname) : "nil")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: void MakeStatic_Post(edict_t *ent) { darope@0: ENGINE_TRACE(pfnMakeStatic, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int EntIsOnFloor_Post(edict_t *e) { darope@0: ENGINE_TRACE(pfnEntIsOnFloor, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int DropToFloor_Post(edict_t *e) { darope@0: ENGINE_TRACE(pfnDropToFloor, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: int WalkMove_Post(edict_t *ent, float yaw, float dist, int iMode) { darope@0: ENGINE_TRACE(pfnWalkMove, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void SetOrigin_Post(edict_t *e, const float *rgflOrigin) { darope@0: ENGINE_TRACE(pfnSetOrigin, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch) { darope@0: ENGINE_TRACE(pfnEmitSound, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void EmitAmbientSound_Post(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch) { darope@0: ENGINE_TRACE(pfnEmitAmbientSound, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr) { darope@0: ENGINE_TRACE(pfnTraceLine, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void TraceToss_Post(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr) { darope@0: ENGINE_TRACE(pfnTraceToss, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int TraceMonsterHull_Post(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr) { darope@0: ENGINE_TRACE(pfnTraceMonsterHull, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void TraceHull_Post(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr) { darope@0: ENGINE_TRACE(pfnTraceHull, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void TraceModel_Post(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr) { darope@0: ENGINE_TRACE(pfnTraceModel, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: const char *TraceTexture_Post(edict_t *pTextureEntity, const float *v1, const float *v2 ) { darope@0: ENGINE_TRACE(pfnTraceTexture, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void TraceSphere_Post(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr) { darope@0: ENGINE_TRACE(pfnTraceSphere, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void GetAimVector_Post(edict_t *ent, float speed, float *rgflReturn) { darope@0: ENGINE_TRACE(pfnGetAimVector, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void ServerCommand_Post(char *str) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnServerCommand, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ServerExecute_Post(void) { darope@0: ENGINE_TRACE(pfnServerExecute, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void engClientCommand_Post(edict_t *pEdict, char *szFmt, ...) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnClientCommand, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void ParticleEffect_Post(const float *org, const float *dir, float color, float count) { darope@0: ENGINE_TRACE(pfnParticleEffect, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void LightStyle_Post(int style, char *val) { darope@0: ENGINE_TRACE(pfnLightStyle, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int DecalIndex_Post(const char *name) { darope@0: ENGINE_TRACE(pfnDecalIndex, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int PointContents_Post(const float *rgflVector) { darope@0: ENGINE_TRACE(pfnPointContents, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) { darope@0: if(msg_type > 64) darope@0: ENGINE_TRACE(pfnMessageBegin, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void MessageEnd_Post(void) { darope@0: ENGINE_TRACE(pfnMessageEnd, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void WriteByte_Post(int iValue) { darope@0: ENGINE_TRACE(pfnWriteByte, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteChar_Post(int iValue) { darope@0: ENGINE_TRACE(pfnWriteChar, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteShort_Post(int iValue) { darope@0: ENGINE_TRACE(pfnWriteShort, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteLong_Post(int iValue) { darope@0: ENGINE_TRACE(pfnWriteLong, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteAngle_Post(float flValue) { darope@0: ENGINE_TRACE(pfnWriteAngle, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteCoord_Post(float flValue) { darope@0: ENGINE_TRACE(pfnWriteCoord, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteString_Post(const char *sz) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnWriteString, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void WriteEntity_Post(int iValue) { darope@0: ENGINE_TRACE(pfnWriteEntity, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void CVarRegister_Post(cvar_t *pCvar) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnCVarRegister, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: float CVarGetFloat_Post(const char *szVarName) { darope@0: ENGINE_TRACE(pfnCVarGetFloat, P_POST, ("cvar=%s val=%f", darope@0: szVarName, META_RESULT_ORIG_RET(float))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0.0); darope@0: } darope@0: const char *CVarGetString_Post(const char *szVarName) { darope@0: const char *val=META_RESULT_ORIG_RET(const char *); darope@0: ENGINE_TRACE(pfnCVarGetString, P_POST, ("cvar=%s val=%s", darope@0: szVarName, darope@0: val ? val : "nil")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void CVarSetFloat_Post(const char *szVarName, float flValue) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnCVarSetFloat, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void CVarSetString_Post(const char *szVarName, const char *szValue) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnCVarSetString, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnAlertMessage, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@242: #ifdef HLSDK_3_2_OLD_EIFACE darope@0: void EngineFprintf_Post(FILE *pfile, char *szFmt, ...) { darope@242: #else darope@242: void EngineFprintf_Post(void *pfile, char *szFmt, ...) { darope@242: #endif darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnEngineFprintf, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@236: #ifdef HLSDK_3_2_OLD_EIFACE darope@0: void *PvAllocEntPrivateData_Post(edict_t *pEdict, long cb) { darope@236: #else darope@236: void *PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb) { darope@236: #endif darope@0: ENGINE_TRACE(pfnPvAllocEntPrivateData, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void *PvEntPrivateData_Post(edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnPvEntPrivateData, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void FreeEntPrivateData_Post(edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnFreeEntPrivateData, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: const char *SzFromIndex_Post(int iString) { darope@0: ENGINE_TRACE(pfnSzFromIndex, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: int AllocString_Post(const char *szValue) { darope@0: ENGINE_TRACE(pfnAllocString, P_POST, ("str=%s alloc=%d", darope@0: szValue, META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: struct entvars_s *GetVarsOfEnt_Post(edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnGetVarsOfEnt, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: edict_t *PEntityOfEntOffset_Post(int iEntOffset) { darope@0: ENGINE_TRACE(pfnPEntityOfEntOffset, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: int EntOffsetOfPEntity_Post(const edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnEntOffsetOfPEntity, P_POST, ("offset=%d", darope@0: META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int IndexOfEdict_Post(const edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnIndexOfEdict, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: edict_t *PEntityOfEntIndex_Post(int iEntIndex) { darope@0: edict_t *ed=META_RESULT_ORIG_RET(edict_t *); darope@0: ENGINE_TRACE(pfnPEntityOfEntIndex, P_POST, ("classname=%s netname=%s", darope@0: ed ? STRING(ed->v.classname) : "nil", darope@0: ed ? STRING(ed->v.netname) : "nil")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: edict_t *FindEntityByVars_Post(struct entvars_s *pvars) { darope@0: ENGINE_TRACE(pfnFindEntityByVars, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void *GetModelPtr_Post(edict_t *pEdict) { darope@0: ENGINE_TRACE(pfnGetModelPtr, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: int RegUserMsg_Post(const char *pszName, int iSize) { darope@0: int ret; darope@0: ENGINE_TRACE(pfnRegUserMsg, P_POST, ("msg=%s, id=%d, size=%d", darope@0: pszName, META_RESULT_ORIG_RET(int), iSize)); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void AnimationAutomove_Post(const edict_t *pEdict, float flTime) { darope@0: ENGINE_TRACE(pfnAnimationAutomove, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles ) { darope@0: ENGINE_TRACE(pfnGetBonePosition, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@236: #ifdef HLSDK_3_2_OLD_EIFACE darope@0: unsigned long FunctionFromName_Post( const char *pName ) { darope@236: #else darope@236: uint32 FunctionFromName_Post( const char *pName ) { darope@236: #endif darope@0: ENGINE_TRACE(pfnFunctionFromName, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0UL); darope@0: } darope@236: #ifdef HLSDK_3_2_OLD_EIFACE darope@0: const char *NameForFunction_Post( unsigned long function ) { darope@236: #else darope@236: const char *NameForFunction_Post( uint32 function ) { darope@236: #endif darope@0: ENGINE_TRACE(pfnNameForFunction, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: //! JOHN: engine callbacks so game DLL can print messages to individual clients darope@0: void ClientPrintf_Post( edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg ) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnClientPrintf, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void ServerPrint_Post( const char *szMsg ) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnServerPrint, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: //! these 3 added so game DLL can easily access client 'cmd' strings darope@0: const char *Cmd_Args_Post( void ) { darope@0: ENGINE_TRACE(pfnCmd_Args, P_POST, ("args=%s", darope@0: META_RESULT_ORIG_RET(char *))); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: const char *Cmd_Argv_Post( int argc ) { darope@0: ENGINE_TRACE(pfnCmd_Argv, P_POST, ("arg=%s", darope@0: META_RESULT_ORIG_RET(char *))); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: int Cmd_Argc_Post( void ) { darope@0: ENGINE_TRACE(pfnCmd_Argc, P_POST, ("argc=%d", darope@0: META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void GetAttachment_Post(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ) { darope@0: ENGINE_TRACE(pfnGetAttachment, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void CRC32_Init_Post(CRC32_t *pulCRC) { darope@0: ENGINE_TRACE(pfnCRC32_Init, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void CRC32_ProcessBuffer_Post(CRC32_t *pulCRC, void *p, int len) { darope@0: ENGINE_TRACE(pfnCRC32_ProcessBuffer, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void CRC32_ProcessByte_Post(CRC32_t *pulCRC, unsigned char ch) { darope@0: ENGINE_TRACE(pfnCRC32_ProcessByte, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: CRC32_t CRC32_Final_Post(CRC32_t pulCRC) { darope@0: ENGINE_TRACE(pfnCRC32_Final, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@236: #ifdef HLSDK_3_2_OLD_EIFACE darope@0: long RandomLong_Post(long lLow, long lHigh) { darope@236: #else darope@236: int32 RandomLong_Post(int32 lLow, int32 lHigh) { darope@236: #endif darope@0: ENGINE_TRACE(pfnRandomLong, P_POST, ("random=%ld", darope@0: META_RESULT_ORIG_RET(long))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0L); darope@0: } darope@0: float RandomFloat_Post(float flLow, float flHigh) { darope@0: ENGINE_TRACE(pfnRandomFloat, P_POST, ("random=%f", darope@0: META_RESULT_ORIG_RET(float))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0.0); darope@0: } darope@0: darope@0: void SetView_Post(const edict_t *pClient, const edict_t *pViewent ) { darope@0: ENGINE_TRACE(pfnSetView, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: float Time_Post( void ) { darope@0: ENGINE_TRACE(pfnTime, P_POST, ("time=%f", darope@0: META_RESULT_ORIG_RET(float))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0.0); darope@0: } darope@0: void CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw) { darope@0: ENGINE_TRACE(pfnCrosshairAngle, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: byte *LoadFileForMe_Post(char *filename, int *pLength) { darope@0: ENGINE_TRACE(pfnLoadFileForMe, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void FreeFile_Post(void *buffer) { darope@0: ENGINE_TRACE(pfnFreeFile, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: //! trigger_endsection darope@0: void EndSection_Post(const char *pszSectionName) { darope@0: ENGINE_TRACE(pfnEndSection, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int CompareFileTime_Post(char *filename1, char *filename2, int *iCompare) { darope@0: ENGINE_TRACE(pfnCompareFileTime, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void GetGameDir_Post(char *szGetGameDir) { darope@0: ENGINE_TRACE(pfnGetGameDir, P_POST, ("gamedir=%s", szGetGameDir)); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void Cvar_RegisterVariable_Post(cvar_t *variable) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnCvar_RegisterVariable, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void FadeClientVolume_Post(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds) { darope@0: ENGINE_TRACE(pfnFadeClientVolume, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SetClientMaxspeed_Post(const edict_t *pEdict, float fNewMaxspeed) { darope@0: ENGINE_TRACE(pfnSetClientMaxspeed, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: //! returns NULL if fake client can't be created darope@0: edict_t * CreateFakeClient_Post(const char *netname) { darope@0: ENGINE_TRACE(pfnCreateFakeClient, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void RunPlayerMove_Post(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec ) { darope@0: ENGINE_TRACE(pfnRunPlayerMove, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int NumberOfEntities_Post(void) { darope@0: ENGINE_TRACE(pfnNumberOfEntities, P_POST, ("num=%d", darope@0: META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: //! passing in NULL gets the serverinfo darope@0: char *GetInfoKeyBuffer_Post(edict_t *e) { darope@0: ENGINE_TRACE(pfnGetInfoKeyBuffer, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: char *InfoKeyValue_Post(char *infobuffer, char *key) { darope@0: ENGINE_TRACE(pfnInfoKeyValue, P_POST, ("value=%s", darope@0: META_RESULT_ORIG_RET(char *))); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void SetKeyValue_Post(char *infobuffer, char *key, char *value) { darope@0: ENGINE_TRACE(pfnSetKeyValue, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value) { darope@0: ENGINE_TRACE(pfnSetClientKeyValue, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: int IsMapValid_Post(char *filename) { darope@0: ENGINE_TRACE(pfnIsMapValid, P_POST, ("file=%s, val=%d", darope@0: filename, META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void StaticDecal_Post( const float *origin, int decalIndex, int entityIndex, int modelIndex ) { darope@0: ENGINE_TRACE(pfnStaticDecal, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int PrecacheGeneric_Post(char *s) { darope@0: ENGINE_TRACE(pfnPrecacheGeneric, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: //! returns the server assigned userid for this player. useful for logging frags, etc. returns -1 if the edict couldn't be found in the list of clients darope@0: int GetPlayerUserId_Post(edict_t *e ) { darope@0: edict_t *ed = e; darope@0: int userid=META_RESULT_ORIG_RET(int); darope@0: ENGINE_TRACE(pfnGetPlayerUserId, P_POST, ("netname=%s userid=%d", darope@0: ed ? STRING(ed->v.netname) : "nil", darope@0: userid)); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void BuildSoundMsg_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) darope@0: { darope@0: ENGINE_TRACE(pfnBuildSoundMsg, P_POST, ("sample=%s", sample)); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: //! is this a dedicated server? darope@0: int IsDedicatedServer_Post(void) { darope@0: ENGINE_TRACE(pfnIsDedicatedServer, P_POST, ("val=%d", darope@0: META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: cvar_t *CVarGetPointer_Post(const char *szVarName) { darope@0: // output in Pre darope@0: ENGINE_TRACE(pfnCVarGetPointer, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: //! returns the server assigned WONid for this player. useful for logging frags, etc. returns -1 if the edict couldn't be found in the list of clients darope@0: unsigned int GetPlayerWONId_Post(edict_t *e) { darope@0: edict_t *ed = e; darope@0: unsigned int wonid=META_RESULT_ORIG_RET(unsigned int); darope@0: ENGINE_TRACE(pfnGetPlayerWONId, P_POST, ("netname=%s wonid=%u", darope@0: ed ? STRING(ed->v.netname) : "nil", darope@0: wonid)); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0U); darope@0: } darope@0: darope@0: //! YWB 8/1/99 TFF Physics additions darope@0: void Info_RemoveKey_Post( char *s, const char *key ) { darope@0: ENGINE_TRACE(pfnInfo_RemoveKey, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: const char *GetPhysicsKeyValue_Post( const edict_t *pClient, const char *key ) { darope@0: ENGINE_TRACE(pfnGetPhysicsKeyValue, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: void SetPhysicsKeyValue_Post( const edict_t *pClient, const char *key, const char *value ) { darope@0: ENGINE_TRACE(pfnSetPhysicsKeyValue, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: const char *GetPhysicsInfoString_Post( const edict_t *pClient ) { darope@0: ENGINE_TRACE(pfnGetPhysicsInfoString, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: unsigned short PrecacheEvent_Post( int type, const char *psz ) { darope@0: ENGINE_TRACE(pfnPrecacheEvent, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0U); darope@0: } darope@0: void PlaybackEvent_Post( int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ) darope@0: { darope@0: ENGINE_TRACE(pfnPlaybackEvent, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: unsigned char *SetFatPVS_Post( float *org ) { darope@0: ENGINE_TRACE(pfnSetFatPVS, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: unsigned char *SetFatPAS_Post( float *org ) { darope@0: ENGINE_TRACE(pfnSetFatPAS, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: int CheckVisibility_Post( const edict_t *entity, unsigned char *pset ) { darope@0: ENGINE_TRACE(pfnCheckVisibility, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void DeltaSetField_Post( struct delta_s *pFields, const char *fieldname ) { darope@0: ENGINE_TRACE(pfnDeltaSetField, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DeltaUnsetField_Post( struct delta_s *pFields, const char *fieldname ) { darope@0: ENGINE_TRACE(pfnDeltaUnsetField, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DeltaAddEncoder_Post( char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ) { darope@0: ENGINE_TRACE(pfnDeltaAddEncoder, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: int GetCurrentPlayer_Post( void ) { darope@0: ENGINE_TRACE(pfnGetCurrentPlayer, P_POST, ("val=%d", darope@0: META_RESULT_ORIG_RET(int))); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int CanSkipPlayer_Post( const edict_t *player ) { darope@0: ENGINE_TRACE(pfnCanSkipPlayer, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: int DeltaFindField_Post( struct delta_s *pFields, const char *fieldname ) { darope@0: ENGINE_TRACE(pfnDeltaFindField, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void DeltaSetFieldByIndex_Post( struct delta_s *pFields, int fieldNumber ) { darope@0: ENGINE_TRACE(pfnDeltaSetFieldByIndex, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: void DeltaUnsetFieldByIndex_Post( struct delta_s *pFields, int fieldNumber ) { darope@0: ENGINE_TRACE(pfnDeltaUnsetFieldByIndex, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void SetGroupMask_Post( int mask, int op ) { darope@0: ENGINE_TRACE(pfnSetGroupMask, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: int engCreateInstancedBaseline_Post( int classname, struct entity_state_s *baseline ) { darope@0: ENGINE_TRACE(pfnCreateInstancedBaseline, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: void Cvar_DirectSet_Post( struct cvar_s *var, char *value ) { darope@0: ENGINE_TRACE(pfnCvar_DirectSet, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: //! Forces the client and server to be running with the same version of the specified file darope@0: //!( e.g., a player model ). darope@0: //! Calling this has no effect in single player darope@0: void ForceUnmodified_Post( FORCE_TYPE type, float *mins, float *maxs, const char *filename ) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnForceUnmodified, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void GetPlayerStats_Post( const edict_t *pClient, int *ping, int *packet_loss ) { darope@0: const edict_t *ed=pClient; darope@0: ENGINE_TRACE(pfnGetPlayerStats, P_POST, darope@0: ("netname=%s ping=%d packet_loss=%d", darope@0: ed ? STRING(ed->v.netname) : "nil", darope@0: *ping, darope@0: *packet_loss)); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void AddServerCommand_Post( char *cmd_name, void (*function) (void) ) { darope@0: // trace output in Pre darope@0: ENGINE_TRACE(pfnAddServerCommand, P_POST, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: // Added in SDK 2.2: darope@0: darope@0: //! For voice communications, set which clients hear eachother. darope@0: //! NOTE: these functions take player entity indices (starting at 1). darope@0: qboolean Voice_GetClientListening_Post(int iReceiver, int iSender) { darope@0: ENGINE_TRACE(pfnVoice_GetClientListening, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, false); darope@0: } darope@0: qboolean Voice_SetClientListening_Post(int iReceiver, int iSender, qboolean bListen) { darope@0: ENGINE_TRACE(pfnVoice_SetClientListening, P_POST, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, false); darope@0: } darope@0: darope@0: // Added for HL 1109 (no SDK update): darope@0: darope@0: const char *GetPlayerAuthId_Post(edict_t *e) { darope@0: edict_t *ed = e; darope@0: const char *authid=META_RESULT_ORIG_RET(const char *); darope@0: ENGINE_TRACE(pfnGetPlayerAuthId, P_POST, ("netname=%s authid=%s", darope@0: ed ? STRING(ed->v.netname) : "nil", darope@0: authid ? authid : "nil")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: // Added 2003/11/10 (no SDK update): darope@0: darope@236: sequenceEntry_s *SequenceGet_Post(const char* fileName, const char* entryName) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnSequenceGet, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@236: sentenceEntry_s *SequencePickSentence_Post(const char* groupName, int pickMethod, int *picked) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnSequencePickSentence, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, NULL); darope@0: } darope@0: darope@0: int GetFileSize_Post(char *filename) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnGetFileSize, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: unsigned int GetApproxWavePlayLen_Post(const char *filepath) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnGetApproxWavePlayLen, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: int IsCareerMatch_Post(void) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnIsCareerMatch, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: int GetLocalizedStringLength_Post(const char *label) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnGetLocalizedStringLength, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void RegisterTutorMessageShown_Post(int mid) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnRegisterTutorMessageShown, P_PRE, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: int GetTimesTutorMessageShown_Post(int mid) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnGetTimesTutorMessageShown, P_PRE, ("")); darope@0: RETURN_META_VALUE(MRES_IGNORED, 0); darope@0: } darope@0: darope@0: void ProcessTutorMessageDecayBuffer_Post(int *buffer, int bufferLength) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnProcessTutorMessageDecayBuffer, P_PRE, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void ConstructTutorMessageDecayBuffer_Post(int *buffer, int bufferLength) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnConstructTutorMessageDecayBuffer, P_PRE, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: void ResetTutorMessageDecayData_Post(void) { darope@0: // trace output in Post darope@0: ENGINE_TRACE(pfnResetTutorMessageDecayData, P_PRE, ("")); darope@0: RETURN_META(MRES_IGNORED); darope@0: } darope@0: darope@0: enginefuncs_t meta_engfuncs_post = { darope@0: PrecacheModel_Post, // pfnPrecacheModel() darope@0: PrecacheSound_Post, // pfnPrecacheSound() darope@0: SetModel_Post, // pfnSetModel() darope@0: ModelIndex_Post, // pfnModelIndex() darope@0: ModelFrames_Post, // pfnModelFrames() darope@0: darope@0: SetSize_Post, // pfnSetSize() darope@0: ChangeLevel_Post, // pfnChangeLevel() darope@0: GetSpawnParms_Post, // pfnGetSpawnParms() darope@0: SaveSpawnParms_Post, // pfnSaveSpawnParms() darope@0: darope@0: VecToYaw_Post, // pfnVecToYaw() darope@0: VecToAngles_Post, // pfnVecToAngles() darope@0: MoveToOrigin_Post, // pfnMoveToOrigin() darope@0: ChangeYaw_Post, // pfnChangeYaw() darope@0: ChangePitch_Post, // pfnChangePitch() darope@0: darope@0: FindEntityByString_Post, // pfnFindEntityByString() darope@0: GetEntityIllum_Post, // pfnGetEntityIllum() darope@0: FindEntityInSphere_Post, // pfnFindEntityInSphere() darope@0: FindClientInPVS_Post, // pfnFindClientInPVS() darope@0: EntitiesInPVS_Post, // pfnEntitiesInPVS() darope@0: darope@0: MakeVectors_Post, // pfnMakeVectors() darope@0: AngleVectors_Post, // pfnAngleVectors() darope@0: darope@0: CreateEntity_Post, // pfnCreateEntity() darope@0: RemoveEntity_Post, // pfnRemoveEntity() darope@0: CreateNamedEntity_Post, // pfnCreateNamedEntity() darope@0: darope@0: MakeStatic_Post, // pfnMakeStatic() darope@0: EntIsOnFloor_Post, // pfnEntIsOnFloor() darope@0: DropToFloor_Post, // pfnDropToFloor() darope@0: darope@0: WalkMove_Post, // pfnWalkMove() darope@0: SetOrigin_Post, // pfnSetOrigin() darope@0: darope@0: EmitSound_Post, // pfnEmitSound() darope@0: EmitAmbientSound_Post, // pfnEmitAmbientSound() darope@0: darope@0: TraceLine_Post, // pfnTraceLine() darope@0: TraceToss_Post, // pfnTraceToss() darope@0: TraceMonsterHull_Post, // pfnTraceMonsterHull() darope@0: TraceHull_Post, // pfnTraceHull() darope@0: TraceModel_Post, // pfnTraceModel() darope@0: TraceTexture_Post, // pfnTraceTexture() darope@0: TraceSphere_Post, // pfnTraceSphere() darope@0: GetAimVector_Post, // pfnGetAimVector() darope@0: darope@0: ServerCommand_Post, // pfnServerCommand() darope@0: ServerExecute_Post, // pfnServerExecute() darope@0: engClientCommand_Post, // pfnClientCommand() // d'oh, ClientCommand in dllapi too darope@0: darope@0: ParticleEffect_Post, // pfnParticleEffect() darope@0: LightStyle_Post, // pfnLightStyle() darope@0: DecalIndex_Post, // pfnDecalIndex() darope@0: PointContents_Post, // pfnPointContents() darope@0: darope@0: MessageBegin_Post, // pfnMessageBegin() darope@0: MessageEnd_Post, // pfnMessageEnd() darope@0: darope@0: WriteByte_Post, // pfnWriteByte() darope@0: WriteChar_Post, // pfnWriteChar() darope@0: WriteShort_Post, // pfnWriteShort() darope@0: WriteLong_Post, // pfnWriteLong() darope@0: WriteAngle_Post, // pfnWriteAngle() darope@0: WriteCoord_Post, // pfnWriteCoord() darope@0: WriteString_Post, // pfnWriteString() darope@0: WriteEntity_Post, // pfnWriteEntity() darope@0: darope@0: CVarRegister_Post, // pfnCVarRegister() darope@0: CVarGetFloat_Post, // pfnCVarGetFloat() darope@0: CVarGetString_Post, // pfnCVarGetString() darope@0: CVarSetFloat_Post, // pfnCVarSetFloat() darope@0: CVarSetString_Post, // pfnCVarSetString() darope@0: darope@0: AlertMessage_Post, // pfnAlertMessage() darope@0: EngineFprintf_Post, // pfnEngineFprintf() darope@0: darope@0: PvAllocEntPrivateData_Post, // pfnPvAllocEntPrivateData() darope@0: PvEntPrivateData_Post, // pfnPvEntPrivateData() darope@0: FreeEntPrivateData_Post, // pfnFreeEntPrivateData() darope@0: darope@0: SzFromIndex_Post, // pfnSzFromIndex() darope@0: AllocString_Post, // pfnAllocString() darope@0: darope@0: GetVarsOfEnt_Post, // pfnGetVarsOfEnt() darope@0: PEntityOfEntOffset_Post, // pfnPEntityOfEntOffset() darope@0: EntOffsetOfPEntity_Post, // pfnEntOffsetOfPEntity() darope@0: IndexOfEdict_Post, // pfnIndexOfEdict() darope@0: PEntityOfEntIndex_Post, // pfnPEntityOfEntIndex() darope@0: FindEntityByVars_Post, // pfnFindEntityByVars() darope@0: GetModelPtr_Post, // pfnGetModelPtr() darope@0: darope@0: RegUserMsg_Post, // pfnRegUserMsg() darope@0: darope@0: AnimationAutomove_Post, // pfnAnimationAutomove() darope@0: GetBonePosition_Post, // pfnGetBonePosition() darope@0: darope@0: FunctionFromName_Post, // pfnFunctionFromName() darope@0: NameForFunction_Post, // pfnNameForFunction() darope@0: darope@0: ClientPrintf_Post, // pfnClientPrintf() //! JOHN: engine callbacks so game DLL can print messages to individual clients darope@0: ServerPrint_Post, // pfnServerPrint() darope@0: darope@0: Cmd_Args_Post, // pfnCmd_Args() //! these 3 added darope@0: Cmd_Argv_Post, // pfnCmd_Argv() //! so game DLL can easily darope@0: Cmd_Argc_Post, // pfnCmd_Argc() //! access client 'cmd' strings darope@0: darope@0: GetAttachment_Post, // pfnGetAttachment() darope@0: darope@0: CRC32_Init_Post, // pfnCRC32_Init() darope@0: CRC32_ProcessBuffer_Post, // pfnCRC32_ProcessBuffer() darope@0: CRC32_ProcessByte_Post, // pfnCRC32_ProcessByte() darope@0: CRC32_Final_Post, // pfnCRC32_Final() darope@0: darope@0: RandomLong_Post, // pfnRandomLong() darope@0: RandomFloat_Post, // pfnRandomFloat() darope@0: darope@0: SetView_Post, // pfnSetView() darope@0: Time_Post, // pfnTime() darope@0: CrosshairAngle_Post, // pfnCrosshairAngle() darope@0: darope@0: LoadFileForMe_Post, // pfnLoadFileForMe() darope@0: FreeFile_Post, // pfnFreeFile() darope@0: darope@0: EndSection_Post, // pfnEndSection() //! trigger_endsection darope@0: CompareFileTime_Post, // pfnCompareFileTime() darope@0: GetGameDir_Post, // pfnGetGameDir() darope@0: Cvar_RegisterVariable_Post, // pfnCvar_RegisterVariable() darope@0: FadeClientVolume_Post, // pfnFadeClientVolume() darope@0: SetClientMaxspeed_Post, // pfnSetClientMaxspeed() darope@0: CreateFakeClient_Post, // pfnCreateFakeClient() //! returns NULL if fake client can't be created darope@0: RunPlayerMove_Post, // pfnRunPlayerMove() darope@0: NumberOfEntities_Post, // pfnNumberOfEntities() darope@0: darope@0: GetInfoKeyBuffer_Post, // pfnGetInfoKeyBuffer() //! passing in NULL gets the serverinfo darope@0: InfoKeyValue_Post, // pfnInfoKeyValue() darope@0: SetKeyValue_Post, // pfnSetKeyValue() darope@0: SetClientKeyValue_Post, // pfnSetClientKeyValue() darope@0: darope@0: IsMapValid_Post, // pfnIsMapValid() darope@0: StaticDecal_Post, // pfnStaticDecal() darope@0: PrecacheGeneric_Post, // pfnPrecacheGeneric() darope@0: GetPlayerUserId_Post, // pfnGetPlayerUserId() //! returns the server assigned userid for this player. darope@0: BuildSoundMsg_Post, // pfnBuildSoundMsg() darope@0: IsDedicatedServer_Post, // pfnIsDedicatedServer() //! is this a dedicated server? darope@0: CVarGetPointer_Post, // pfnCVarGetPointer() darope@0: GetPlayerWONId_Post, // pfnGetPlayerWONId() //! returns the server assigned WONid for this player. darope@0: darope@0: //! YWB 8/1/99 TFF Physics additions darope@0: Info_RemoveKey_Post, // pfnInfo_RemoveKey() darope@0: GetPhysicsKeyValue_Post, // pfnGetPhysicsKeyValue() darope@0: SetPhysicsKeyValue_Post, // pfnSetPhysicsKeyValue() darope@0: GetPhysicsInfoString_Post, // pfnGetPhysicsInfoString() darope@0: PrecacheEvent_Post, // pfnPrecacheEvent() darope@0: PlaybackEvent_Post, // pfnPlaybackEvent() darope@0: darope@0: SetFatPVS_Post, // pfnSetFatPVS() darope@0: SetFatPAS_Post, // pfnSetFatPAS() darope@0: darope@0: CheckVisibility_Post, // pfnCheckVisibility() darope@0: darope@0: DeltaSetField_Post, // pfnDeltaSetField() darope@0: DeltaUnsetField_Post, // pfnDeltaUnsetField() darope@0: DeltaAddEncoder_Post, // pfnDeltaAddEncoder() darope@0: GetCurrentPlayer_Post, // pfnGetCurrentPlayer() darope@0: CanSkipPlayer_Post, // pfnCanSkipPlayer() darope@0: DeltaFindField_Post, // pfnDeltaFindField() darope@0: DeltaSetFieldByIndex_Post, // pfnDeltaSetFieldByIndex() darope@0: DeltaUnsetFieldByIndex_Post,// pfnDeltaUnsetFieldByIndex() darope@0: darope@0: SetGroupMask_Post, // pfnSetGroupMask() darope@0: darope@0: engCreateInstancedBaseline_Post, // pfnCreateInstancedBaseline() // d'oh, CreateInstancedBaseline in dllapi too darope@0: Cvar_DirectSet_Post, // pfnCvar_DirectSet() darope@0: darope@0: ForceUnmodified_Post, // pfnForceUnmodified() darope@0: darope@0: GetPlayerStats_Post, // pfnGetPlayerStats() darope@0: darope@0: AddServerCommand_Post, // pfnAddServerCommand() darope@0: darope@0: // Added in SDK 2.2: darope@0: Voice_GetClientListening_Post, // pfnVoice_GetClientListening() darope@0: Voice_SetClientListening_Post, // pfnVoice_SetClientListening() darope@0: darope@0: // Added for HL 1109 (no SDK update): darope@0: GetPlayerAuthId_Post, // pfnGetPlayerAuthId() darope@0: darope@0: // Added 2003/11/10 (no SDK update): darope@0: SequenceGet_Post, // pfnSequenceGet() darope@0: SequencePickSentence_Post, // pfnSequencePickSentence() darope@0: GetFileSize_Post, // pfnGetFileSize() darope@0: GetApproxWavePlayLen_Post, // pfnGetApproxWavePlayLen() darope@0: IsCareerMatch_Post, // pfnIsCareerMatch() darope@0: GetLocalizedStringLength_Post, // pfnGetLocalizedStringLength() darope@0: RegisterTutorMessageShown_Post, // pfnRegisterTutorMessageShown() darope@0: GetTimesTutorMessageShown_Post, // pfnGetTimesTutorMessageShown() darope@0: ProcessTutorMessageDecayBuffer_Post, // pfnProcessTutorMessageDecayBuffer() darope@0: ConstructTutorMessageDecayBuffer_Post, // pfnConstructTutorMessageDecayBuffer() darope@0: ResetTutorMessageDecayData_Post, // pfnResetTutorMessageDecayData() darope@0: }; darope@0: darope@0: C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion ) darope@0: { darope@0: LOG_DEVELOPER(PLID, "called: GetEngineFunctions_Post; version=%d", *interfaceVersion); darope@0: if(!pengfuncsFromEngine) { darope@0: LOG_ERROR(PLID, "GetEngineFunctions_Post called with null pengfuncsFromEngine"); darope@0: return(FALSE); darope@0: } darope@0: else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) { darope@0: LOG_ERROR(PLID, "GetEngineFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, ENGINE_INTERFACE_VERSION); darope@0: // Tell metamod what version we had, so it can figure out who is out of date. darope@0: *interfaceVersion = ENGINE_INTERFACE_VERSION; darope@0: return(FALSE); darope@0: } darope@0: memcpy(pengfuncsFromEngine, &meta_engfuncs_post, sizeof(enginefuncs_t)); darope@0: return TRUE; darope@0: }