summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-06-26 15:26:38 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-06-26 15:35:42 +0200
commit79a5d1bb793b2b90e84bd5b2f4fa07d21bcc6e56 (patch)
tree76731e03127369b3d924a4f7394705e37b6fb7ba
parent1d197378168a3cb9edbda57899976084a9121e7b (diff)
Bug fixes for Wraith.
-rw-r--r--src/cgame/cg_event.c18
-rw-r--r--src/cgame/cg_predict.c2
-rw-r--r--src/cgame/cg_view.c3
-rw-r--r--src/game/bg_pmove.c10
4 files changed, 24 insertions, 9 deletions
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 );
}
diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c
index 7fec761..ce4270f 100644
--- a/src/cgame/cg_predict.c
+++ b/src/cgame/cg_predict.c
@@ -909,8 +909,6 @@ void CG_PredictPlayerState( void )
cg.predictedPlayerState.groundEntityNum,
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_view.c b/src/cgame/cg_view.c
index 9145b32..783a1e2 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -1439,6 +1439,9 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
cg.renderingThirdPerson = ( cg_thirdPerson.integer || ( cg.snap->ps.stats[ STAT_HEALTH ] <= 0 ) ||
( cg.chaseFollow && cg.snap->ps.pm_flags & PMF_FOLLOW) );
+ cg.warping = ( cg.predictedPlayerEntity.currentState.eFlags & EF_WARPING ) &&
+ cg.predictedPlayerState.weapon == WP_ALEVEL1;
+
// update speedometer
CG_AddSpeed( );
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 0d8bfda..4fd73f1 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -3857,11 +3857,11 @@ void PM_WraithMechanics( void )
if( pm->ps->stats[ STAT_MISC ] < 0 )
{
- if( target && pm->ps->weaponTime <= 0 )
+ /*if( target && pm->ps->weaponTime <= 0 )
{
PM_AddEvent( EV_NOAMMO );
pm->ps->weaponTime += 500;
- }
+ }*/
target = qfalse;
force_exit = qtrue;
@@ -3877,11 +3877,11 @@ void PM_WraithMechanics( void )
{
if( pm->ps->stats[ STAT_MISC ] < LEVEL1_WARP_MIN_TIME )
{
- if( pm->ps->weaponTime <= 0 )
+ /*if( pm->ps->weaponTime <= 0 )
{
PM_AddEvent( EV_NOAMMO );
pm->ps->weaponTime += 500;
- }
+ }*/
goto done;
}
@@ -3920,7 +3920,7 @@ done:
if( pm->ps->eFlags & EF_WARPING )
{
- pm->tracemask = MASK_SOLID;
+ pm->tracemask = MASK_DEADSOLID;
pm->ps->stats[ STAT_MISC ] -= pml.msec;
pm->cmd.buttons &= ~BUTTON_ATTACK;
}