engine: server: make PEntityOfEntIndex bug-compatible with GoldSrc

Add new undocumented GoldSrc eiface function, PEntityOfEntIndexAllEntities,
a bug-free version of PEntityOfEntIndex

Ref: https://github.com/ValveSoftware/halflife/issues/2272
This commit is contained in:
Alibek Omarov
2022-05-20 18:09:52 +03:00
committed by a1batross
parent 10ec32e264
commit 51526948c0
4 changed files with 34 additions and 20 deletions

View File

@@ -278,6 +278,9 @@ typedef struct enginefuncs_s
void (*pfnQueryClientCvarValue)( const edict_t *player, const char *cvarName );
void (*pfnQueryClientCvarValue2)( const edict_t *player, const char *cvarName, int requestID );
int (*pfnCheckParm)( char *parm, char **ppnext );
// added in 8279
edict_t* (*pfnPEntityOfEntIndexAllEntities)( int iEntIndex );
} enginefuncs_t;
// ONLY ADD NEW FUNCTIONS TO THE END OF THIS STRUCT. INTERFACE VERSION IS FROZEN AT 138