From 79a5d1bb793b2b90e84bd5b2f4fa07d21bcc6e56 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 26 Jun 2015 15:26:38 +0200 Subject: Bug fixes for Wraith. --- src/cgame/cg_event.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/cgame/cg_event.c') diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index c459f32..c6ecaad 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -1007,7 +1007,14 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_AttachToPoint( &ps->attachment ); } - trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.warpEnterSound ); + if( clientNum == cg.predictedPlayerState.clientNum ) + { + trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.warpEnterSound ); + } + else + { + trap_S_StartSound( position, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.warpEnterSound ); + } CG_InduceViewQuake( cent->lerpOrigin, 15 ); } @@ -1025,7 +1032,14 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_AttachToPoint( &ps->attachment ); } - trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.warpExitSound ); + if( clientNum == cg.predictedPlayerState.clientNum ) + { + trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.warpExitSound ); + } + else + { + trap_S_StartSound( position, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.warpExitSound ); + } CG_InduceViewQuake( cent->lerpOrigin, 15 ); } -- cgit