diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-06-26 11:34:41 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-06-26 13:17:24 +0200 |
commit | e99ab52825d6b713a12a8ee19b5eaa81e78db28e (patch) | |
tree | 6e05d09962f6c6109e799082de9f62796a5b905d /src/cgame | |
parent | 1895729b01532be9589d3606c331cc8f9ca9a9e3 (diff) |
More Wraith changes.
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 1 | ||||
-rw-r--r-- | src/cgame/cg_predict.c | 1 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 2 |
5 files changed, 8 insertions, 2 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 6328f42..15a5cc4 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -4143,7 +4143,7 @@ CG_DrawWarpOverlay */ static void CG_DrawWarpOverlay( void ) { - if( !( cg.predictedPlayerEntity.currentState.eFlags & EF_WARPING ) || + if( !cg.warping || cg.renderingThirdPerson ) { return; diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 4ce475e..4ce2b25 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -135,6 +135,9 @@ static void CG_Obituary( entityState_t *ent ) case MOD_SPITEFUL_ABCESS: message = "^5was raped by a Spiteful Abcess"; break; + case MOD_WARP_BLOCKED: + message = "^5warped into a wall"; + break; default: message = NULL; break; @@ -644,6 +647,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) ci = &cgs.clientinfo[ clientNum ]; if( ci->team != cg.snap->ps.stats[ STAT_TEAM ] && + cg.snap->ps.stats[ STAT_TEAM ] != TEAM_NONE && ( es->eFlags & EF_WARPING ) ) { warpingEnemyWraith = qtrue; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 5b8f8b0..91ea3a9 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1162,6 +1162,7 @@ typedef struct float viewQuake; + qboolean warping; qboolean warpExitBlocked; } cg_t; diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index aa62e4d..7fec761 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -910,6 +910,7 @@ void CG_PredictPlayerState( void ) cg.physicsTime, cg.time, cg.predictedPlayerState.origin ); + cg.warping = !!( cg.predictedPlayerEntity.currentState.eFlags & EF_WARPING ); cg.warpExitBlocked = cg.pmext.warpExitBlocked; // fire events and other transition triggered things diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 69b8b90..12c2d21 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1132,7 +1132,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent } - if( ps && ( cent->currentState.eFlags & EF_WARPING ) ) + if( ps && cg.warping ) { trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.warpingSound ); |