Fixed auto-rebuy possibly being stuck on if the cvar was disabled. Now auto-disables if the cvar is disabled.

This commit is contained in:
Greyscale 2009-08-03 15:00:48 -07:00
parent 1757ec97fa
commit ded36a6c5d

View File

@ -151,6 +151,13 @@ ZMarketOnClientSpawnPost(client)
// Reset purchase counts for client. // Reset purchase counts for client.
ZMarketResetPurchaseCount(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 client hasn't spawned into the game yet, then stop.
if (!IsPlayerAlive(client)) if (!IsPlayerAlive(client))
{ {