From ded36a6c5d13801403e28fc34d04a5d6ae33f6eb Mon Sep 17 00:00:00 2001 From: Greyscale Date: Mon, 3 Aug 2009 15:00:48 -0700 Subject: [PATCH] Fixed auto-rebuy possibly being stuck on if the cvar was disabled. Now auto-disables if the cvar is disabled. --- src/zr/weapons/zmarket.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/zr/weapons/zmarket.inc b/src/zr/weapons/zmarket.inc index fc2f0c9..55b92de 100644 --- a/src/zr/weapons/zmarket.inc +++ b/src/zr/weapons/zmarket.inc @@ -151,6 +151,13 @@ ZMarketOnClientSpawnPost(client) // Reset purchase counts for client. ZMarketResetPurchaseCount(client); + // If auto-rebuy is disabled, then ensure it is also disabled on the client as well. + new bool:zmarketrebuyauto = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_REBUY_AUTO]); + if (!zmarketrebuyauto) + { + CookiesSetClientCookieBool(client, g_hZMarketAutoRebuyCookie, false); + } + // If client hasn't spawned into the game yet, then stop. if (!IsPlayerAlive(client)) {