Imported fix from dev: 686:b0fc2136d03a - Fixed class attributes applied to early (moved to spawn post event). FOV (and possibly other stuff) was reset on spawn.
This commit is contained in:
parent
cb6f72c89d
commit
07b4ed9373
|
@ -214,7 +214,8 @@ public Action:EventPlayerSpawnPost(Handle:timer, any:client)
|
|||
// Forward event to modules.
|
||||
WeaponsOnClientSpawnPost(client);
|
||||
SEffectsOnClientSpawnPost(client);
|
||||
SpawnProtectOnClientSpawnPost(client);
|
||||
ClassOnClientSpawnPost(client);
|
||||
SpawnProtectOnClientSpawnPost(client); // Must be executed after class attributes are applied.
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -247,9 +247,10 @@ ClassOnClientSpawn(client)
|
|||
}
|
||||
}
|
||||
|
||||
// Apply class attributes for the active class.
|
||||
// Load class attributes for the active class.
|
||||
ClassReloadPlayerCache(client, ClassGetActiveIndex(client));
|
||||
ClassApplyAttributes(client);
|
||||
|
||||
// Note: Class attributes are applied in ClassOnClientSpawnPost.
|
||||
|
||||
// Check if instant class change cvar is set.
|
||||
new Float:instantspawn = GetConVarFloat(g_hCvarsList[CVAR_CLASSES_CHANGE_TIMELIMIT]);
|
||||
|
@ -268,6 +269,23 @@ ClassOnClientSpawn(client)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Client have just spawned (delayed event).
|
||||
*
|
||||
* @param client The client index.
|
||||
*/
|
||||
ClassOnClientSpawnPost(client)
|
||||
{
|
||||
// Check if there are no valid classes. Block this event if classes aren't
|
||||
// done loading.
|
||||
if (!ClassValidated)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ClassApplyAttributes(client);
|
||||
}
|
||||
|
||||
/**
|
||||
* Client died. Stops timers and reset certain attributes. Call this event to
|
||||
* clean up class related stuff.
|
||||
|
|
Loading…
Reference in New Issue
Block a user