fix issue with T4

This commit is contained in:
6arelyFuture 2024-03-20 18:43:32 +01:00
parent 03a9e4a3ee
commit 286877be25
Signed by: Future
GPG Key ID: FA77F074E98D98A5

View File

@ -1,5 +1,7 @@
/* Meaning of some macros: /* Meaning of some macros:
* T4: Plutonium * T4: Plutonium - Generic
* T4MP: Plutonium - Multiplayer only
* T4SP: Plutonium - Singleplayer only
* IW4MP: Multiplayer only * IW4MP: Multiplayer only
* IW4SP: Singleplayer only * IW4SP: Singleplayer only
* IW4: Generic * IW4: Generic
@ -26,6 +28,12 @@
#define TEMP_DVAR "temp_dvar_util" #define TEMP_DVAR "temp_dvar_util"
#if defined(T4SP)
#define CLIENT_FIELD_NAME playername
#else
#define CLIENT_FIELD_NAME name
#endif
#define GENERIC_INIT \ #define GENERIC_INIT \
init() \ init() \
{ \ { \
@ -125,14 +133,14 @@
#define BOT_CHK(ent) \ #define BOT_CHK(ent) \
if ( ent isTestClient() ) \ if ( ent isTestClient() ) \
{ \ { \
DEBUG_PRINT( ent.name + " is a bot\n" ); \ DEBUG_PRINT( ent.CLIENT_FIELD_NAME + " is a bot\n" ); \
CHK_ACTION; \ CHK_ACTION; \
} }
#else /* Valid for other clients. You should wait some frames to allow Bot Warfare to set these values */ #else /* Valid for other clients. You should wait some frames to allow Bot Warfare to set these values */
#define BOT_CHK(ent) \ #define BOT_CHK(ent) \
if ( isDefined( ent.pers["isBot"] ) && ent.pers["isBot"] ) \ if ( isDefined( ent.pers["isBot"] ) && ent.pers["isBot"] ) \
{ \ { \
DEBUG_PRINT( ent.name + " is a bot\n" ); \ DEBUG_PRINT( ent.CLIENT_FIELD_NAME + " is a bot\n" ); \
CHK_ACTION; \ CHK_ACTION; \
} }
#endif #endif