trace_plugin/engine_api_post.cpp
author darope
Tue Apr 06 07:36:14 2004 +0000 (2004-04-06)
changeset 0 d15304fcb7a7
child 47 3bf8ea9ab02d
permissions -rw-r--r--
Initial revision
darope@0
     1
// vi: set ts=4 sw=4 :
darope@0
     2
// vim: set tw=75 :
darope@0
     3
darope@0
     4
// engine_api_post.cpp - implementation of "post" versions of Half-Life engine 
darope@0
     5
//                       functions
darope@0
     6
darope@0
     7
/*
darope@0
     8
 * Copyright (c) 2001-2003 Will Day <[email protected]>
darope@0
     9
 *
darope@0
    10
 *    This file is part of Metamod.
darope@0
    11
 *
darope@0
    12
 *    Metamod is free software; you can redistribute it and/or modify it
darope@0
    13
 *    under the terms of the GNU General Public License as published by the
darope@0
    14
 *    Free Software Foundation; either version 2 of the License, or (at
darope@0
    15
 *    your option) any later version.
darope@0
    16
 *
darope@0
    17
 *    Metamod is distributed in the hope that it will be useful, but
darope@0
    18
 *    WITHOUT ANY WARRANTY; without even the implied warranty of
darope@0
    19
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
darope@0
    20
 *    General Public License for more details.
darope@0
    21
 *
darope@0
    22
 *    You should have received a copy of the GNU General Public License
darope@0
    23
 *    along with Metamod; if not, write to the Free Software Foundation,
darope@0
    24
 *    Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
darope@0
    25
 *
darope@0
    26
 *    In addition, as a special exception, the author gives permission to
darope@0
    27
 *    link the code of this program with the Half-Life Game Engine ("HL
darope@0
    28
 *    Engine") and Modified Game Libraries ("MODs") developed by Valve,
darope@0
    29
 *    L.L.C ("Valve").  You must obey the GNU General Public License in all
darope@0
    30
 *    respects for all of the code used other than the HL Engine and MODs
darope@0
    31
 *    from Valve.  If you modify this file, you may extend this exception
darope@0
    32
 *    to your version of the file, but you are not obligated to do so.  If
darope@0
    33
 *    you do not wish to do so, delete this exception statement from your
darope@0
    34
 *    version.
darope@0
    35
 *
darope@0
    36
 */
darope@0
    37
darope@0
    38
#include <stdio.h>
darope@0
    39
#include <stdarg.h>
darope@0
    40
darope@0
    41
#include <extdll.h>
darope@0
    42
darope@0
    43
#include "engine_api.h"
darope@0
    44
#include "meta_api.h"
darope@0
    45
#include "trace_api.h"
darope@0
    46
#include "log_plugin.h"
darope@0
    47
darope@0
    48
darope@0
    49
int PrecacheModel_Post(char *s) {
darope@0
    50
	ENGINE_TRACE(pfnPrecacheModel, P_POST, (""));
darope@0
    51
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
    52
}
darope@0
    53
int PrecacheSound_Post(char *s) {
darope@0
    54
	ENGINE_TRACE(pfnPrecacheSound, P_POST, (""));
darope@0
    55
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
    56
}
darope@0
    57
void SetModel_Post(edict_t *e, const char *m) {
darope@0
    58
	ENGINE_TRACE(pfnSetModel, P_POST, (""));
darope@0
    59
	RETURN_META(MRES_IGNORED);
darope@0
    60
}
darope@0
    61
int ModelIndex_Post(const char *m) {
darope@0
    62
	ENGINE_TRACE(pfnModelIndex, P_POST, (""));
darope@0
    63
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
    64
}
darope@0
    65
int ModelFrames_Post(int modelIndex) {
darope@0
    66
	ENGINE_TRACE(pfnModelFrames, P_POST, (""));
darope@0
    67
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
    68
}
darope@0
    69
darope@0
    70
void SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax) {
darope@0
    71
	ENGINE_TRACE(pfnSetSize, P_POST, (""));
darope@0
    72
	RETURN_META(MRES_IGNORED);
darope@0
    73
}
darope@0
    74
void ChangeLevel_Post(char *s1, char *s2) {
darope@0
    75
	// trace output in Pre
darope@0
    76
	ENGINE_TRACE(pfnChangeLevel, P_POST, (""));
darope@0
    77
	RETURN_META(MRES_IGNORED);
darope@0
    78
}
darope@0
    79
void GetSpawnParms_Post(edict_t *ent) {
darope@0
    80
	ENGINE_TRACE(pfnGetSpawnParms, P_POST, (""));
darope@0
    81
	RETURN_META(MRES_IGNORED);
darope@0
    82
}
darope@0
    83
void SaveSpawnParms_Post(edict_t *ent) {
darope@0
    84
	ENGINE_TRACE(pfnSaveSpawnParms, P_POST, (""));
darope@0
    85
	RETURN_META(MRES_IGNORED);
darope@0
    86
}
darope@0
    87
darope@0
    88
float VecToYaw_Post(const float *rgflVector) {
darope@0
    89
	ENGINE_TRACE(pfnVecToYaw, P_POST, (""));
darope@0
    90
	RETURN_META_VALUE(MRES_IGNORED, 0.0);
darope@0
    91
}
darope@0
    92
void VecToAngles_Post(const float *rgflVectorIn, float *rgflVectorOut) {
darope@0
    93
	ENGINE_TRACE(pfnVecToAngles, P_POST, (""));
darope@0
    94
	RETURN_META(MRES_IGNORED);
darope@0
    95
}
darope@0
    96
void MoveToOrigin_Post(edict_t *ent, const float *pflGoal, float dist, int iMoveType) {
darope@0
    97
	ENGINE_TRACE(pfnMoveToOrigin, P_POST, (""));
darope@0
    98
	RETURN_META(MRES_IGNORED);
darope@0
    99
}
darope@0
   100
void ChangeYaw_Post(edict_t *ent) {
darope@0
   101
	ENGINE_TRACE(pfnChangeYaw, P_POST, (""));
darope@0
   102
	RETURN_META(MRES_IGNORED);
darope@0
   103
}
darope@0
   104
void ChangePitch_Post(edict_t *ent) {
darope@0
   105
	ENGINE_TRACE(pfnChangePitch, P_POST, (""));
darope@0
   106
	RETURN_META(MRES_IGNORED);
darope@0
   107
}
darope@0
   108
darope@0
   109
edict_t *FindEntityByString_Post(edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue) {
darope@0
   110
	edict_t *ed=META_RESULT_ORIG_RET(edict_t *);
darope@0
   111
	ENGINE_TRACE(pfnFindEntityByString, P_POST, ("classname=%s netname=%s", 
darope@0
   112
				ed ? STRING(ed->v.classname) : "nil",
darope@0
   113
				ed ? STRING(ed->v.netname) : "nil"));
darope@0
   114
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   115
}
darope@0
   116
int GetEntityIllum_Post(edict_t *pEnt) {
darope@0
   117
	ENGINE_TRACE(pfnGetEntityIllum, P_POST, (""));
darope@0
   118
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   119
}
darope@0
   120
edict_t *FindEntityInSphere_Post(edict_t *pEdictStartSearchAfter, const float *org, float rad) {
darope@0
   121
	edict_t *ret;
darope@0
   122
	ret=META_RESULT_ORIG_RET(edict_t *);
darope@0
   123
	ENGINE_TRACE(pfnFindEntityInSphere, P_POST, ("previous=%s current=%s", 
darope@0
   124
				pEdictStartSearchAfter ? STRING(pEdictStartSearchAfter->v.classname) : "nil",
darope@0
   125
				ret ? STRING(ret->v.classname) : "nil"));
darope@0
   126
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   127
}
darope@0
   128
edict_t *FindClientInPVS_Post(edict_t *pEdict) {
darope@0
   129
	ENGINE_TRACE(pfnFindClientInPVS, P_POST, (""));
darope@0
   130
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   131
}
darope@0
   132
edict_t *EntitiesInPVS_Post(edict_t *pplayer) {
darope@0
   133
	ENGINE_TRACE(pfnEntitiesInPVS, P_POST, (""));
darope@0
   134
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   135
}
darope@0
   136
darope@0
   137
