File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
src/game/server/infclass/entities Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,15 @@ void CEngineerWall::Snap(int SnappingClient)
102102 if (!DoSnapForClient (SnappingClient))
103103 return ;
104104
105+ if (!HasSecondPosition ())
106+ {
107+ const CInfClassPlayer *pDestPlayer = GameController ()->GetPlayer (SnappingClient);
108+ if (pDestPlayer && !pDestPlayer->IsHuman ())
109+ {
110+ return ;
111+ }
112+ }
113+
105114 if (Server ()->GetClientInfclassVersion (SnappingClient))
106115 {
107116 CNetObj_InfClassObject *pInfClassObject = SnapInfClassObject ();
Original file line number Diff line number Diff line change @@ -126,6 +126,15 @@ void CLooperWall::Snap(int SnappingClient)
126126 if (!DoSnapForClient (SnappingClient))
127127 return ;
128128
129+ const CInfClassPlayer *pDestPlayer = GameController ()->GetPlayer (SnappingClient);
130+ if (!HasSecondPosition ())
131+ {
132+ if (pDestPlayer && !pDestPlayer->IsHuman ())
133+ {
134+ return ;
135+ }
136+ }
137+
129138 if (Server ()->GetClientInfclassVersion (SnappingClient))
130139 {
131140 CNetObj_InfClassObject *pInfClassObject = SnapInfClassObject ();
@@ -161,8 +170,7 @@ void CLooperWall::Snap(int SnappingClient)
161170 return ;
162171 }
163172
164- const CInfClassPlayer *pPlayer = GameController ()->GetPlayer (SnappingClient);
165- const bool AntiPing = pPlayer && pPlayer->GetAntiPingEnabled ();
173+ const bool AntiPing = pDestPlayer && pDestPlayer->GetAntiPingEnabled ();
166174 vec2 dirVec = vec2 (m_Pos.x -m_Pos2.x , m_Pos.y -m_Pos2.y );
167175 vec2 dirVecN = normalize (dirVec);
168176 vec2 dirVecT = vec2 (dirVecN.y * g_Thickness * 0 .5f , -dirVecN.x * g_Thickness * 0 .5f );
You can’t perform that action at this time.
0 commit comments