diff options
author | M. Kristall <mkpdev@gmail.com> | 2009-10-03 12:24:50 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:56 +0000 |
commit | 198186fb98445ef4f27e89bd7489824500ab6eec (patch) | |
tree | 6be1b9a7baf431ad137093d4067f3f81e872901c | |
parent | a1a151d5038109660048e557f2d51cbd078d18e7 (diff) |
* (bug 3607) Hopefully fix the remaining hovel issues
-rw-r--r-- | src/game/g_buildable.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 3a8fb639..8a80adf0 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1242,9 +1242,6 @@ qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideEx //compute a place up in the air to start the real trace trap_Trace( &tr, origin, mins, maxs, start, player->s.number, MASK_PLAYERSOLID ); - if( tr.startsolid ) - return qtrue; - VectorMA( origin, ( HOVEL_TRACE_DEPTH * tr.fraction ) - 1.0f, normal, start ); VectorMA( origin, -HOVEL_TRACE_DEPTH, normal, end ); @@ -1254,15 +1251,19 @@ qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideEx trap_Trace( &tr, origin, mins, maxs, origin, player->s.number, MASK_PLAYERSOLID ); + if( tr.fraction < 1.0f ) + return qtrue; + if( provideExit ) { G_SetOrigin( player, origin ); VectorCopy( origin, player->client->ps.origin ); - VectorCopy( vec3_origin, player->client->ps.velocity ); + // nudge + VectorMA( normal, 200.0f, forward, player->client->ps.velocity ); G_SetClientViewAngle( player, angles ); } - return tr.fraction < 1.0f; + return qfalse; } /* |