void MakeVectors_Post(const float *rgflVector) {
darope@0
   138
	ENGINE_TRACE(pfnMakeVectors, P_POST, (""));
darope@0
   139
	RETURN_META(MRES_IGNORED);
darope@0
   140
}
darope@0
   141
void AngleVectors_Post(const float *rgflVector, float *forward, float *right, float *up) {
darope@0
   142
	ENGINE_TRACE(pfnAngleVectors, P_POST, (""));
darope@0
   143
	RETURN_META(MRES_IGNORED);
darope@0
   144
}
darope@0
   145
darope@0
   146
edict_t *CreateEntity_Post(void) {
darope@0
   147
	ENGINE_TRACE(pfnCreateEntity, P_POST, (""));
darope@0
   148
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   149
}
darope@0
   150
void RemoveEntity_Post(edict_t *e) {
darope@0
   151
	ENGINE_TRACE(pfnRemoveEntity, P_POST, (""));
darope@0
   152
	RETURN_META(MRES_IGNORED);
darope@0
   153
}
darope@0
   154
edict_t *CreateNamedEntity_Post(int className) {
darope@0
   155
	edict_t *ret;
darope@0
   156
	ret=META_RESULT_ORIG_RET(edict_t *);
darope@0
   157
	ENGINE_TRACE(pfnCreateNamedEntity, P_POST, ("created=%s", 
darope@0
   158
				ret ? STRING(ret->v.classname) : "nil"));
darope@0
   159
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   160
}
darope@0
   161
darope@0
   162
void MakeStatic_Post(edict_t *ent) {
darope@0
   163
	ENGINE_TRACE(pfnMakeStatic, P_POST, (""));
darope@0
   164
	RETURN_META(MRES_IGNORED);
darope@0
   165
}
darope@0
   166
int EntIsOnFloor_Post(edict_t *e) {
darope@0
   167
	ENGINE_TRACE(pfnEntIsOnFloor, P_POST, (""));
darope@0
   168
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   169
}
darope@0
   170
int DropToFloor_Post(edict_t *e) {
darope@0
   171
	ENGINE_TRACE(pfnDropToFloor, P_POST, (""));
darope@0
   172
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   173
}
darope@0
   174
darope@0
   175
int WalkMove_Post(edict_t *ent, float yaw, float dist, int iMode) {
darope@0
   176
	ENGINE_TRACE(pfnWalkMove, P_POST, (""));
darope@0
   177
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   178
}
darope@0
   179
void SetOrigin_Post(edict_t *e, const float *rgflOrigin) {
darope@0
   180
	ENGINE_TRACE(pfnSetOrigin, P_POST, (""));
darope@0
   181
	RETURN_META(MRES_IGNORED);
darope@0
   182
}
darope@0
   183
darope@0
   184
void EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch) {
darope@0
   185
	ENGINE_TRACE(pfnEmitSound, P_POST, (""));
darope@0
   186
	RETURN_META(MRES_IGNORED);
darope@0
   187
}
darope@0
   188
void EmitAmbientSound_Post(edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch) {
darope@0
   189
	ENGINE_TRACE(pfnEmitAmbientSound, P_POST, (""));
darope@0
   190
	RETURN_META(MRES_IGNORED);
darope@0
   191
}
darope@0
   192
darope@0
   193
void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr) {
darope@0
   194
	ENGINE_TRACE(pfnTraceLine, P_POST, (""));
darope@0
   195
	RETURN_META(MRES_IGNORED);
darope@0
   196
}
darope@0
   197
void TraceToss_Post(edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr) {
darope@0
   198
	ENGINE_TRACE(pfnTraceToss, P_POST, (""));
darope@0
   199
	RETURN_META(MRES_IGNORED);
darope@0
   200
}
darope@0
   201
int TraceMonsterHull_Post(edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr) {
darope@0
   202
	ENGINE_TRACE(pfnTraceMonsterHull, P_POST, (""));
darope@0
   203
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   204
}
darope@0
   205
void TraceHull_Post(const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr) {
darope@0
   206
	ENGINE_TRACE(pfnTraceHull, P_POST, (""));
darope@0
   207
	RETURN_META(MRES_IGNORED);
darope@0
   208
}
darope@0
   209
void TraceModel_Post(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr) {
darope@0
   210
	ENGINE_TRACE(pfnTraceModel, P_POST, (""));
darope@0
   211
	RETURN_META(MRES_IGNORED);
darope@0
   212
}
darope@0
   213
const char *TraceTexture_Post(edict_t *pTextureEntity, const float *v1, const float *v2 ) {
darope@0
   214
	ENGINE_TRACE(pfnTraceTexture, P_POST, (""));
darope@0
   215
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   216
}
darope@0
   217
void TraceSphere_Post(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr) {
darope@0
   218
	ENGINE_TRACE(pfnTraceSphere, P_POST, (""));
darope@0
   219
	RETURN_META(MRES_IGNORED);
darope@0
   220
}
darope@0
   221
void GetAimVector_Post(edict_t *ent, float speed, float *rgflReturn) {
darope@0
   222
	ENGINE_TRACE(pfnGetAimVector, P_POST, (""));
darope@0
   223
	RETURN_META(MRES_IGNORED);
darope@0
   224
}
darope@0
   225
darope@0
   226
void ServerCommand_Post(char *str) {
darope@0
   227
	// trace output in Pre
darope@0
   228
	ENGINE_TRACE(pfnServerCommand, P_POST, (""));
darope@0
   229
	RETURN_META(MRES_IGNORED);
darope@0
   230
}
darope@0
   231
void ServerExecute_Post(void) {
darope@0
   232
	ENGINE_TRACE(pfnServerExecute, P_POST, (""));
darope@0
   233
	RETURN_META(MRES_IGNORED);
darope@0
   234
}
darope@0
   235
void engClientCommand_Post(edict_t *pEdict, char *szFmt, ...) {
darope@0
   236
	// trace output in Pre
darope@0
   237
	ENGINE_TRACE(pfnClientCommand, P_POST, (""));
darope@0
   238
	RETURN_META(MRES_IGNORED);
darope@0
   239
}
darope@0
   240
darope@0
   241
void ParticleEffect_Post(const float *org, const float *dir, float color, float count) {
darope@0
   242
	ENGINE_TRACE(pfnParticleEffect, P_POST, (""));
darope@0
   243
	RETURN_META(MRES_IGNORED);
darope@0
   244
}
darope@0
   245
void LightStyle_Post(int style, char *val) {
darope@0
   246
	ENGINE_TRACE(pfnLightStyle, P_POST, (""));
darope@0
   247
	RETURN_META(MRES_IGNORED);
darope@0
   248
}
darope@0
   249
int DecalIndex_Post(const char *name) {
darope@0
   250
	ENGINE_TRACE(pfnDecalIndex, P_POST, (""));
darope@0
   251
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   252
}
darope@0
   253
int PointContents_Post(const float *rgflVector) {
darope@0
   254
	ENGINE_TRACE(pfnPointContents, P_POST, (""));
darope@0
   255
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   256
}
darope@0
   257
darope@0
   258
void MessageBegin_Post(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) {
darope@0
   259
	if(msg_type > 64)
darope@0
   260
		ENGINE_TRACE(pfnMessageBegin, P_POST, (""));
darope@0
   261
	RETURN_META(MRES_IGNORED);
darope@0
   262
}
darope@0
   263
void MessageEnd_Post(void) {
darope@0
   264
	ENGINE_TRACE(pfnMessageEnd, P_POST, (""));
darope@0
   265
	RETURN_META(MRES_IGNORED);
darope@0
   266
}
darope@0
   267
darope@0
   268
void WriteByte_Post(int iValue) {
darope@0
   269
	ENGINE_TRACE(pfnWriteByte, P_POST, (""));
darope@0
   270
	RETURN_META(MRES_IGNORED);
darope@0
   271
}
darope@0
   272
void WriteChar_Post(int iValue) {
darope@0
   273
	ENGINE_TRACE(pfnWriteChar, P_POST, (""));
darope@0
   274
	RETURN_META(MRES_IGNORED);
darope@0
   275
}
darope@0
   276
void WriteShort_Post(int iValue) {
darope@0
   277
	ENGINE_TRACE(pfnWriteShort, P_POST, (""));
darope@0
   278
	RETURN_META(MRES_IGNORED);
darope@0
   279
}
darope@0
   280
void WriteLong_Post(int iValue) {
darope@0
   281
	ENGINE_TRACE(pfnWriteLong, P_POST, (""));
darope@0
   282
	RETURN_META(MRES_IGNORED);
darope@0
   283
}
darope@0
   284
void WriteAngle_Post(float flValue) {
darope@0
   285
	ENGINE_TRACE(pfnWriteAngle, P_POST, (""));
darope@0
   286
	RETURN_META(MRES_IGNORED);
darope@0
   287
}
darope@0
   288
void WriteCoord_Post(float flValue) {
darope@0
   289
	ENGINE_TRACE(pfnWriteCoord, P_POST, (""));
darope@0
   290
	RETURN_META(MRES_IGNORED);
darope@0
   291
}
darope@0
   292
void WriteString_Post(const char *sz) {
darope@0
   293
	// trace output in Pre
darope@0
   294
	ENGINE_TRACE(pfnWriteString, P_POST, (""));
darope@0
   295
	RETURN_META(MRES_IGNORED);
darope@0
   296
}
darope@0
   297
void WriteEntity_Post(int iValue) {
darope@0
   298
	ENGINE_TRACE(pfnWriteEntity, P_POST, (""));
darope@0
   299
	RETURN_META(MRES_IGNORED);
darope@0
   300
}
darope@0
   301
darope@0
   302
void CVarRegister_Post(cvar_t *pCvar) {
darope@0
   303
	// trace output in Pre
darope@0
   304
	ENGINE_TRACE(pfnCVarRegister, P_POST, (""));
darope@0
   305
	RETURN_META(MRES_IGNORED);
darope@0
   306
}
darope@0
   307
float CVarGetFloat_Post(const char *szVarName) {
darope@0
   308
	ENGINE_TRACE(pfnCVarGetFloat, P_POST, ("cvar=%s val=%f",
darope@0
   309
				szVarName, META_RESULT_ORIG_RET(float)));
darope@0
   310
	RETURN_META_VALUE(MRES_IGNORED, 0.0);
darope@0
   311
}
darope@0
   312
const char *CVarGetString_Post(const char *szVarName) {
darope@0
   313
	const char *val=META_RESULT_ORIG_RET(const char *);
darope@0
   314
	ENGINE_TRACE(pfnCVarGetString, P_POST, ("cvar=%s val=%s",
darope@0
   315
				szVarName,
darope@0
   316
				val ? val : "nil"));
darope@0
   317
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   318
}
darope@0
   319
void CVarSetFloat_Post(const char *szVarName, float flValue) {
darope@0
   320
	// trace output in Pre
darope@0
   321
	ENGINE_TRACE(pfnCVarSetFloat, P_POST, (""));
darope@0
   322
	RETURN_META(MRES_IGNORED);
darope@0
   323
}
darope@0
   324
void CVarSetString_Post(const char *szVarName, const char *szValue) {
darope@0
   325
	// trace output in Pre
darope@0
   326
	ENGINE_TRACE(pfnCVarSetString, P_POST, (""));
darope@0
   327
	RETURN_META(MRES_IGNORED);
darope@0
   328
}
darope@0
   329
darope@0
   330
void AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...) {
darope@0
   331
	// trace output in Pre
darope@0
   332
	ENGINE_TRACE(pfnAlertMessage, P_POST, (""));
darope@0
   333
	RETURN_META(MRES_IGNORED);
darope@0
   334
}
darope@0
   335
void EngineFprintf_Post(FILE *pfile, char *szFmt, ...) {
darope@0
   336
	// trace output in Pre
darope@0
   337
	ENGINE_TRACE(pfnEngineFprintf, P_POST, (""));
darope@0
   338
	RETURN_META(MRES_IGNORED);
darope@0
   339
}
darope@0
   340
darope@0
   341
void *PvAllocEntPrivateData_Post(edict_t *pEdict, long cb) {
darope@0
   342
	ENGINE_TRACE(pfnPvAllocEntPrivateData, P_POST, (""));
darope@0
   343
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   344
}
darope@0
   345
void *PvEntPrivateData_Post(edict_t *pEdict) {
darope@0
   346
	ENGINE_TRACE(pfnPvEntPrivateData, P_POST, (""));
darope@0
   347
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   348
}
darope@0
   349
void FreeEntPrivateData_Post(edict_t *pEdict) {
darope@0
   350
	ENGINE_TRACE(pfnFreeEntPrivateData, P_POST, (""));
darope@0
   351
	RETURN_META(MRES_IGNORED);
darope@0
   352
}
darope@0
   353
darope@0
   354
const char *SzFromIndex_Post(int iString) {
darope@0
   355
	ENGINE_TRACE(pfnSzFromIndex, P_POST, (""));
darope@0
   356
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   357
}
darope@0
   358
int AllocString_Post(const char *szValue) {
darope@0
   359
	ENGINE_TRACE(pfnAllocString, P_POST, ("str=%s alloc=%d",
darope@0
   360
				szValue, META_RESULT_ORIG_RET(int)));
darope@0
   361
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   362
}
darope@0
   363
darope@0
   364
struct entvars_s *GetVarsOfEnt_Post(edict_t *pEdict) {
darope@0
   365
	ENGINE_TRACE(pfnGetVarsOfEnt, P_POST, (""));
darope@0
   366
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   367
}
darope@0
   368
edict_t *PEntityOfEntOffset_Post(int iEntOffset) {
darope@0
   369
	ENGINE_TRACE(pfnPEntityOfEntOffset, P_POST, (""));
darope@0
   370
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   371
}
darope@0
   372
int EntOffsetOfPEntity_Post(const edict_t *pEdict) {
darope@0
   373
	ENGINE_TRACE(pfnEntOffsetOfPEntity, P_POST, ("offset=%d", 
darope@0
   374
				META_RESULT_ORIG_RET(int)));
darope@0
   375
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   376
}
darope@0
   377
int IndexOfEdict_Post(const edict_t *pEdict) {
darope@0
   378
	ENGINE_TRACE(pfnIndexOfEdict, P_POST, (""));
darope@0
   379
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   380
}
darope@0
   381
edict_t *PEntityOfEntIndex_Post(int iEntIndex) {
darope@0
   382
	edict_t *ed=META_RESULT_ORIG_RET(edict_t *);
darope@0
   383
	ENGINE_TRACE(pfnPEntityOfEntIndex, P_POST, ("classname=%s netname=%s", 
darope@0
   384
				ed ? STRING(ed->v.classname) : "nil",
darope@0
   385
				ed ? STRING(ed->v.netname) : "nil"));
darope@0
   386
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   387
}
darope@0
   388
edict_t *FindEntityByVars_Post(struct entvars_s *pvars) {
darope@0
   389
	ENGINE_TRACE(pfnFindEntityByVars, P_POST, (""));
darope@0
   390
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   391
}
darope@0
   392
void *GetModelPtr_Post(edict_t *pEdict) {
darope@0
   393
	ENGINE_TRACE(pfnGetModelPtr, P_POST, (""));
darope@0
   394
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   395
}
darope@0
   396
darope@0
   397
int RegUserMsg_Post(const char *pszName, int iSize) {
darope@0
   398
	int ret;
darope@0
   399
	ENGINE_TRACE(pfnRegUserMsg, P_POST, ("msg=%s, id=%d, size=%d", 
darope@0
   400
				pszName, META_RESULT_ORIG_RET(int), iSize));
darope@0
   401
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   402
}
darope@0
   403
darope@0
   404
void AnimationAutomove_Post(const edict_t *pEdict, float flTime) {
darope@0
   405
	ENGINE_TRACE(pfnAnimationAutomove, P_POST, (""));
darope@0
   406
	RETURN_META(MRES_IGNORED);
darope@0
   407
}
darope@0
   408
void GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles ) {
darope@0
   409
	ENGINE_TRACE(pfnGetBonePosition, P_POST, (""));
darope@0
   410
	RETURN_META(MRES_IGNORED);
darope@0
   411
}
darope@0
   412
darope@0
   413
