diff --git a/include/core.h b/include/core.h index 88544ca..691c412 100644 --- a/include/core.h +++ b/include/core.h @@ -58,12 +58,14 @@ enum TaskID enum GameFlags { GAME_CSTRIKE16 = (1 << 0), // Counter-Strike 1.6 and Above - GAME_XASH = (1 << 1), // Counter-Strike 1.6 under the xash engine (additional flag) + GAME_XASH_ENGINE = (1 << 1), // Counter-Strike 1.6 under the xash engine (additional flag) GAME_CZERO = (1 << 2), // Counter-Strike: Condition Zero GAME_LEGACY = (1 << 3), // Counter-Strike 1.3-1.5 with/without Steam GAME_MOBILITY = (1 << 4), // additional flag that bot is running on android (additional flag) GAME_OFFICIAL_CSBOT = (1 << 5), // additional flag that indicates official cs bots are in game - GAME_METAMOD = (1 << 6) + GAME_METAMOD = (1 << 6), // game running under metamod + GAME_SUPPORT_SVC_PINGS = (1 << 7), // on that game version we can fake bots pings + GAME_SUPPORT_BOT_VOICE = (1 << 8) // on that game version we can use chatter }; // bot menu ids diff --git a/project/makefile b/project/makefile index 65ab843..e97397c 100644 --- a/project/makefile +++ b/project/makefile @@ -55,7 +55,7 @@ endif LINK += -m32 -lm -ldl CFLAGS += -msse2 -std=c++11 -m32 -Wall -Werror -Wextra -CPPFLAGS += -fno-exceptions -fno-rtti -fno-builtin +CPPFLAGS += -fno-exceptions -fno-rtti BINARY = $(PROJECT).$(LIB_EXT) diff --git a/source/basecode.cpp b/source/basecode.cpp index 273bc17..3b20d0f 100644 --- a/source/basecode.cpp +++ b/source/basecode.cpp @@ -1445,7 +1445,7 @@ void Bot::PurchaseWeapons (void) bool teamEcoValid = bots.IsEcoValid (m_team); // do this, because xash engine is not capable to run all the features goldsrc, but we have cs 1.6 on it, so buy table must be the same - bool isOldGame = (g_gameFlags & GAME_LEGACY) && !(g_gameFlags & GAME_XASH); + bool isOldGame = (g_gameFlags & GAME_LEGACY) && !(g_gameFlags & GAME_XASH_ENGINE); switch (m_buyState) { diff --git a/source/interface.cpp b/source/interface.cpp index 90b022e..23a9434 100644 --- a/source/interface.cpp +++ b/source/interface.cpp @@ -2419,7 +2419,7 @@ void pfnMessageBegin (int msgDest, int msgType, const float *origin, edict_t *ed } engine.ResetMessageCapture (); - if ((!(g_gameFlags & GAME_LEGACY) || (g_gameFlags & GAME_XASH)) && msgDest == MSG_SPEC && msgType == engine.FindMessageId (NETMSG_HLTV)) + if ((!(g_gameFlags & GAME_LEGACY) || (g_gameFlags & GAME_XASH_ENGINE)) && msgDest == MSG_SPEC && msgType == engine.FindMessageId (NETMSG_HLTV)) engine.SetOngoingMessageId (NETMSG_HLTV); engine.TryCaptureMessage (msgType, NETMSG_WEAPONLIST); @@ -3029,7 +3029,7 @@ Library *LoadCSBinary (void) // detect xash engine if (g_engfuncs.pfnCVarGetPointer ("build") != nullptr) { - g_gameFlags |= (GAME_LEGACY | GAME_XASH); + g_gameFlags |= (GAME_LEGACY | GAME_XASH_ENGINE); if (g_gameFlags & GAME_METAMOD) { @@ -3088,7 +3088,7 @@ DLL_GIVEFNPTRSTODLL GiveFnptrsToDll (enginefuncs_t *functionTable, globalvars_t } #ifdef PLATFORM_ANDROID - g_gameFlags |= (GAME_LEGACY | GAME_XASH | GAME_MOBILITY); + g_gameFlags |= (GAME_LEGACY | GAME_XASH_ENGINE | GAME_MOBILITY); if (g_gameFlags & GAME_METAMOD) return; // we should stop the attempt for loading the real gamedll, since metamod handle this for us @@ -3127,7 +3127,7 @@ DLL_GIVEFNPTRSTODLL GiveFnptrsToDll (enginefuncs_t *functionTable, globalvars_t else if (g_gameFlags & GAME_CSTRIKE16) gameVersionStr.Assign ("v1.6"); - if (g_gameFlags & GAME_XASH) + if (g_gameFlags & GAME_XASH_ENGINE) { gameVersionStr.Append (" @ Xash3D Engine"); diff --git a/source/navigate.cpp b/source/navigate.cpp index 576143f..14e4e5b 100644 --- a/source/navigate.cpp +++ b/source/navigate.cpp @@ -1107,7 +1107,7 @@ bool Bot::DoWaypointNav (void) if (Random.Int (1, 100) < 50) { // do not use door directrly under xash, or we will get failed assert in gamedll code - if (g_gameFlags & GAME_XASH) + if (g_gameFlags & GAME_XASH_ENGINE) pev->button |= IN_USE; else MDLL_Use (tr.pHit, GetEntity ()); // also 'use' the door randomly diff --git a/source/support.cpp b/source/support.cpp index 66a5898..0d2402b 100644 --- a/source/support.cpp +++ b/source/support.cpp @@ -149,7 +149,7 @@ void DisplayMenuToClient (edict_t *ent, MenuId menu) break; } } - const char *displayText = ((g_gameFlags & (GAME_XASH | GAME_MOBILITY)) && !yb_display_menu_text.GetBool ()) ? " " : menuPtr->text.GetBuffer (); + const char *displayText = ((g_gameFlags & (GAME_XASH_ENGINE | GAME_MOBILITY)) && !yb_display_menu_text.GetBool ()) ? " " : menuPtr->text.GetBuffer (); while (strlen (displayText) >= 64) { @@ -528,7 +528,7 @@ void CheckWelcomeMessage (void) Array sentences; - if (!(g_gameFlags & (GAME_MOBILITY | GAME_XASH))) + if (!(g_gameFlags & (GAME_MOBILITY | GAME_XASH_ENGINE))) { // add default messages sentences.Push ("hello user,communication is acquired"); @@ -554,7 +554,7 @@ void CheckWelcomeMessage (void) if (receiveTime > 0.0f && receiveTime < engine.Time () && !alreadyReceived && (g_numWaypoints > 0 ? g_gameWelcomeSent : true)) { - if (!(g_gameFlags & (GAME_MOBILITY | GAME_XASH))) + if (!(g_gameFlags & (GAME_MOBILITY | GAME_XASH_ENGINE))) engine.IssueCmd ("speak \"%s\"", const_cast (sentences.GetRandomElement ().GetBuffer ())); engine.ChatPrintf ("----- %s v%s (Build: %u), {%s}, (c) 2016, by %s (%s)-----", PRODUCT_NAME, PRODUCT_VERSION, GenerateBuildNumber (), PRODUCT_DATE, PRODUCT_AUTHOR, PRODUCT_URL);