From 02c837e29dc00b194e0e11f5fb04aac79899c0c8 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 5 Jan 2002 01:32:53 +0000 Subject: Fixed floatmines --- src/cgame/cg_buildable.c | 15 +++++++++------ src/game/g_buildable.c | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 03123e3c..9f91b56b 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -429,13 +429,16 @@ void CG_Buildable( centity_t *cent ) ent.axis[ 1 ][ 1 ] = -ent.axis[ 1 ][ 1 ]; ent.axis[ 1 ][ 2 ] = -ent.axis[ 1 ][ 2 ]; - VectorMA( ent.origin, -TRACE_DEPTH, surfNormal, end ); - VectorMA( ent.origin, 1.0f, surfNormal, start ); - CG_CapTrace( &tr, start, mins, maxs, end, es->number, MASK_PLAYERSOLID ); - VectorMA( ent.origin, tr.fraction * -TRACE_DEPTH, surfNormal, ent.origin ); - - VectorCopy( ent.origin, ent.lightingOrigin ); + if( es->pos.trType == TR_STATIONARY ) + { + VectorMA( ent.origin, -TRACE_DEPTH, surfNormal, end ); + VectorMA( ent.origin, 1.0f, surfNormal, start ); + CG_CapTrace( &tr, start, mins, maxs, end, es->number, MASK_PLAYERSOLID ); + VectorMA( ent.origin, tr.fraction * -TRACE_DEPTH, surfNormal, ent.origin ); + } + VectorCopy( ent.origin, ent.oldorigin ); // don't positionally lerp at all + VectorCopy( ent.origin, ent.lightingOrigin ); ent.hModel = cg_buildables[ es->modelindex ].models[ 0 ]; diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index eb5312a3..d0c6a615 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2027,9 +2027,9 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin built->s.angles[ PITCH ] = 0.0f; built->s.angles2[ YAW ] = angles[ YAW ]; built->s.pos.trType = BG_FindTrajectoryForBuildable( buildable ); + built->s.pos.trTime = level.time; built->physicsBounce = BG_FindBounceForBuildable( buildable ); built->s.groundEntityNum = -1; - built->s.pos.trTime = level.time; if( builder->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBING ) { -- cgit