unsigned long FunctionFromName_Post( const char *pName ) {
darope@0
   414
	ENGINE_TRACE(pfnFunctionFromName, P_POST, (""));
darope@0
   415
	RETURN_META_VALUE(MRES_IGNORED, 0UL);
darope@0
   416
}
darope@0
   417
const char *NameForFunction_Post( unsigned long function ) {
darope@0
   418
	ENGINE_TRACE(pfnNameForFunction, P_POST, (""));
darope@0
   419
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   420
}
darope@0
   421
darope@0
   422
//! JOHN: engine callbacks so game DLL can print messages to individual clients
darope@0
   423
void ClientPrintf_Post( edict_t *pEdict, PRINT_TYPE ptype, const char *szMsg ) {
darope@0
   424
	// trace output in Pre
darope@0
   425
	ENGINE_TRACE(pfnClientPrintf, P_POST, (""));
darope@0
   426
	RETURN_META(MRES_IGNORED);
darope@0
   427
}
darope@0
   428
void ServerPrint_Post( const char *szMsg ) {
darope@0
   429
	// trace output in Pre
darope@0
   430
	ENGINE_TRACE(pfnServerPrint, P_POST, (""));
darope@0
   431
	RETURN_META(MRES_IGNORED);
darope@0
   432
}
darope@0
   433
darope@0
   434
//! these 3 added so game DLL can easily access client 'cmd' strings
darope@0
   435
const char *Cmd_Args_Post( void ) {
darope@0
   436
	ENGINE_TRACE(pfnCmd_Args, P_POST, ("args=%s", 
darope@0
   437
				META_RESULT_ORIG_RET(char *)));
darope@0
   438
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   439
}
darope@0
   440
const char *Cmd_Argv_Post( int argc ) {
darope@0
   441
	ENGINE_TRACE(pfnCmd_Argv, P_POST, ("arg=%s", 
darope@0
   442
				META_RESULT_ORIG_RET(char *)));
darope@0
   443
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   444
}
darope@0
   445
int Cmd_Argc_Post( void ) {
darope@0
   446
	ENGINE_TRACE(pfnCmd_Argc, P_POST, ("argc=%d", 
darope@0
   447
				META_RESULT_ORIG_RET(int)));
darope@0
   448
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   449
}
darope@0
   450
darope@0
   451
void GetAttachment_Post(const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles ) {
darope@0
   452
	ENGINE_TRACE(pfnGetAttachment, P_POST, (""));
darope@0
   453
	RETURN_META(MRES_IGNORED);
darope@0
   454
}
darope@0
   455
darope@0
   456
void CRC32_Init_Post(CRC32_t *pulCRC) {
darope@0
   457
	ENGINE_TRACE(pfnCRC32_Init, P_POST, (""));
darope@0
   458
	RETURN_META(MRES_IGNORED);
darope@0
   459
}
darope@0
   460
void CRC32_ProcessBuffer_Post(CRC32_t *pulCRC, void *p, int len) {
darope@0
   461
	ENGINE_TRACE(pfnCRC32_ProcessBuffer, P_POST, (""));
darope@0
   462
	RETURN_META(MRES_IGNORED);
darope@0
   463
}
darope@0
   464
void CRC32_ProcessByte_Post(CRC32_t *pulCRC, unsigned char ch) {
darope@0
   465
	ENGINE_TRACE(pfnCRC32_ProcessByte, P_POST, (""));
darope@0
   466
	RETURN_META(MRES_IGNORED);
darope@0
   467
}
darope@0
   468
CRC32_t CRC32_Final_Post(CRC32_t pulCRC) {
darope@0
   469
	ENGINE_TRACE(pfnCRC32_Final, P_POST, (""));
darope@0
   470
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   471
}
darope@0
   472
darope@0
   473
long RandomLong_Post(long lLow, long lHigh) {
darope@0
   474
	ENGINE_TRACE(pfnRandomLong, P_POST, ("random=%ld", 
darope@0
   475
				META_RESULT_ORIG_RET(long)));
darope@0
   476
	RETURN_META_VALUE(MRES_IGNORED, 0L);
darope@0
   477
}
darope@0
   478
float RandomFloat_Post(float flLow, float flHigh) {
darope@0
   479
	ENGINE_TRACE(pfnRandomFloat, P_POST, ("random=%f", 
darope@0
   480
				META_RESULT_ORIG_RET(float)));
darope@0
   481
	RETURN_META_VALUE(MRES_IGNORED, 0.0);
darope@0
   482
}
darope@0
   483
darope@0
   484
void SetView_Post(const edict_t *pClient, const edict_t *pViewent ) {
darope@0
   485
	ENGINE_TRACE(pfnSetView, P_POST, (""));
darope@0
   486
	RETURN_META(MRES_IGNORED);
darope@0
   487
}
darope@0
   488
float Time_Post( void ) {
darope@0
   489
	ENGINE_TRACE(pfnTime, P_POST, ("time=%f", 
darope@0
   490
				META_RESULT_ORIG_RET(float)));
darope@0
   491
	RETURN_META_VALUE(MRES_IGNORED, 0.0);
darope@0
   492
}
darope@0
   493
void CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw) {
darope@0
   494
	ENGINE_TRACE(pfnCrosshairAngle, P_POST, (""));
darope@0
   495
	RETURN_META(MRES_IGNORED);
darope@0
   496
}
darope@0
   497
darope@0
   498
byte *LoadFileForMe_Post(char *filename, int *pLength) {
darope@0
   499
	ENGINE_TRACE(pfnLoadFileForMe, P_POST, (""));
darope@0
   500
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   501
}
darope@0
   502
void FreeFile_Post(void *buffer) {
darope@0
   503
	ENGINE_TRACE(pfnFreeFile, P_POST, (""));
darope@0
   504
	RETURN_META(MRES_IGNORED);
darope@0
   505
}
darope@0
   506
darope@0
   507
//! trigger_endsection
darope@0
   508
void EndSection_Post(const char *pszSectionName) {
darope@0
   509
	ENGINE_TRACE(pfnEndSection, P_POST, (""));
darope@0
   510
	RETURN_META(MRES_IGNORED);
darope@0
   511
}
darope@0
   512
int CompareFileTime_Post(char *filename1, char *filename2, int *iCompare) {
darope@0
   513
	ENGINE_TRACE(pfnCompareFileTime, P_POST, (""));
darope@0
   514
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   515
}
darope@0
   516
void GetGameDir_Post(char *szGetGameDir) {
darope@0
   517
	ENGINE_TRACE(pfnGetGameDir, P_POST, ("gamedir=%s", szGetGameDir));
darope@0
   518
	RETURN_META(MRES_IGNORED);
darope@0
   519
}
darope@0
   520
void Cvar_RegisterVariable_Post(cvar_t *variable) {
darope@0
   521
	// trace output in Pre
darope@0
   522
	ENGINE_TRACE(pfnCvar_RegisterVariable, P_POST, (""));
darope@0
   523
	RETURN_META(MRES_IGNORED);
darope@0
   524
}
darope@0
   525
void FadeClientVolume_Post(const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds) {
darope@0
   526
	ENGINE_TRACE(pfnFadeClientVolume, P_POST, (""));
darope@0
   527
	RETURN_META(MRES_IGNORED);
darope@0
   528
}
darope@0
   529
void SetClientMaxspeed_Post(const edict_t *pEdict, float fNewMaxspeed) {
darope@0
   530
	ENGINE_TRACE(pfnSetClientMaxspeed, P_POST, (""));
darope@0
   531
	RETURN_META(MRES_IGNORED);
darope@0
   532
}
darope@0
   533
//! returns NULL if fake client can't be created
darope@0
   534
edict_t * CreateFakeClient_Post(const char *netname) {
darope@0
   535
	ENGINE_TRACE(pfnCreateFakeClient, P_POST, (""));
darope@0
   536
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   537
}
darope@0
   538
void RunPlayerMove_Post(edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec ) {
darope@0
   539
	ENGINE_TRACE(pfnRunPlayerMove, P_POST, (""));
darope@0
   540
	RETURN_META(MRES_IGNORED);
darope@0
   541
}
darope@0
   542
int NumberOfEntities_Post(void) {
darope@0
   543
	ENGINE_TRACE(pfnNumberOfEntities, P_POST, ("num=%d", 
darope@0
   544
				META_RESULT_ORIG_RET(int)));
darope@0
   545
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   546
}
darope@0
   547
