completly disable buyzone when mp_buytime is 0 (#148)

This commit is contained in:
justgo97 2017-05-06 19:42:15 +01:00 committed by Dmitry Novikov
parent e71deb8976
commit d0587eefe9
2 changed files with 13 additions and 2 deletions

View File

@ -6384,8 +6384,14 @@ void CBasePlayer::HandleSignals()
{
if (CSGameRules()->IsMultiplayer())
{
if (!CSGameRules()->m_bMapHasBuyZone)
OLD_CheckBuyZone(this);
#ifdef REGAMEDLL_ADD
if (buytime.value != 0.0f)
#endif
{
if (!CSGameRules()->m_bMapHasBuyZone)
OLD_CheckBuyZone(this);
}
if (!CSGameRules()->m_bMapHasBombZone)
OLD_CheckBombTarget(this);

View File

@ -1727,6 +1727,11 @@ void CBuyZone::__MAKE_VHOOK(Spawn)()
void CBuyZone::BuyTouch(CBaseEntity *pOther)
{
#ifdef REGAMEDLL_ADD
if (buytime.value == 0.0f)
return;
#endif
if (!pOther->IsPlayer())
return;