diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d35fe637..d31b57e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,7 @@ jobs: run: | mkdir post cd post - python3 ../configure.py --sdks=present --mms-path="${{ github.workspace }}/rcbot2/alliedmodders/metamod-source" --sm-path="${{ github.workspace }}/rcbot2/alliedmodders/sourcemod" --hl2sdk-root="${{ github.workspace }}/rcbot2/alliedmodders" --symbol-files --target ${{ matrix.am_arch }} + python3 ../configure.py --sdks=present --mms-path="${{ github.workspace }}/rcbot2/alliedmodders/metamod-source" --sm-path="${{ github.workspace }}/rcbot2/alliedmodders/sourcemod" --hl2sdk-root="${{ github.workspace }}/rcbot2/alliedmodders" --symbol-files --target ${{ matrix.am_arch }} --enable-optimize ambuild - uses: benjlevesque/short-sha@v2.2 diff --git a/utils/RCBot2_meta/bot_cvars.cpp b/utils/RCBot2_meta/bot_cvars.cpp index 64e3eafa..5e0e3212 100644 --- a/utils/RCBot2_meta/bot_cvars.cpp +++ b/utils/RCBot2_meta/bot_cvars.cpp @@ -108,8 +108,6 @@ ConVar rcbot_bot_quota_interval("rcbot_bot_quota_interval", "10", 0, "Interval b ConVar rcbot_show_welcome_msg("rcbot_show_welcome_msg", "1", 0, "Show welcome message on player connect");//Not referenced properly? [APG]RoboCop[CL] ConVar rcbot_force_class("rcbot_force_class", "0", 0, "Force bots to choose specified class, kills alive bots on change (1 - 9, set to 0 for none)"); -ConVar rcbot_waypoint_ignore_map_mismatch("rcbot_waypoint_ignore_map_mismatch", "1", 0, "If 1, waypoints will be loaded even if there's a mismatch."); - // Synergy CVars ConVar rcbot_runplayercmd_syn("rcbot_runplayer_cmd_syn", "424", 0, "offset of the Synergy PlayerRunCommand function"); ConVar rcbot_syn_use_search_range("rcbot_syn_use_search_range", "256", 0, "Sets the maximum button search range.", true, 150.0f, true, 1024.0f); @@ -128,9 +126,6 @@ ConVarRef mp_stalemate_meleeonly("mp_stalemate_meleeonly"); ConVarRef mp_roundtime("mp_roundtime"); ConVarRef mp_c4timer("mp_c4timer"); -// Rafmod -ConVarRef sig_mvm_changeclass_anytime("sig_mvm_changeclass_anytime"); - void RCBOT2_Cvar_setup(ICvar* cvar) //'cvar' hides global declaration from /public/icvar.h [APG]RoboCop[CL] { if (cvar == nullptr) diff --git a/utils/RCBot2_meta/bot_cvars.h b/utils/RCBot2_meta/bot_cvars.h index 79f20a1d..7a5f30fd 100644 --- a/utils/RCBot2_meta/bot_cvars.h +++ b/utils/RCBot2_meta/bot_cvars.h @@ -93,7 +93,6 @@ extern ConVar rcbot_bot_quota_interval; //extern ConVar rcbot_const_point_master_offset; extern ConVar rcbot_util_learning; - //Synergy Cvars extern ConVar rcbot_runplayercmd_syn; extern ConVar rcbot_syn_use_search_range; @@ -115,10 +114,6 @@ extern ConVarRef mp_stalemate_enable; extern ConVarRef mp_roundtime; extern ConVarRef mp_c4timer; -/** Heapons **/ -extern ConVarRef sig_mvm_changeclass_anytime; -extern ConVar rcbot_waypoint_ignore_map_mismatch; - void RCBOT2_Cvar_setup (ICvar* cvar); #endif diff --git a/utils/RCBot2_meta/bot_fortress.cpp b/utils/RCBot2_meta/bot_fortress.cpp index 7698a64c..6b34e772 100644 --- a/utils/RCBot2_meta/bot_fortress.cpp +++ b/utils/RCBot2_meta/bot_fortress.cpp @@ -389,12 +389,12 @@ bool CBotFortress::startGame() // Removed "(m_iDesiredClass > 0 && (m_iClass != m_iDesiredClass))" to avoid bots trying to change class when it was forced by something like in VSH and VIP maps { // can't change class in MVM during round! - if (CTeamFortress2Mod::isMapType(TF_MAP_MVM) && CTeamFortress2Mod::hasRoundStarted() && !sig_mvm_changeclass_anytime.GetBool()) + if (CTeamFortress2Mod::isMapType(TF_MAP_MVM) && CTeamFortress2Mod::hasRoundStarted()) { return true; } if (CTeamFortress2Mod::isMapType(TF_MAP_SAXTON) || CTeamFortress2Mod::isMapType(TF_MAP_GG) || - std::strncmp(szmapname, "vip_", 4) == 0 || std::strncmp(szmapname, "vipr_", 5) == 0 || std::strncmp(szmapname, "cw_", 3) == 0 || + std::strncmp(szmapname, "vip_", 4) == 0 || std::strncmp(szmapname, "cw_", 3) == 0 || std::strncmp(szmapname, "ctf_2fort_sniperwars", 20) == 0 || std::strncmp(szmapname, "dm_", 3) == 0) { return true; @@ -2819,9 +2819,6 @@ void CBotFortress::chooseClass() case 9: m_iDesiredClass = TF_CLASS_SPY; break; - case 10: - m_iDesiredClass = 10; // TF_CLASS_CIVILIAN - break; } } else @@ -7804,8 +7801,10 @@ bool CBotTF2::isEnemy(edict_t* pEdict, const bool bCheckWeapons) const int iConds = CClassInterface::getTF2Conditions(pEdict); const bool bExposedCloaked = CClassInterface::getTF2SpyCloakMeter(pEdict) == 0.0f || ((CTeamFortress2Mod::isMapType(TF_MAP_ZI) || CTeamFortress2Mod::isMapType(TF_MAP_SAXTON)) - && (CTF2Conditions::TF2_IsPlayerInCondition(entIndex, TFCond_Kritzkrieged) || - CTF2Conditions::TF2_IsPlayerInCondition(entIndex, TFCond_Buffed))) /*Buff exposes invisibility - RussiaTails*/ + && (CTF2Conditions::TF2_IsPlayerInCondition(edictIndex, TFCond_Kritzkrieged) || + CTF2Conditions::TF2_IsPlayerInCondition(edictIndex, TFCond_Buffed))) /*Buff exposes invisibility - RussiaTails*/ + || CTF2Conditions::TF2_IsPlayerInCondition(edictIndex, TFCond_Sapped) + || CTF2Conditions::TF2_IsPlayerInCondition(edictIndex, TFCond_MVMBotRadiowave) || CTeamFortress2Mod::TF2_IsPlayerOnFire(pEdict) // if he is on fire and cloaked I can see him || iConds & (1 << 9) /* Flicker */ || iConds & (1 << 24) /* Jarated */ @@ -7929,10 +7928,16 @@ bool CBotTF2::isEnemy(edict_t* pEdict, const bool bCheckWeapons) } }*/ } - if (CBotGlobals::getTeam(pEdict) == getTeam()) + /*if (mp_friendlyfire.GetInt() == 1) { - return mp_friendlyfire.GetBool(); + if (CBotGlobals::getTeam(pEdict) == getTeam()) + return true; } + if (mp_friendlyfire.GetInt() == 0) + { + if (CBotGlobals::getTeam(pEdict) == getTeam()) + return false; + }*/ //Doesn't work } // TODO: to allow bots to properly attack RD Robots [APG]RoboCop[CL] else if ( (CTeamFortress2Mod::isMapType(TF_MAP_RD) || CTeamFortress2Mod::isMapType(TF_MAP_CTF)) && !std::strcmp(pEdict->GetClassName(),"tf_robot_destruction_robot") && (CClassInterface::getTeam(pEdict) != m_iTeam)) diff --git a/utils/RCBot2_meta/bot_fortress.h b/utils/RCBot2_meta/bot_fortress.h index 6a859b71..f24bf891 100644 --- a/utils/RCBot2_meta/bot_fortress.h +++ b/utils/RCBot2_meta/bot_fortress.h @@ -284,7 +284,6 @@ typedef enum : std::uint8_t TF_CLASS_PYRO, TF_CLASS_SPY, TF_CLASS_ENGINEER, - //TF_CLASS_CIVILIAN, TF_CLASS_MAX }TF_Class; diff --git a/utils/RCBot2_meta/bot_tf2_mod.cpp b/utils/RCBot2_meta/bot_tf2_mod.cpp index cc85f618..7241eeb6 100644 --- a/utils/RCBot2_meta/bot_tf2_mod.cpp +++ b/utils/RCBot2_meta/bot_tf2_mod.cpp @@ -265,33 +265,27 @@ void CTeamFortress2Mod :: mapInit () if (std::strncmp(szmapname, "ctf_", 4) == 0 || std::strncmp(szmapname, "quake_turbine", 13) == 0 || std::strncmp(szmapname, "pass_", 5) == 0 || std::strncmp(szmapname, "pd_", 3) == 0 || std::strncmp(szmapname, "od_", 3) == 0 || - (std::strncmp(szmapname, "slendytubbies", 13) == 0 && - !(std::strncmp(szmapname, "ctf_chouhen", 11) == 0 || std::strncmp(szmapname, "ctf_haarp", 9) == 0))) + std::strncmp(szmapname, "slendytubbies", 13) == 0) // Quake Turbine is CTF. - RussiaTails - m_MapType = TF_MAP_CTF; // capture the flag - else if ((std::strncmp(szmapname, "cp_", 3) == 0 || std::strncmp(szmapname, "cp_", 3) == 1) || + m_MapType = TF_MAP_CTF; // capture the flag + pass time + player destruction + else if (std::strncmp(szmapname, "cp_", 3) == 0 || std::strncmp(szmapname, "cqt_", 4) == 0 || std::strncmp(szmapname, "conquest_", 9) == 0 || std::strncmp(szmapname, "dom_", 4) == 0 || std::strncmp(szmapname, "2koth_", 6) == 0 || - std::strncmp(szmapname, "ctf_chouhen", 11) == 0 || - std::strncmp(szmapname, "ctf_haarp", 9) == 0 || std::strncmp(szmapname, "falling_cp", 10) == 0 || std::strncmp(szmapname, "stt_", 4) == 0 || std::strncmp(szmapname, "koth_lifesnatcher", 17) == 0 || std::strncmp(szmapname, "vip_", 4) == 0 || std::strncmp(szmapname, "vipr_", 5) == 0 || std::strncmp(szmapname, "szf_", 4) == 0 || - std::strncmp(szmapname, "zf_", 3) == 0 || - std::strncmp(szmapname, "ze_", 3) == 0) + std::strncmp(szmapname, "zf_", 3) == 0) // Conquest, 2koth and DOM works fine as CP_. Moved stt to cp to make bots attack a tank - RussiaTails m_MapType = TF_MAP_CP; // control point else if (std::strncmp(szmapname, "tc_", 3) == 0) m_MapType = TF_MAP_TC; // territory control else if (std::strncmp(szmapname, "pl_", 3) == 0 || - (std::strncmp(szmapname, "kotc_", 5) == 0 && - (!(std::strncmp(szmapname, "pl_fountain", 11) == 0 || - std::strncmp(szmapname, "pl_divulgence", 13) == 0)))) + std::strncmp(szmapname, "kotc_", 5) == 0) // Tug of War works fine as Payload - RussiaTails m_MapType = TF_MAP_CART; // pipeline else if (std::strncmp(szmapname, "plr_", 4) == 0 || std::strncmp(szmapname, "tow_", 4) == 0 || @@ -315,8 +309,7 @@ void CTeamFortress2Mod :: mapInit () m_MapType = TF_MAP_SD; // special delivery else if (std::strncmp(szmapname, "tr_", 3) == 0) m_MapType = TF_MAP_TR; // training mode - else if (std::strncmp(szmapname, "cppl_", 5) == 0 || std::strncmp(szmapname, "pl_fountain", 11) == 0 || - std::strncmp(szmapname, "pl_divulgence", 13) == 0 || std::strncmp(szmapname, "cp_helmsdeep_v2", 15) == 0 || + else if (std::strncmp(szmapname, "cppl_", 5) == 0 || std::strncmp(szmapname, "cw_", 3) == 0) // Hybrid - RussiaTails m_MapType = TF_MAP_CPPL; // CP+PL maps else if (std::strncmp(szmapname, "gg_", 3) == 0 || std::strncmp(szmapname, "dm_hydro", 8) == 0 || diff --git a/utils/RCBot2_meta/bot_waypoint.cpp b/utils/RCBot2_meta/bot_waypoint.cpp index 1970efaa..a372c02d 100644 --- a/utils/RCBot2_meta/bot_waypoint.cpp +++ b/utils/RCBot2_meta/bot_waypoint.cpp @@ -1849,23 +1849,20 @@ bool CWaypoints :: load (const char *szMapName) return false; } - if (!rcbot_waypoint_ignore_map_mismatch.GetBool()) + if ( szMapName ) { - if ( szMapName ) - { - if ( !FStrEq(header.szMapName,szMapName) ) - { - logger->Log(LogLevel::ERROR, "Error loading waypoints: Map name mismatch"); - return false; - } - } - else if ( !FStrEq(header.szMapName,CBotGlobals::getMapName()) ) + if ( !FStrEq(header.szMapName,szMapName) ) { logger->Log(LogLevel::ERROR, "Error loading waypoints: Map name mismatch"); return false; } } - + else if ( !FStrEq(header.szMapName,CBotGlobals::getMapName()) ) + { + logger->Log(LogLevel::ERROR, "Error loading waypoints: Map name mismatch"); + return false; + } + if ( header.iVersion > 3 ) { // load author information