darope@0
   548
//! passing in NULL gets the serverinfo
darope@0
   549
char *GetInfoKeyBuffer_Post(edict_t *e) {
darope@0
   550
	ENGINE_TRACE(pfnGetInfoKeyBuffer, P_POST, (""));
darope@0
   551
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   552
}
darope@0
   553
char *InfoKeyValue_Post(char *infobuffer, char *key) {
darope@0
   554
	ENGINE_TRACE(pfnInfoKeyValue, P_POST, ("value=%s", 
darope@0
   555
				META_RESULT_ORIG_RET(char *)));
darope@0
   556
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   557
}
darope@0
   558
void SetKeyValue_Post(char *infobuffer, char *key, char *value) {
darope@0
   559
	ENGINE_TRACE(pfnSetKeyValue, P_POST, (""));
darope@0
   560
	RETURN_META(MRES_IGNORED);
darope@0
   561
}
darope@0
   562
void SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value) {
darope@0
   563
	ENGINE_TRACE(pfnSetClientKeyValue, P_POST, (""));
darope@0
   564
	RETURN_META(MRES_IGNORED);
darope@0
   565
}
darope@0
   566
darope@0
   567
int IsMapValid_Post(char *filename) {
darope@0
   568
	ENGINE_TRACE(pfnIsMapValid, P_POST, ("file=%s, val=%d",
darope@0
   569
				filename, META_RESULT_ORIG_RET(int)));
darope@0
   570
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   571
}
darope@0
   572
void StaticDecal_Post( const float *origin, int decalIndex, int entityIndex, int modelIndex ) {
darope@0
   573
	ENGINE_TRACE(pfnStaticDecal, P_POST, (""));
darope@0
   574
	RETURN_META(MRES_IGNORED);
darope@0
   575
}
darope@0
   576
int PrecacheGeneric_Post(char *s) {
darope@0
   577
	ENGINE_TRACE(pfnPrecacheGeneric, P_POST, (""));
darope@0
   578
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   579
}
darope@0
   580
//! 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
   581
int GetPlayerUserId_Post(edict_t *e ) {
darope@0
   582
	edict_t *ed = e;
darope@0
   583
	int userid=META_RESULT_ORIG_RET(int);
darope@0
   584
	ENGINE_TRACE(pfnGetPlayerUserId, P_POST, ("netname=%s userid=%d",
darope@0
   585
				ed ? STRING(ed->v.netname) : "nil",
darope@0
   586
				userid));
darope@0
   587
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   588
}
darope@0
   589
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
   590
{
darope@0
   591
	ENGINE_TRACE(pfnBuildSoundMsg, P_POST, ("sample=%s", sample));
darope@0
   592
	RETURN_META(MRES_IGNORED);
darope@0
   593
}
darope@0
   594
//! is this a dedicated server?
darope@0
   595
int IsDedicatedServer_Post(void) {
darope@0
   596
	ENGINE_TRACE(pfnIsDedicatedServer, P_POST, ("val=%d",
darope@0
   597
				META_RESULT_ORIG_RET(int)));
darope@0
   598
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   599
}
darope@0
   600
cvar_t *CVarGetPointer_Post(const char *szVarName) {
darope@0
   601
	// output in Pre
darope@0
   602
	ENGINE_TRACE(pfnCVarGetPointer, P_POST, (""));
darope@0
   603
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   604
}
darope@0
   605
//! 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
   606
unsigned int GetPlayerWONId_Post(edict_t *e) {
darope@0
   607
	edict_t *ed = e;
darope@0
   608
	unsigned int wonid=META_RESULT_ORIG_RET(unsigned int);
darope@0
   609
	ENGINE_TRACE(pfnGetPlayerWONId, P_POST, ("netname=%s wonid=%u",
darope@0
   610
				ed ? STRING(ed->v.netname) : "nil",
darope@0
   611
				wonid));
darope@0
   612
	RETURN_META_VALUE(MRES_IGNORED, 0U);
darope@0
   613
}
darope@0
   614
darope@0
   615
//! YWB 8/1/99 TFF Physics additions
darope@0
   616
void Info_RemoveKey_Post( char *s, const char *key ) {
darope@0
   617
	ENGINE_TRACE(pfnInfo_RemoveKey, P_POST, (""));
darope@0
   618
	RETURN_META(MRES_IGNORED);
darope@0
   619
}
darope@0
   620
const char *GetPhysicsKeyValue_Post( const edict_t *pClient, const char *key ) {
darope@0
   621
	ENGINE_TRACE(pfnGetPhysicsKeyValue, P_POST, (""));
darope@0
   622
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   623
}
darope@0
   624
void SetPhysicsKeyValue_Post( const edict_t *pClient, const char *key, const char *value ) {
darope@0
   625
	ENGINE_TRACE(pfnSetPhysicsKeyValue, P_POST, (""));
darope@0
   626
	RETURN_META(MRES_IGNORED);
darope@0
   627
}
darope@0
   628
const char *GetPhysicsInfoString_Post( const edict_t *pClient ) {
darope@0
   629
	ENGINE_TRACE(pfnGetPhysicsInfoString, P_POST, (""));
darope@0
   630
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   631
}
darope@0
   632
unsigned short PrecacheEvent_Post( int type, const char *psz ) {
darope@0
   633
	ENGINE_TRACE(pfnPrecacheEvent, P_POST, (""));
darope@0
   634
	RETURN_META_VALUE(MRES_IGNORED, 0U);
darope@0
   635
}
darope@0
   636
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
   637
{
darope@0
   638
	ENGINE_TRACE(pfnPlaybackEvent, P_POST, (""));
darope@0
   639
	RETURN_META(MRES_IGNORED);
darope@0
   640
}
darope@0
   641
darope@0
   642
unsigned char *SetFatPVS_Post( float *org ) {
darope@0
   643
	ENGINE_TRACE(pfnSetFatPVS, P_POST, (""));
darope@0
   644
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   645
}
darope@0
   646
unsigned char *SetFatPAS_Post( float *org ) {
darope@0
   647
	ENGINE_TRACE(pfnSetFatPAS, P_POST, (""));
darope@0
   648
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   649
}
darope@0
   650
darope@0
   651
int CheckVisibility_Post( const edict_t *entity, unsigned char *pset ) {
darope@0
   652
	ENGINE_TRACE(pfnCheckVisibility, P_POST, (""));
darope@0
   653
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   654
}
darope@0
   655
darope@0
   656
void DeltaSetField_Post( struct delta_s *pFields, const char *fieldname ) {
darope@0
   657
	ENGINE_TRACE(pfnDeltaSetField, P_POST, (""));
darope@0
   658
	RETURN_META(MRES_IGNORED);
darope@0
   659
}
darope@0
   660
void DeltaUnsetField_Post( struct delta_s *pFields, const char *fieldname ) {
darope@0
   661
	ENGINE_TRACE(pfnDeltaUnsetField, P_POST, (""));
darope@0
   662
	RETURN_META(MRES_IGNORED);
darope@0
   663
}
darope@0
   664
void DeltaAddEncoder_Post( char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ) {
darope@0
   665
	ENGINE_TRACE(pfnDeltaAddEncoder, P_POST, (""));
darope@0
   666
	RETURN_META(MRES_IGNORED);
darope@0
   667
}
darope@0
   668
int GetCurrentPlayer_Post( void ) {
darope@0
   669
	ENGINE_TRACE(pfnGetCurrentPlayer, P_POST, ("val=%d",
darope@0
   670
				META_RESULT_ORIG_RET(int)));
darope@0
   671
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   672
}
darope@0
   673
int CanSkipPlayer_Post( const edict_t *player ) {
darope@0
   674
	ENGINE_TRACE(pfnCanSkipPlayer, P_POST, (""));
darope@0
   675
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   676
}
darope@0
   677
int DeltaFindField_Post( struct delta_s *pFields, const char *fieldname ) {
darope@0
   678
	ENGINE_TRACE(pfnDeltaFindField, P_POST, (""));
darope@0
   679
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   680
}
darope@0
   681
void DeltaSetFieldByIndex_Post( struct delta_s *pFields, int fieldNumber ) {
darope@0
   682
	ENGINE_TRACE(pfnDeltaSetFieldByIndex, P_POST, (""));
darope@0
   683
	RETURN_META(MRES_IGNORED);
darope@0
   684
}
darope@0
   685
