mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-06 20:14:44 +00:00
Use only 2 player heights while fixing the spawnpoint
This commit is contained in:
parent
0be0184c79
commit
259bd92fb6
@ -65,12 +65,12 @@ Vector FixupSpawnPoint(Vector spawn)
|
||||
{
|
||||
int i = 0;
|
||||
// predict that spawn point is almost correct
|
||||
while( i < 10 ) // 10 player heights
|
||||
while( i < 2 ) // 2 player heights
|
||||
{
|
||||
Vector point = spawn + Vector( 0, 0, 36 * i );
|
||||
TraceResult tr;
|
||||
UTIL_TraceHull( point, point, missile, 1, NULL, &tr );
|
||||
if( !tr.fStartSolid )
|
||||
UTIL_TraceHull( point, point, ignore_monsters, 1, NULL, &tr );
|
||||
if( !tr.fStartSolid && !tr.fAllSolid )
|
||||
return point;
|
||||
i = -i;
|
||||
if( i >= 0 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user