Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // [RH] Select the deathmatch spawn spot farthest from everyone.
- static FPlayerStart *SelectFarthestDeathmatchSpot( ULONG ulPlayer, size_t selections )
- {
- fixed_t bestdistance = 0;
- FPlayerStart *bestspot = NULL;
- unsigned int i;
- for (i = 0; i < selections; i++)
- {
- fixed_t distance = PlayersRangeFromSpot (&deathmatchstarts[i]);
- // Did not find a spot.
- if ( distance == INT_MAX )
- continue;
- if ( G_CheckSpot( ulPlayer, &deathmatchstarts[i] ) == false )
- continue;
- if (distance > bestdistance)
- {
- bestdistance = distance;
- bestspot = &deathmatchstarts[i];
- }
- }
- return bestspot;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement