mirror of
https://github.com/diamante0018/PP-GSC.git
synced 2025-04-19 12:02:53 +00:00
feat: document BOT_CHK
This commit is contained in:
parent
96798f4032
commit
b187f25dc0
28
_utility.gsh
28
_utility.gsh
@ -50,12 +50,26 @@
|
|||||||
/* IW4x MP has printConsole Built-in. __VA_OPT__ requires C++20 compliant preprocessor */
|
/* IW4x MP has printConsole Built-in. __VA_OPT__ requires C++20 compliant preprocessor */
|
||||||
/* Do not use the + to concatenate strings, let the GSC VM do it for you */
|
/* Do not use the + to concatenate strings, let the GSC VM do it for you */
|
||||||
/* Other clients will have print available */
|
/* Other clients will have print available */
|
||||||
|
#if defined(IW4MP)
|
||||||
|
#define PRINT_FUNC printConsole
|
||||||
|
#else
|
||||||
|
#define PRINT_FUNC print
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(TOOL)
|
#if !defined(TOOL)
|
||||||
#if defined(IW4MP)
|
PRINT_FUNC( format __VA_OPT__(,) __VA_ARGS__ )
|
||||||
#define PRINT(format, ...) printConsole( format __VA_OPT__(,) __VA_ARGS__ )
|
#endif
|
||||||
#else
|
|
||||||
#define PRINT(format, ...) print( format __VA_OPT__(,) __VA_ARGS__ )
|
#ifdef _UTILITY_DEBUG
|
||||||
#endif
|
#define _VERIFY( cond, msg ) \
|
||||||
|
assertEx(cond, msg)
|
||||||
|
|
||||||
|
#define DEBUG_PRINT(msg) \
|
||||||
|
PRINT_FUNC(msg)
|
||||||
|
#else
|
||||||
|
/* The following are "empty" defines with gsc-tool */
|
||||||
|
#define _VERIFY(cond, msg)
|
||||||
|
#define DEBUG_PRINT(msg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Use Cbuf. Should use the + to concatenate strings before using this */
|
/* Use Cbuf. Should use the + to concatenate strings before using this */
|
||||||
@ -115,12 +129,14 @@
|
|||||||
#define BOT_CHK(ent) \
|
#define BOT_CHK(ent) \
|
||||||
if ( ent isTestClient() ) \
|
if ( ent isTestClient() ) \
|
||||||
{ \
|
{ \
|
||||||
|
DEBUG_PRINT( ent.name + " is a bot\n" ); \
|
||||||
CHK_ACTION; \
|
CHK_ACTION; \
|
||||||
}
|
}
|
||||||
#else /* Valid for other clients */
|
#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" ); \
|
||||||
CHK_ACTION; \
|
CHK_ACTION; \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user