File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
src/game/server/infclass/entities Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 1010#include < game/server/infclass/classes/infcplayerclass.h>
1111#include < game/server/infclass/entities/infccharacter.h>
1212#include < game/server/infclass/infcgamecontroller.h>
13+ #include < game/server/infclass/snap_filter.h>
1314
1415int CIcPickup::EntityId = CGameWorld::ENTTYPE_PICKUP;
1516
@@ -148,21 +149,8 @@ void CIcPickup::Snap(int SnappingClient)
148149 if (m_Type == EICPickupType::Invalid)
149150 return ;
150151
151- const CPlayer *pSnappingPlayer = GameServer ()->GetPlayer (SnappingClient);
152-
153- bool DoSnap = m_Owner < 0 || SnappingClient == m_Owner || SnappingClient == SERVER_DEMO_CLIENT;
154- if (!DoSnap)
155- {
156- if (pSnappingPlayer && pSnappingPlayer->GetTeam () == TEAM_SPECTATORS)
157- {
158- DoSnap = pSnappingPlayer->m_SpectatorId < 0 || pSnappingPlayer->m_SpectatorId == m_Owner;
159- }
160- }
161-
162- if (!DoSnap)
163- {
152+ if (!SnapFiltersPassed (this , SnappingClient, EFilterFlag::Follower | EFilterFlag::FreeSpec | EFilterFlag::Demo | EFilterFlag::Restricted))
164153 return ;
165- }
166154
167155 int NetworkType = -1 ;
168156 int Subtype = 0 ;
You can’t perform that action at this time.
0 commit comments