From 0adc2c597a6096915172e36245d77dc08cf7d3cd Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 9 Dec 2009 14:57:33 +0100 Subject: [PATCH] Fixed class selection not saved in cookies on instant class change. --- src/zr/playerclasses/classmenus.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/zr/playerclasses/classmenus.inc b/src/zr/playerclasses/classmenus.inc index 981032e..a43aa48 100644 --- a/src/zr/playerclasses/classmenus.inc +++ b/src/zr/playerclasses/classmenus.inc @@ -388,12 +388,12 @@ public ClassMenuSelectHandle(Handle:menu, MenuAction:action, client, slot) // Player isn't alive. The class can be directly changed. ClassSelected[client][teamid] = classindex; } - - // Save selected class index in cookie if enabled. - if (GetConVarBool(g_hCvarsList[CVAR_CLASSES_SAVE])) - { - CookiesSetInt(client, g_hClassCookieClassSelected[teamid], classindex + 1); - } + } + + // Save selected class index in cookie if enabled. + if (GetConVarBool(g_hCvarsList[CVAR_CLASSES_SAVE])) + { + CookiesSetInt(client, g_hClassCookieClassSelected[teamid], classindex + 1); } } case MenuAction_Cancel: