This PR aims to have consistent requirements for spawning spaces of different vehicles and units.
Before:
Every piece of code used different spawning space requirements for vehicles and units. Sometimes it was far too little (like 0m for helicopters) which could result in explosions right at spawn. Sometimes it was a bit too much (like 5m within 20m radius for player's recruits) which could lead to units not spawning at all (see also #33).
After:
Space requirements are now consistent throughout the code.
5m, fallback 0m for quadbikes
10m, fallback 0m for other ground vehicles
15m, fallback 8m for helicopters
20m, fallback 10m for planes
50m, fallback 20m for boats
5m, fallback 2m for quadcopters
2m for people who are defending a location
1m for other people
0m for people that immediately get moved into a vehicle
Also the road search range for convoys was increased and the spawn range for virtual units meant for loadout editing was increased.
Bugs fixed:
Sometimes a vehicle might have spawned in a space that is too small for it.
Sometimes a unit could not be spawned in tight spaces even though there was enough space
Convoys often spawned offroad even though there was a road next to it
Possible caveats:
It could be that in rare cases a land vehicle would spawn on water where previously it did not. Those few space checks that used SHK_pos also checked if the position is on land.
This PR aims to have consistent requirements for spawning spaces of different vehicles and units.
Before: Every piece of code used different spawning space requirements for vehicles and units. Sometimes it was far too little (like 0m for helicopters) which could result in explosions right at spawn. Sometimes it was a bit too much (like 5m within 20m radius for player's recruits) which could lead to units not spawning at all (see also #33).
After: Space requirements are now consistent throughout the code. 5m, fallback 0m for quadbikes 10m, fallback 0m for other ground vehicles 15m, fallback 8m for helicopters 20m, fallback 10m for planes 50m, fallback 20m for boats 5m, fallback 2m for quadcopters 2m for people who are defending a location 1m for other people 0m for people that immediately get moved into a vehicle
Also the road search range for convoys was increased and the spawn range for virtual units meant for loadout editing was increased.
Bugs fixed:
Possible caveats:
More info in commit messages.