diff --git a/_CleanupRequired/Spectate/scripting/Spectate.sp b/_CleanupRequired/Spectate/scripting/Spectate.sp index c43ec690..2da68e82 100644 --- a/_CleanupRequired/Spectate/scripting/Spectate.sp +++ b/_CleanupRequired/Spectate/scripting/Spectate.sp @@ -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(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(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); + } } }