2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00

Improve spawn spot randomization in multiplayer.

This commit is contained in:
Andrey Akhmichin 2024-01-20 10:45:01 +05:00
parent d77a7e4753
commit 538e3a84d7

View File

@ -2718,7 +2718,7 @@ edict_t *EntSelectSpawnPoint( CBaseEntity *pPlayer )
{
pSpot = g_pLastSpawn;
// Randomize the start spot
for( int i = RANDOM_LONG( 1, 5 ); i > 0; i-- )
for( int i = RANDOM_LONG( 1, 9 ); i > 0; i-- )
pSpot = UTIL_FindEntityByClassname( pSpot, "info_player_deathmatch" );
if( FNullEnt( pSpot ) ) // skip over the null point
pSpot = UTIL_FindEntityByClassname( pSpot, "info_player_deathmatch" );