diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_buildable.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 3ed1ce6..c82677e 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1347,6 +1347,7 @@ qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideEx vec3_t traceOrigin, origin, forward, angles; qboolean unlink; trace_t tr; + int i = 0; BG_FindBBoxForBuildable( BA_A_HOVEL, hovelMins, hovelMaxs ); BG_FindBBoxForClass( player->client->ps.stats[ STAT_PCLASS ], @@ -1373,6 +1374,9 @@ qboolean AHovel_Blocked( gentity_t *hovel, gentity_t *player, qboolean provideEx origin[ 2 ] >= globalMins[ 2 ] && origin[ 2 ] <= globalMaxs[ 2 ] ) { VectorMA( origin, 2.0f, forward, origin ); + + if ( i++ > 500 ) // Just in case.. + break; } // Make sure the spot is actually reachable. |