void DeltaUnsetFieldByIndex_Post( struct delta_s *pFields, int fieldNumber ) {
darope@0
   686
	ENGINE_TRACE(pfnDeltaUnsetFieldByIndex, P_POST, (""));
darope@0
   687
	RETURN_META(MRES_IGNORED);
darope@0
   688
}
darope@0
   689
darope@0
   690
void SetGroupMask_Post( int mask, int op ) {
darope@0
   691
	ENGINE_TRACE(pfnSetGroupMask, P_POST, (""));
darope@0
   692
	RETURN_META(MRES_IGNORED);
darope@0
   693
}
darope@0
   694
darope@0
   695
int engCreateInstancedBaseline_Post( int classname, struct entity_state_s *baseline ) {
darope@0
   696
	ENGINE_TRACE(pfnCreateInstancedBaseline, P_POST, (""));
darope@0
   697
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   698
}
darope@0
   699
void Cvar_DirectSet_Post( struct cvar_s *var, char *value ) {
darope@0
   700
	ENGINE_TRACE(pfnCvar_DirectSet, P_POST, (""));
darope@0
   701
	RETURN_META(MRES_IGNORED);
darope@0
   702
}
darope@0
   703
darope@0
   704
//! Forces the client and server to be running with the same version of the specified file
darope@0
   705
//!( e.g., a player model ).
darope@0
   706
//! Calling this has no effect in single player
darope@0
   707
void ForceUnmodified_Post( FORCE_TYPE type, float *mins, float *maxs, const char *filename ) {
darope@0
   708
	// trace output in Pre
darope@0
   709
	ENGINE_TRACE(pfnForceUnmodified, P_POST, (""));
darope@0
   710
	RETURN_META(MRES_IGNORED);
darope@0
   711
}
darope@0
   712
darope@0
   713
void GetPlayerStats_Post( const edict_t *pClient, int *ping, int *packet_loss ) {
darope@0
   714
	const edict_t *ed=pClient;
darope@0
   715
	ENGINE_TRACE(pfnGetPlayerStats, P_POST, 
darope@0
   716
			("netname=%s ping=%d packet_loss=%d",
darope@0
   717
				ed ? STRING(ed->v.netname) : "nil",
darope@0
   718
				*ping,
darope@0
   719
				*packet_loss));
darope@0
   720
	RETURN_META(MRES_IGNORED);
darope@0
   721
}
darope@0
   722
darope@0
   723
void AddServerCommand_Post( char *cmd_name, void (*function) (void) ) {
darope@0
   724
	// trace output in Pre
darope@0
   725
	ENGINE_TRACE(pfnAddServerCommand, P_POST, (""));
darope@0
   726
	RETURN_META(MRES_IGNORED);
darope@0
   727
}
darope@0
   728
darope@0
   729
// Added in SDK 2.2:
darope@0
   730
darope@0
   731
//! For voice communications, set which clients hear eachother.
darope@0
   732
//! NOTE: these functions take player entity indices (starting at 1).
darope@0
   733
qboolean Voice_GetClientListening_Post(int iReceiver, int iSender) {
darope@0
   734
	ENGINE_TRACE(pfnVoice_GetClientListening, P_POST, (""));
darope@0
   735
	RETURN_META_VALUE(MRES_IGNORED, false);
darope@0
   736
}
darope@0
   737
qboolean Voice_SetClientListening_Post(int iReceiver, int iSender, qboolean bListen) {
darope@0
   738
	ENGINE_TRACE(pfnVoice_SetClientListening, P_POST, (""));
darope@0
   739
	RETURN_META_VALUE(MRES_IGNORED, false);
darope@0
   740
}
darope@0
   741
darope@0
   742
// Added for HL 1109 (no SDK update):
darope@0
   743
darope@0
   744
const char *GetPlayerAuthId_Post(edict_t *e) {
darope@0
   745
	edict_t *ed = e;
darope@0
   746
	const char *authid=META_RESULT_ORIG_RET(const char *);
darope@0
   747
	ENGINE_TRACE(pfnGetPlayerAuthId, P_POST, ("netname=%s authid=%s",
darope@0
   748
				ed ? STRING(ed->v.netname) : "nil",
darope@0
   749
				authid ? authid : "nil"));
darope@0
   750
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   751
}
darope@0
   752
darope@0
   753
// Added 2003/11/10 (no SDK update):
darope@0
   754
darope@0
   755
void *SequenceGet_Post(const char* fileName, const char* entryName) {
darope@0
   756
	// trace output in Post
darope@0
   757
	ENGINE_TRACE(pfnSequenceGet, P_PRE, (""));
darope@0
   758
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   759
}
darope@0
   760
darope@0
   761
void *SequencePickSentence_Post(const char* groupName, int pickMethod, int *picked) {
darope@0
   762
	// trace output in Post
darope@0
   763
	ENGINE_TRACE(pfnSequencePickSentence, P_PRE, (""));
darope@0
   764
	RETURN_META_VALUE(MRES_IGNORED, NULL);
darope@0
   765
}
darope@0
   766
darope@0
   767
int GetFileSize_Post(char *filename) {
darope@0
   768
	// trace output in Post
darope@0
   769
	ENGINE_TRACE(pfnGetFileSize, P_PRE, (""));
darope@0
   770
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   771
}
darope@0
   772
darope@0
   773
unsigned int GetApproxWavePlayLen_Post(const char *filepath) {
darope@0
   774
	// trace output in Post
darope@0
   775
	ENGINE_TRACE(pfnGetApproxWavePlayLen, P_PRE, (""));
darope@0
   776
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   777
}
darope@0
   778
darope@0
   779
int IsCareerMatch_Post(void) {
darope@0
   780
	// trace output in Post
darope@0
   781
	ENGINE_TRACE(pfnIsCareerMatch, P_PRE, (""));
darope@0
   782
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   783
}
darope@0
   784
darope@0
   785
int GetLocalizedStringLength_Post(const char *label) {
darope@0
   786
	// trace output in Post
darope@0
   787
	ENGINE_TRACE(pfnGetLocalizedStringLength, P_PRE, (""));
darope@0
   788
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   789
}
darope@0
   790
darope@0
   791
void RegisterTutorMessageShown_Post(int mid) {
darope@0
   792
	// trace output in Post
darope@0
   793
	ENGINE_TRACE(pfnRegisterTutorMessageShown, P_PRE, (""));
darope@0
   794
	RETURN_META(MRES_IGNORED);
darope@0
   795
}
darope@0
   796
darope@0
   797
int GetTimesTutorMessageShown_Post(int mid) {
darope@0
   798
	// trace output in Post
darope@0
   799
	ENGINE_TRACE(pfnGetTimesTutorMessageShown, P_PRE, (""));
darope@0
   800
	RETURN_META_VALUE(MRES_IGNORED, 0);
darope@0
   801
}
darope@0
   802
darope@0
   803
void ProcessTutorMessageDecayBuffer_Post(int *buffer, int bufferLength) {
darope@0
   804
	// trace output in Post
darope@0
   805
	ENGINE_TRACE(pfnProcessTutorMessageDecayBuffer, P_PRE, (""));
darope@0
   806
	RETURN_META(MRES_IGNORED);
darope@0
   807
}
darope@0
   808
darope@0
   809
void ConstructTutorMessageDecayBuffer_Post(int *buffer, int bufferLength) {
darope@0
   810
	// trace output in Post
darope@0
   811
	ENGINE_TRACE(pfnConstructTutorMessageDecayBuffer, P_PRE, (""));
darope@0
   812
	RETURN_META(MRES_IGNORED);
darope@0
   813
}
darope@0
   814
darope@0
   815
void ResetTutorMessageDecayData_Post(void) {
darope@0
   816
	// trace output in Post
darope@0
   817
	ENGINE_TRACE(pfnResetTutorMessageDecayData, P_PRE, (""));
darope@0
   818
	RETURN_META(MRES_IGNORED);
darope@0
   819
}
darope@0
   820
darope@0
   821
