committed fakemeta optimizations

This commit is contained in:
David Anderson 2006-03-04 06:34:28 +00:00
parent 3b4cd21835
commit 372a01e6da
6 changed files with 346 additions and 1049 deletions

View File

@ -4,6 +4,7 @@ edict_t *g_player_edicts[33]; // Used for INDEXENT() forward.
void OnAmxxAttach() void OnAmxxAttach()
{ {
initialze_offsets();
MF_AddNatives(engfunc_natives); MF_AddNatives(engfunc_natives);
MF_AddNatives(dllfunc_natives); MF_AddNatives(dllfunc_natives);
MF_AddNatives(pev_natives); MF_AddNatives(pev_natives);

View File

@ -14,8 +14,7 @@ extern edict_t *g_player_edicts[33];
inline edict_t* INDEXENT2( int iEdictNum ) inline edict_t* INDEXENT2( int iEdictNum )
{ {
if (iEdictNum >= 1 && iEdictNum <= gpGlobals->maxClients) if (iEdictNum >= 1 && iEdictNum <= gpGlobals->maxClients)
return g_player_edicts[iEdictNum]; return MF_GetPlayerEdict(iEdictNum);
else else
return (*g_engfuncs.pfnPEntityOfEntIndex)(iEdictNum); return (*g_engfuncs.pfnPEntityOfEntIndex)(iEdictNum);
} }

View File

@ -564,7 +564,7 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
dlltable = g_pFunctionTable; dlltable = g_pFunctionTable;
newdlltable = g_pNewFunctionsTable; newdlltable = g_pNewFunctionsTable;
} }
switch (func) switch (func)
{ {
case FM_PrecacheModel: case FM_PrecacheModel:

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,6 @@
#ifndef _INCLUDE_PEV_H #ifndef _INCLUDE_PEV_H
#define _INCLUDE_PEV_H #define _INCLUDE_PEV_H
#define RETURNTYPE_INT 2
#define RETURNTYPE_FLOAT 3
#define RETURNTYPE_VECTOR 3
#define RETURNTYPE_STRING 4
#define VALUETYPE_INT 1
#define VALUETYPE_FLOAT 2
#define VALUETYPE_VECTOR 3
#define VALUETYPE_EDICT 4
#define VALUETYPE_STRING 5
#define VALUETYPE_BYTE 6
enum pev_pointers enum pev_pointers
{ {
pev_string_start = 0, pev_string_start = 0,
@ -158,5 +147,7 @@ enum pev_pointers
pev_vecarray_end pev_vecarray_end
}; };
void initialze_offsets();
#endif //_INCLUDE_PEV_H #endif //_INCLUDE_PEV_H

View File

@ -5,7 +5,7 @@
// Module info // Module info
#define MODULE_NAME "FakeMeta" #define MODULE_NAME "FakeMeta"
#define MODULE_VERSION "1.65" #define MODULE_VERSION "1.70"
#define MODULE_AUTHOR "AMX Mod X Dev Team" #define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org" #define MODULE_URL "http://www.amxmodx.org"
#define MODULE_LOGTAG "FAKEMETA" #define MODULE_LOGTAG "FAKEMETA"