summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2007-09-26 19:39:08 +0000
committerTim Angus <tim@ngus.net>2007-09-26 19:39:08 +0000
commitb17d871269828bbd12c2790ee5ddafa54af8ed9b (patch)
tree88852c09529e2cd66a8fb129a14e5cd40b9d9dd4 /src
parent78096eccbe24730e829a55460fa4dc5b839716a5 (diff)
* (bug 3305) Remove inappropriate SnapVector
* Don't display creep over a certain height
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_buildable.c5
-rw-r--r--src/game/g_physics.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index 7f2b2edf..b8d03a48 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -95,6 +95,7 @@ void CG_HumanBuildableExplosion( vec3_t origin, vec3_t dir )
#define CREEP_SIZE 64.0f
+#define CREEP_DISTANCE 64.0f
/*
==================
@@ -131,7 +132,7 @@ static void CG_Creep( centity_t *cent )
}
VectorCopy( cent->currentState.origin2, temp );
- VectorScale( temp, -4096, temp );
+ VectorScale( temp, -CREEP_DISTANCE, temp );
VectorAdd( temp, cent->lerpOrigin, temp );
CG_Trace( &tr, cent->lerpOrigin, NULL, NULL, temp, cent->currentState.number, MASK_PLAYERSOLID );
@@ -140,7 +141,7 @@ static void CG_Creep( centity_t *cent )
size = CREEP_SIZE * frac;
- if( size > 0.0f )
+ if( size > 0.0f && tr.fraction < 1.0f )
CG_ImpactMark( cgs.media.creepShader, origin, cent->currentState.origin2,
0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, size, qtrue );
}
diff --git a/src/game/g_physics.c b/src/game/g_physics.c
index b5221352..58c64878 100644
--- a/src/game/g_physics.c
+++ b/src/game/g_physics.c
@@ -62,9 +62,6 @@ static void G_Bounce( gentity_t *ent, trace_t *trace )
if( VectorLength( ent->s.pos.trDelta ) < 10 )
{
VectorMA( trace->endpos, 0.5f, trace->plane.normal, trace->endpos ); // make sure it is off ground
- // Never allow origin to be snapped lower (buildables fall through map bug)
- trace->endpos[2] = (float)ceil(trace->endpos[2]);
- SnapVector( trace->endpos );
G_SetOrigin( ent, trace->endpos );
ent->s.groundEntityNum = trace->entityNum;
VectorCopy( trace->plane.normal, ent->s.origin2 );