zclass fix remaining bugs
This commit is contained in:
parent
80228760c5
commit
f8f84dd091
|
@ -325,7 +325,7 @@ ClassMenuSelect(client, teamid)
|
|||
ClassGetDescription(classindex, description, sizeof(description), ZR_CLASS_CACHE_MODIFIED);
|
||||
|
||||
// Add menu item. Using extra spaces for indention on the second line.
|
||||
Format(menuitem, sizeof(menuitem), "%s\n %s", classname, description);
|
||||
Format(menuitem, sizeof(menuitem), "%s\n %s", classname, classident, description);
|
||||
AddMenuItem(menu, classident, menuitem);
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ ClassMenuSelect(client, teamid)
|
|||
*/
|
||||
public ClassMenuSelectHandle(Handle:menu, MenuAction:action, client, slot)
|
||||
{
|
||||
decl String:classIdent[MENU_LINE_REG_LENGTH];
|
||||
decl String:classIdent[64];
|
||||
new classIndex;
|
||||
new bool:autoclose = GetConVarBool(g_hCvarsList[CVAR_CLASSES_MENU_AUTOCLOSE]);
|
||||
|
||||
|
|
|
@ -1238,17 +1238,17 @@ ClassClientSetDefaultIdentifiers(client = -1)
|
|||
{
|
||||
if (!haszombie && zombieindex != -1)
|
||||
{
|
||||
ClassGetIdentifier(zombieindex, zombie_ident, sizeof(zombie_ident));
|
||||
ClassGetIdentifier(zombieindex, zombie_ident, sizeof(zombie_ident), ZR_CLASS_CACHE_MODIFIED);
|
||||
SetClientCookie(client, g_hClassCookieClassSelected[ZR_CLASS_TEAM_ZOMBIES], zombie_ident);
|
||||
}
|
||||
if (!hashuman && humanindex != -1)
|
||||
{
|
||||
ClassGetIdentifier(humanindex, human_ident, sizeof(human_ident));
|
||||
ClassGetIdentifier(humanindex, human_ident, sizeof(human_ident), ZR_CLASS_CACHE_MODIFIED);
|
||||
SetClientCookie(client, g_hClassCookieClassSelected[ZR_CLASS_TEAM_HUMANS], human_ident);
|
||||
}
|
||||
if (!hasadmin && adminindex != -1)
|
||||
{
|
||||
ClassGetIdentifier(adminindex, admin_ident, sizeof(admin_ident));
|
||||
ClassGetIdentifier(adminindex, admin_ident, sizeof(admin_ident), ZR_CLASS_CACHE_MODIFIED);
|
||||
SetClientCookie(client, g_hClassCookieClassSelected[ZR_CLASS_TEAM_ADMINS], admin_ident);
|
||||
}
|
||||
}
|
||||
|
@ -1343,7 +1343,9 @@ ClassSelectResult:ClassSelectClientClass(client, classIndex, bool:applyIfPossibl
|
|||
// Note: Saved indexes are increased by one.
|
||||
if (saveIfEnabled && GetConVarBool(g_hCvarsList[CVAR_CLASSES_SAVE]))
|
||||
{
|
||||
CookiesSetInt(client, g_hClassCookieClassSelected[teamid], classIndex + 1);
|
||||
char classIdent[64];
|
||||
ClassGetIdentifier(classIndex, classIdent, sizeof(classIdent), ZR_CLASS_CACHE_MODIFIED);
|
||||
SetClientCookie(client, g_hClassCookieClassSelected[teamid], classIdent);
|
||||
}
|
||||
|
||||
return selectResult;
|
||||
|
|
Loading…
Reference in New Issue
Block a user