enginefuncs_t meta_engfuncs_post = {
darope@0
   822
	PrecacheModel_Post,			// pfnPrecacheModel()
darope@0
   823
	PrecacheSound_Post,			// pfnPrecacheSound()
darope@0
   824
	SetModel_Post,				// pfnSetModel()
darope@0
   825
	ModelIndex_Post,			// pfnModelIndex()
darope@0
   826
	ModelFrames_Post,			// pfnModelFrames()
darope@0
   827
darope@0
   828
	SetSize_Post,				// pfnSetSize()
darope@0
   829
	ChangeLevel_Post,			// pfnChangeLevel()
darope@0
   830
	GetSpawnParms_Post,			// pfnGetSpawnParms()
darope@0
   831
	SaveSpawnParms_Post,		// pfnSaveSpawnParms()
darope@0
   832
darope@0
   833
	VecToYaw_Post,				// pfnVecToYaw()
darope@0
   834
	VecToAngles_Post,			// pfnVecToAngles()
darope@0
   835
	MoveToOrigin_Post,			// pfnMoveToOrigin()
darope@0
   836
	ChangeYaw_Post,				// pfnChangeYaw()
darope@0
   837
	ChangePitch_Post,			// pfnChangePitch()
darope@0
   838
darope@0
   839
	FindEntityByString_Post,	// pfnFindEntityByString()
darope@0
   840
	GetEntityIllum_Post,		// pfnGetEntityIllum()
darope@0
   841
	FindEntityInSphere_Post,	// pfnFindEntityInSphere()
darope@0
   842
	FindClientInPVS_Post,		// pfnFindClientInPVS()
darope@0
   843
	EntitiesInPVS_Post,			// pfnEntitiesInPVS()
darope@0
   844
darope@0
   845
	MakeVectors_Post,			// pfnMakeVectors()
darope@0
   846
	AngleVectors_Post,			// pfnAngleVectors()
darope@0
   847
darope@0
   848
	CreateEntity_Post,			// pfnCreateEntity()
darope@0
   849
	RemoveEntity_Post,			// pfnRemoveEntity()
darope@0
   850
	CreateNamedEntity_Post,		// pfnCreateNamedEntity()
darope@0
   851
darope@0
   852
	MakeStatic_Post,			// pfnMakeStatic()
darope@0
   853
	EntIsOnFloor_Post,			// pfnEntIsOnFloor()
darope@0
   854
	DropToFloor_Post,			// pfnDropToFloor()
darope@0
   855
darope@0
   856
	WalkMove_Post,				// pfnWalkMove()
darope@0
   857
	SetOrigin_Post,				// pfnSetOrigin()
darope@0
   858
darope@0
   859
	EmitSound_Post,				// pfnEmitSound()
darope@0
   860
	EmitAmbientSound_Post,		// pfnEmitAmbientSound()
darope@0
   861
darope@0
   862
	TraceLine_Post,				// pfnTraceLine()
darope@0
   863
	TraceToss_Post,				// pfnTraceToss()
darope@0
   864
	TraceMonsterHull_Post,		// pfnTraceMonsterHull()
darope@0
   865
	TraceHull_Post,				// pfnTraceHull()
darope@0
   866
	TraceModel_Post,			// pfnTraceModel()
darope@0
   867
	TraceTexture_Post,			// pfnTraceTexture()
darope@0
   868
	TraceSphere_Post,			// pfnTraceSphere()
darope@0
   869
	GetAimVector_Post,			// pfnGetAimVector()
darope@0
   870
darope@0
   871
	ServerCommand_Post,			// pfnServerCommand()
darope@0
   872
	ServerExecute_Post,			// pfnServerExecute()
darope@0
   873
	engClientCommand_Post,		// pfnClientCommand()	// d'oh, ClientCommand in dllapi too
darope@0
   874
darope@0
   875
	ParticleEffect_Post,		// pfnParticleEffect()
darope@0
   876
	LightStyle_Post,			// pfnLightStyle()
darope@0
   877
	DecalIndex_Post,			// pfnDecalIndex()
darope@0
   878
	PointContents_Post,			// pfnPointContents()
darope@0
   879
darope@0
   880
	MessageBegin_Post,			// pfnMessageBegin()
darope@0
   881
	MessageEnd_Post,			// pfnMessageEnd()
darope@0
   882
darope@0
   883
	WriteByte_Post,				// pfnWriteByte()
darope@0
   884
	WriteChar_Post,				// pfnWriteChar()
darope@0
   885
	WriteShort_Post,			// pfnWriteShort()
darope@0
   886
	WriteLong_Post,				// pfnWriteLong()
darope@0
   887
	WriteAngle_Post,			// pfnWriteAngle()
darope@0
   888
	WriteCoord_Post,			// pfnWriteCoord()
darope@0
   889
	WriteString_Post,			// pfnWriteString()
darope@0
   890
	WriteEntity_Post,			// pfnWriteEntity()
darope@0
   891
darope@0
   892
	CVarRegister_Post,			// pfnCVarRegister()
darope@0
   893
	CVarGetFloat_Post,			// pfnCVarGetFloat()
darope@0
   894
	CVarGetString_Post,			// pfnCVarGetString()
darope@0
   895
	CVarSetFloat_Post,			// pfnCVarSetFloat()
darope@0
   896
	CVarSetString_Post,			// pfnCVarSetString()
darope@0
   897
darope@0
   898
	AlertMessage_Post,			// pfnAlertMessage()
darope@0
   899
	EngineFprintf_Post,			// pfnEngineFprintf()
darope@0
   900
darope@0
   901
	PvAllocEntPrivateData_Post,	// pfnPvAllocEntPrivateData()
darope@0
   902
	PvEntPrivateData_Post,		// pfnPvEntPrivateData()
darope@0
   903
	FreeEntPrivateData_Post,	// pfnFreeEntPrivateData()
darope@0
   904
darope@0
   905
	SzFromIndex_Post,			// pfnSzFromIndex()
darope@0
   906
	AllocString_Post,			// pfnAllocString()
darope@0
   907
darope@0
   908
	GetVarsOfEnt_Post, 			// pfnGetVarsOfEnt()
darope@0
   909
	PEntityOfEntOffset_Post,	// pfnPEntityOfEntOffset()
darope@0
   910
	EntOffsetOfPEntity_Post,	// pfnEntOffsetOfPEntity()
darope@0
   911
	IndexOfEdict_Post,			// pfnIndexOfEdict()
darope@0
   912
	PEntityOfEntIndex_Post,		// pfnPEntityOfEntIndex()
darope@0
   913
	FindEntityByVars_Post,		// pfnFindEntityByVars()
darope@0
   914
	GetModelPtr_Post,			// pfnGetModelPtr()
darope@0
   915
darope@0
   916
	RegUserMsg_Post,			// pfnRegUserMsg()
darope@0
   917
darope@0
   918
	AnimationAutomove_Post,		// pfnAnimationAutomove()
darope@0
   919
	GetBonePosition_Post,		// pfnGetBonePosition()
darope@0
   920
darope@0
   921
	FunctionFromName_Post,		// pfnFunctionFromName()
darope@0
   922
	NameForFunction_Post,		// pfnNameForFunction()
darope@0
   923
darope@0
   924
	ClientPrintf_Post,			// pfnClientPrintf()			//! JOHN: engine callbacks so game DLL can print messages to individual clients
darope@0
   925
	ServerPrint_Post,			// pfnServerPrint()
darope@0
   926
darope@0
   927
	Cmd_Args_Post,				// pfnCmd_Args()				//! these 3 added 
darope@0
   928
	Cmd_Argv_Post,				// pfnCmd_Argv()				//! so game DLL can easily 
darope@0
   929
	Cmd_Argc_Post,				// pfnCmd_Argc()				//! access client 'cmd' strings
darope@0
   930
darope@0
   931
	GetAttachment_Post,			// pfnGetAttachment()
darope@0
   932
darope@0
   933
	CRC32_Init_Post,			// pfnCRC32_Init()
darope@0
   934
	CRC32_ProcessBuffer_Post,	// pfnCRC32_ProcessBuffer()
darope@0
   935
	CRC32_ProcessByte_Post,		// pfnCRC32_ProcessByte()
darope@0
   936
	CRC32_Final_Post,			// pfnCRC32_Final()
darope@0
   937
darope@0
   938
	RandomLong_Post,			// pfnRandomLong()
darope@0
   939
	RandomFloat_Post,			// pfnRandomFloat()
darope@0
   940
darope@0
   941
	SetView_Post,				// pfnSetView()
darope@0
   942
	Time_Post,					// pfnTime()
darope@0
   943
	CrosshairAngle_Post,		// pfnCrosshairAngle()
darope@0
   944
darope@0
   945
	LoadFileForMe_Post,			// pfnLoadFileForMe()
darope@0
   946
	FreeFile_Post,				// pfnFreeFile()
darope@0
   947
darope@0
   948
	EndSection_Post,			// pfnEndSection()				//! trigger_endsection
darope@0
   949
	CompareFileTime_Post,		// pfnCompareFileTime()
darope@0
   950
	GetGameDir_Post,			// pfnGetGameDir()
darope@0
   951
	Cvar_RegisterVariable_Post,	// pfnCvar_RegisterVariable()
darope@0
   952
	FadeClientVolume_Post,		// pfnFadeClientVolume()
darope@0
   953
	SetClientMaxspeed_Post,		// pfnSetClientMaxspeed()
darope@0
   954
	CreateFakeClient_Post,		// pfnCreateFakeClient() 		//! returns NULL if fake client can't be created
darope@0
   955
	RunPlayerMove_Post,			// pfnRunPlayerMove()
darope@0
   956
	NumberOfEntities_Post,		// pfnNumberOfEntities()
darope@0
   957
darope@0
   958
	GetInfoKeyBuffer_Post,		// pfnGetInfoKeyBuffer()		//! passing in NULL gets the serverinfo
darope@0
   959
	InfoKeyValue_Post,			// pfnInfoKeyValue()
darope@0
   960
	SetKeyValue_Post,			// pfnSetKeyValue()
darope@0
   961
	SetClientKeyValue_Post,		// pfnSetClientKeyValue()
darope@0
   962
darope@0
   963
	IsMapValid_Post,			// pfnIsMapValid()
darope@0
   964
	StaticDecal_Post,			// pfnStaticDecal()
darope@0
   965
	PrecacheGeneric_Post,		// pfnPrecacheGeneric()
darope@0
   966
	GetPlayerUserId_Post, 		// pfnGetPlayerUserId()			//! returns the server assigned userid for this player.
darope@0
   967
	BuildSoundMsg_Post,			// pfnBuildSoundMsg()
darope@0
   968
	IsDedicatedServer_Post,		// pfnIsDedicatedServer()		//! is this a dedicated server?
darope@0
   969
	CVarGetPointer_Post,		// pfnCVarGetPointer()
darope@0
   970
	GetPlayerWONId_Post,		// pfnGetPlayerWONId()			//! returns the server assigned WONid for this player.
darope@0
   971
darope@0
   972
	//! YWB 8/1/99 TFF Physics additions
darope@0
   973
	Info_RemoveKey_Post,		// pfnInfo_RemoveKey()
darope@0
   974
	GetPhysicsKeyValue_Post,	// pfnGetPhysicsKeyValue()
darope@0
   975
	SetPhysicsKeyValue_Post,	// pfnSetPhysicsKeyValue()
darope@0
   976
	GetPhysicsInfoString_Post,	// pfnGetPhysicsInfoString()
darope@0
   977
	PrecacheEvent_Post,			// pfnPrecacheEvent()
darope@0
   978
	PlaybackEvent_Post,			// pfnPlaybackEvent()
darope@0
   979
darope@0
   980
	SetFatPVS_Post,				// pfnSetFatPVS()
darope@0
   981
	SetFatPAS_Post,				// pfnSetFatPAS()
darope@0
   982
darope@0
   983
	CheckVisibility_Post,		// pfnCheckVisibility()
darope@0
   984
darope@0
   985
	DeltaSetField_Post,			// pfnDeltaSetField()
darope@0
   986
	DeltaUnsetField_Post,		// pfnDeltaUnsetField()
darope@0
   987
	DeltaAddEncoder_Post,		// pfnDeltaAddEncoder()
darope@0
   988
	GetCurrentPlayer_Post,		// pfnGetCurrentPlayer()
darope@0
   989
	CanSkipPlayer_Post,			// pfnCanSkipPlayer()
darope@0
   990
	DeltaFindField_Post,		// pfnDeltaFindField()
darope@0
   991
	DeltaSetFieldByIndex_Post,	// pfnDeltaSetFieldByIndex()
darope@0
   992
	DeltaUnsetFieldByIndex_Post,// pfnDeltaUnsetFieldByIndex()
darope@0
   993
darope@0
   994
	SetGroupMask_Post,			// pfnSetGroupMask()
darope@0
   995
darope@0
   996
	engCreateInstancedBaseline_Post, // pfnCreateInstancedBaseline()		// d'oh, CreateInstancedBaseline in dllapi too
darope@0
   997
	Cvar_DirectSet_Post,		// pfnCvar_DirectSet()
darope@0
   998
darope@0
   999
	ForceUnmodified_Post,		// pfnForceUnmodified()
darope@0
  1000
darope@0
  1001
	GetPlayerStats_Post,		// pfnGetPlayerStats()
darope@0
  1002
darope@0
  1003
	AddServerCommand_Post,		// pfnAddServerCommand()
darope@0
  1004
darope@0
  1005
	// Added in SDK 2.2:
darope@0
  1006
	Voice_GetClientListening_Post,	// pfnVoice_GetClientListening()
darope@0
  1007
	Voice_SetClientListening_Post,	// pfnVoice_SetClientListening()
darope@0
  1008
darope@0
  1009
	// Added for HL 1109 (no SDK update):
darope@0
  1010
	GetPlayerAuthId_Post,		// pfnGetPlayerAuthId()
darope@0
  1011
darope@0
  1012
	// Added 2003/11/10 (no SDK update):
darope@0
  1013
	SequenceGet_Post,					// pfnSequenceGet()
darope@0
  1014
	SequencePickSentence_Post,			// pfnSequencePickSentence()
darope@0
  1015
	GetFileSize_Post,					// pfnGetFileSize()
darope@0
  1016
	GetApproxWavePlayLen_Post,			// pfnGetApproxWavePlayLen()
darope@0
  1017
	IsCareerMatch_Post,					// pfnIsCareerMatch()
darope@0
  1018
	GetLocalizedStringLength_Post,		// pfnGetLocalizedStringLength()
darope@0
  1019
	RegisterTutorMessageShown_Post,		// pfnRegisterTutorMessageShown()
darope@0
  1020
	GetTimesTutorMessageShown_Post,		// pfnGetTimesTutorMessageShown()
darope@0
  1021
	ProcessTutorMessageDecayBuffer_Post,	// pfnProcessTutorMessageDecayBuffer()
darope@0
  1022
	ConstructTutorMessageDecayBuffer_Post,	// pfnConstructTutorMessageDecayBuffer()
darope@0
  1023
	ResetTutorMessageDecayData_Post,		// pfnResetTutorMessageDecayData()
darope@0
  1024
};
darope@0
  1025
darope@0
  1026
C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion ) 
darope@0
  1027
{
darope@0
  1028
	LOG_DEVELOPER(PLID, "called: GetEngineFunctions_Post; version=%d", *interfaceVersion);
darope@0
  1029
	if(!pengfuncsFromEngine) {
darope@0
  1030
		LOG_ERROR(PLID, "GetEngineFunctions_Post called with null pengfuncsFromEngine");
darope@0
  1031
		return(FALSE);
darope@0
  1032
	}
darope@0
  1033
	else if(*interfaceVersion != ENGINE_INTERFACE_VERSION) {
darope@0
  1034
		LOG_ERROR(PLID, "GetEngineFunctions_Post version mismatch; requested=%d ours=%d", *interfaceVersion, ENGINE_INTERFACE_VERSION);
darope@0
  1035
		// Tell metamod what version we had, so it can figure out who is out of date.
darope@0
  1036
		*interfaceVersion = ENGINE_INTERFACE_VERSION;
darope@0
  1037
		return(FALSE);
darope@0
  1038
	}
darope@0
  1039
	memcpy(pengfuncsFromEngine, &meta_engfuncs_post, sizeof(enginefuncs_t));
darope@0
  1040
	return TRUE;
darope@0
  1041
}