diff --git a/src/game/server/entities/dragger_beam.cpp b/src/game/server/entities/dragger_beam.cpp index 500318ee9..3be6a81b8 100644 --- a/src/game/server/entities/dragger_beam.cpp +++ b/src/game/server/entities/dragger_beam.cpp @@ -123,3 +123,8 @@ void CDraggerBeam::Snap(int SnappingClient) GameServer()->SnapLaserObject(CSnapContext(SnappingClientVersion), GetID(), m_Pos, TargetPos, StartTick, -1, LASERTYPE_DOOR); } + +void CDraggerBeam::SwapClients(int Client1, int Client2) +{ + m_ForClientID = m_ForClientID == Client1 ? Client2 : m_ForClientID == Client2 ? Client1 : m_ForClientID; +} diff --git a/src/game/server/entities/dragger_beam.h b/src/game/server/entities/dragger_beam.h index ffce1f2b1..ce3f65d98 100644 --- a/src/game/server/entities/dragger_beam.h +++ b/src/game/server/entities/dragger_beam.h @@ -38,6 +38,7 @@ public: void Reset() override; void Tick() override; void Snap(int SnappingClient) override; + void SwapClients(int Client1, int Client2) override; }; #endif // GAME_SERVER_ENTITIES_DRAGGER_BEAM_H diff --git a/src/game/server/entities/plasma.cpp b/src/game/server/entities/plasma.cpp index cf706da4b..b3b92968f 100644 --- a/src/game/server/entities/plasma.cpp +++ b/src/game/server/entities/plasma.cpp @@ -122,3 +122,8 @@ void CPlasma::Snap(int SnappingClient) GameServer()->SnapLaserObject(CSnapContext(SnappingClientVersion), GetID(), m_Pos, m_Pos, m_EvalTick, -1, m_Freeze ? LASERTYPE_FREEZE : LASERTYPE_RIFLE); } + +void CPlasma::SwapClients(int Client1, int Client2) +{ + m_ForClientID = m_ForClientID == Client1 ? Client2 : m_ForClientID == Client2 ? Client1 : m_ForClientID; +} diff --git a/src/game/server/entities/plasma.h b/src/game/server/entities/plasma.h index f4ca948de..b961b961e 100644 --- a/src/game/server/entities/plasma.h +++ b/src/game/server/entities/plasma.h @@ -40,6 +40,7 @@ public: void Reset() override; void Tick() override; void Snap(int SnappingClient) override; + void SwapClients(int Client1, int Client2) override; }; #endif // GAME_SERVER_ENTITIES_PLASMA_H