mirror of https://github.com/FWGS/hlsdk-xash3d
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…
Reference in New Issue