mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
change GetSpectatorTarget to work with OBS_MODE_POI & OBS_MODE_ROAMING
This commit is contained in:
parent
24e6a0b937
commit
1fd509cf52
@ -593,7 +593,7 @@ stock int GetSpectatorTarget(int client, int fallback = -1)
|
||||
{
|
||||
int iObserverMode = GetEntProp(client, Prop_Send, "m_iObserverMode");
|
||||
|
||||
if(iObserverMode >= 3 && iObserverMode <= 5)
|
||||
if (iObserverMode >= 3 && iObserverMode <= 7)
|
||||
{
|
||||
int iTarget = GetEntPropEnt(client, Prop_Send, "m_hObserverTarget");
|
||||
|
||||
|
||||
@ -282,17 +282,7 @@ void PlayEventSound(int client, bool everyone, char sound[PLATFORM_MAX_PATH])
|
||||
continue;
|
||||
}
|
||||
|
||||
if(everyone)
|
||||
{
|
||||
clients[count++] = i;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
int iObserverMode = GetEntProp(client, Prop_Send, "m_iObserverMode");
|
||||
|
||||
// add player and their spectators
|
||||
if(i == client || (IsClientObserver(i) && (iObserverMode >= 3 || iObserverMode <= 5) && GetEntPropEnt(i, Prop_Send, "m_hObserverTarget") == client))
|
||||
if (everyone || i == client || GetSpectatorTarget(i) == client)
|
||||
{
|
||||
clients[count++] = i;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user