diff options
author | M. Kristall <mkpdev@gmail.com> | 2009-10-03 11:46:59 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:20 +0000 |
commit | 13abb1e0d756f560eaf8c3dc8174fec01c263b9b (patch) | |
tree | a4dec2862d926b0aa1ba00387ff7ac5f8a2b3f72 /src | |
parent | e18c96ca9043acf36d77ae7fc40d6161639c708d (diff) |
* (bug 3629) OB1/buffer overflow (Azrael07)
* (bug 3290) Revert r966 and use a less hacky fix
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_buildable.c | 6 | ||||
-rw-r--r-- | src/game/g_main.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index c4b1f120..46630229 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1224,7 +1224,11 @@ 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 ); - VectorMA( origin, HOVEL_TRACE_DEPTH, normal, start ); + + if( tr.startsolid ) + return qtrue; + + VectorMA( origin, ( HOVEL_TRACE_DEPTH * tr.fraction ) - 1.0f, normal, start ); VectorMA( origin, -HOVEL_TRACE_DEPTH, normal, end ); trap_Trace( &tr, start, mins, maxs, end, player->s.number, MASK_PLAYERSOLID ); diff --git a/src/game/g_main.c b/src/game/g_main.c index 0aa5d017..a3123e17 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1390,7 +1390,7 @@ void CalculateRanks( void ) level.numLiveHumanClients; level.numteamVotingClients[ 0 ] = level.numHumanClients; level.numteamVotingClients[ 1 ] = level.numAlienClients; - P[ i + 1 ] = '\0'; + P[ i ] = '\0'; trap_Cvar_Set( "P", P ); if( g_friendlyFire.integer ) |