Removed old class system. Cleared out external API natives and forwards. Commented out old menus.
This commit is contained in:
@ -45,35 +45,27 @@ ClassOnClientSpawn(client)
|
||||
|
||||
if (showmenu && !randomclass)
|
||||
{
|
||||
ClassMenu(client);
|
||||
//ClassMenu(client);
|
||||
}
|
||||
|
||||
// Assign random classes if enabled.
|
||||
GetClientAuthString(client, steamid, sizeof(steamid));
|
||||
if (StrEqual(steamid, "BOT") || randomclass)
|
||||
{
|
||||
// Old class system.
|
||||
new classindex = GetRandomInt(0, classCount - 1);
|
||||
|
||||
Call_StartForward(hOnZClassChanged);
|
||||
Call_PushCell(client);
|
||||
Call_PushCell(pClass[client]);
|
||||
Call_PushCell(classindex);
|
||||
Call_Finish();
|
||||
|
||||
pClass[client] = classindex;
|
||||
|
||||
// New class system.
|
||||
// Get player's team
|
||||
new teamid = GetClientTeam(client);
|
||||
|
||||
// If the first zombie spawned, and the player is on the terrorist team, then
|
||||
// find a random zombie class, otherwise find a human class.
|
||||
if (zombieSpawned && teamid == CS_TEAM_T)
|
||||
{
|
||||
classindex = ClassGetRandomClass(ZR_CLASS_TEAM_ZOMBIES);
|
||||
new classindex = ClassGetRandomClass(ZR_CLASS_TEAM_ZOMBIES);
|
||||
ClassSelected[client][ZR_CLASS_TEAM_ZOMBIES] = classindex;
|
||||
ClassGetName(client, classname, sizeof(classname));
|
||||
}
|
||||
else
|
||||
{
|
||||
classindex = ClassGetRandomClass(ZR_CLASS_TEAM_HUMANS);
|
||||
new classindex = ClassGetRandomClass(ZR_CLASS_TEAM_HUMANS);
|
||||
ClassSelected[client][ZR_CLASS_TEAM_HUMANS] = classindex;
|
||||
ClassGetName(client, classname, sizeof(classname));
|
||||
}
|
||||
|
@ -551,8 +551,6 @@ bool:ClassReloadPlayerCache(client, classindex, cachetype = ZR_CLASS_CACHE_MODIF
|
||||
*/
|
||||
ClassClientSetDefaultIndexes(client = -1)
|
||||
{
|
||||
new classindex = GetDefaultClassIndex(); // Old class system. Not removed for backwards compatibility.
|
||||
|
||||
// Get indexes.
|
||||
new zombieindex = ClassGetDefaultSpawnClass(ZR_CLASS_TEAM_ZOMBIES);
|
||||
new humanindex = ClassGetDefaultSpawnClass(ZR_CLASS_TEAM_HUMANS);
|
||||
@ -603,10 +601,6 @@ ClassClientSetDefaultIndexes(client = -1)
|
||||
// Check if a client is specified.
|
||||
if (client > 0)
|
||||
{
|
||||
// Set the old array for backwards compatibility while introducing the
|
||||
// new class system.
|
||||
pClass[client] = classindex;
|
||||
|
||||
ClassSelected[client][ZR_CLASS_TEAM_ZOMBIES] = zombieindex;
|
||||
ClassSelected[client][ZR_CLASS_TEAM_HUMANS] = humanindex;
|
||||
ClassSelected[client][ZR_CLASS_TEAM_ADMINS] = adminindex;
|
||||
@ -619,10 +613,6 @@ ClassClientSetDefaultIndexes(client = -1)
|
||||
// No client specified. Loop through all players.
|
||||
for (new clientindex = 1; clientindex <= MAXPLAYERS; clientindex++)
|
||||
{
|
||||
// Set the old array for backwards compatibility while introducing the
|
||||
// new class system.
|
||||
pClass[clientindex] = classindex;
|
||||
|
||||
ClassSelected[clientindex][ZR_CLASS_TEAM_ZOMBIES] = zombieindex;
|
||||
ClassSelected[clientindex][ZR_CLASS_TEAM_HUMANS] = humanindex;
|
||||
ClassSelected[clientindex][ZR_CLASS_TEAM_ADMINS] = adminindex;
|
||||
|
Reference in New Issue
Block a user