diff options
Diffstat (limited to 'src/game')
-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; } /* |