Skip to content

Commit

Permalink
New GameController interface: OnPreEntitySnap
Browse files Browse the repository at this point in the history
  • Loading branch information
Hu1night committed Apr 5, 2024
1 parent b4985c9 commit 4027efd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/game/server/gamecontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ class IGameController
*/
virtual void OnSnap(int SnappingClient){};

virtual void OnPreEntitySnap(int SnappingClient, int OtherMode){};

// =================
// GAME EVENTS
// =================
Expand Down
2 changes: 2 additions & 0 deletions src/game/server/gameworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void CGameWorld::RemoveEntity(CEntity *pEnt)
//
void CGameWorld::Snap(int SnappingClient, int OtherMode)
{
Controller()->OnPreEntitySnap(SnappingClient, OtherMode);

for(auto *pEnt : m_apFirstEntityTypes)
for(; pEnt;)
{
Expand Down

0 comments on commit 4027efd

Please sign in to comment.