diff --git a/code/cgame/cg_event.c b/code/cgame/cg_event.c index c15c92e..4f8a6fb 100644 --- a/code/cgame/cg_event.c +++ b/code/cgame/cg_event.c @@ -978,7 +978,7 @@ void CG_EntityEvent(centity_t* cent, vec3_t position) case EV_PLAYER_TELEPORT_IN: DEBUGNAME("EV_PLAYER_TELEPORT_IN"); trap_S_StartSound(NULL, es->number, CHAN_AUTO, cgs.media.teleInSound); - if (clientNum != cg.predictedPlayerState.clientNum) + if (cg.snap && es->clientNum != cg.snap->ps.clientNum) { CG_SpawnEffect(position); } @@ -987,7 +987,7 @@ void CG_EntityEvent(centity_t* cent, vec3_t position) case EV_PLAYER_TELEPORT_OUT: DEBUGNAME("EV_PLAYER_TELEPORT_OUT"); trap_S_StartSound(NULL, es->number, CHAN_AUTO, cgs.media.teleOutSound); - if (es->clientNum != cg.predictedPlayerState.clientNum) + if (cg.snap && es->clientNum != cg.snap->ps.clientNum) { CG_SpawnEffect(position); }