Spectate: Only alter spectate modes on CSS.
CSGO doesnt have any broken spectate modes.
This commit is contained in:
parent
c28af04bbd
commit
2fad81dc0e
@ -51,17 +51,20 @@ public void OnMapStart()
|
||||
|
||||
public void OnClientSettingsChanged(int client)
|
||||
{
|
||||
static char sSpecMode[8];
|
||||
GetClientInfo(client, "cl_spec_mode", sSpecMode, sizeof(sSpecMode));
|
||||
|
||||
Obs_Mode iObserverMode = view_as<Obs_Mode>(StringToInt(sSpecMode));
|
||||
|
||||
// Skip broken OBS_MODE_POI
|
||||
if (iObserverMode == OBS_MODE_POI)
|
||||
if(GetEngineVersion() == Engine_CSS)
|
||||
{
|
||||
ClientCommand(client, "cl_spec_mode %d", OBS_MODE_ROAMING);
|
||||
if(IsClientInGame(client) && !IsPlayerAlive(client))
|
||||
SetEntProp(client, Prop_Send, "m_iObserverMode", OBS_MODE_ROAMING);
|
||||
static char sSpecMode[8];
|
||||
GetClientInfo(client, "cl_spec_mode", sSpecMode, sizeof(sSpecMode));
|
||||
|
||||
Obs_Mode iObserverMode = view_as<Obs_Mode>(StringToInt(sSpecMode));
|
||||
|
||||
// Skip broken OBS_MODE_POI
|
||||
if (iObserverMode == OBS_MODE_POI)
|
||||
{
|
||||
ClientCommand(client, "cl_spec_mode %d", OBS_MODE_ROAMING);
|
||||
if(IsClientInGame(client) && !IsPlayerAlive(client))
|
||||
SetEntProp(client, Prop_Send, "m_iObserverMode", OBS_MODE_ROAMING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user