From 3b612dc857c526fc09cdb3573cf438b477c78126 Mon Sep 17 00:00:00 2001 From: s1lent Date: Tue, 17 Dec 2019 21:19:52 +0700 Subject: [PATCH] Move some new features to REGAMEDLL_ADD --- regamedll/dlls/game.cpp | 12 ++++++++---- regamedll/dlls/triggers.cpp | 17 ++++++++++++----- regamedll/dlls/weapons.cpp | 4 +++- regamedll/msvc/ReGameDLL.vcxproj | 2 +- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index 16d3615c..e51a19e3 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -94,6 +94,13 @@ cvar_t sk_scientist_heal1 = { "sk_scientist_heal1", "0", 0, 0.0f, nullptr }; cvar_t sk_scientist_heal2 = { "sk_scientist_heal2", "0", 0, 0.0f, nullptr }; cvar_t sk_scientist_heal3 = { "sk_scientist_heal3", "0", 0, 0.0f, nullptr }; +#ifdef BUILD_LATEST + +cvar_t scoreboard_showmoney = { "mp_scoreboard_showmoney", "3", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t scoreboard_showhealth = { "mp_scoreboard_showhealth", "3", FCVAR_SERVER, 0.0f, nullptr }; + +#endif + #ifdef REGAMEDLL_ADD cvar_t game_version = { "game_version", APP_VERSION, FCVAR_SERVER, 0.0f, nullptr }; @@ -131,9 +138,6 @@ cvar_t allow_point_servercommand = { "mp_allow_point_servercommand", "0", 0, 0.0 cvar_t hullbounds_sets = { "mp_hullbounds_sets", "1", 0, 0.0f, nullptr }; cvar_t unduck_method = { "mp_unduck_method", "0", 0, 0.0f, nullptr }; -cvar_t scoreboard_showmoney = { "mp_scoreboard_showmoney", "3", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t scoreboard_showhealth = { "mp_scoreboard_showhealth", "3", FCVAR_SERVER, 0.0f, nullptr }; - cvar_t ff_damage_reduction_bullets = { "ff_damage_reduction_bullets", "0.35", FCVAR_SERVER, 0.0f, nullptr }; cvar_t ff_damage_reduction_grenade = { "ff_damage_reduction_grenade", "0.25", FCVAR_SERVER, 0.0f, nullptr }; cvar_t ff_damage_reduction_grenade_self = { "ff_damage_reduction_grenade_self", "1", FCVAR_SERVER, 0.0f, nullptr }; @@ -332,7 +336,7 @@ void EXT_FUNC GameDLLInit() { CVAR_REGISTER(&show_scenarioicon); } - + CVAR_REGISTER(&old_bomb_defused_sound); CVAR_REGISTER(&item_staytime); CVAR_REGISTER(&legacy_bombtarget_touch); diff --git a/regamedll/dlls/triggers.cpp b/regamedll/dlls/triggers.cpp index d640a9c6..0c7b45d4 100644 --- a/regamedll/dlls/triggers.cpp +++ b/regamedll/dlls/triggers.cpp @@ -1858,12 +1858,19 @@ void CBombTarget::BombTargetTouch(CBaseEntity *pOther) CBasePlayer *pPlayer = static_cast(pOther); - if (pPlayer->m_bHasC4 -#ifdef REGAMEDLL_FIXES - && (legacy_bombtarget_touch.value || IsPlayerInBombSite(pPlayer)) -#endif - ) + if (pPlayer->m_bHasC4) { +#ifdef REGAMEDLL_ADD + if (!legacy_bombtarget_touch.value) +#endif + { + +#ifdef REGAMEDLL_FIXES + if (!IsPlayerInBombSite(pPlayer)) + return; +#endif + } + pPlayer->m_signals.Signal(SIGNAL_BOMB); pPlayer->m_pentCurBombTarget = ENT(pev); } diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index 2eff9fb0..30641f5c 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -2176,13 +2176,15 @@ void CArmoury::Spawn() void CArmoury::Restart() { -#ifdef REGAMEDLL_FIXES +#ifdef REGAMEDLL_ADD if (!weapons_allow_map_placed.value) { Hide(); return; } +#endif +#ifdef REGAMEDLL_FIXES // This code refers to the mode of Escape. (Because there is relationship to the team Terrorists) if (CSGameRules()->m_bMapHasEscapeZone) #endif diff --git a/regamedll/msvc/ReGameDLL.vcxproj b/regamedll/msvc/ReGameDLL.vcxproj index 602fc73f..8ff292c8 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj +++ b/regamedll/msvc/ReGameDLL.vcxproj @@ -810,7 +810,7 @@ {70A2B904-B7DB-4C48-8DE0-AF567360D572} ReGameDLL - 12.0 + 12.0