aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/server/baseentity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sp/src/game/server/baseentity.cpp')
-rw-r--r--sp/src/game/server/baseentity.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/sp/src/game/server/baseentity.cpp b/sp/src/game/server/baseentity.cpp
index edc00977..52316924 100644
--- a/sp/src/game/server/baseentity.cpp
+++ b/sp/src/game/server/baseentity.cpp
@@ -4524,6 +4524,17 @@ void CBaseEntity::Teleport( const Vector *newPosition, const QAngle *newAngles,
teleportList[i].pEntity->CollisionRulesChanged();
}
+ if ( IsPlayer() )
+ {
+ // Tell the client being teleported
+ IGameEvent *event = gameeventmanager->CreateEvent( "base_player_teleported" );
+ if ( event )
+ {
+ event->SetInt( "entindex", entindex() );
+ gameeventmanager->FireEventClientSide( event );
+ }
+ }
+
Assert( g_TeleportStack[index] == this );
g_TeleportStack.FastRemove( index );