Closed jacleland closed 5 years ago
This is probably obvious, but I should point out that the default condition is to leave the player position unchanged when it is both a) not considered safe and b) no suitable position can be found within 5m of the vehicle. This makes the effect 'passive' in that no position change will be made if the player is either in a safe position or if a safe, non-glitched position cannot be found given the BIS_fnc params.
BIS_fnc_findSafePos
contains a for-loop with 3000 iterations, I don't think it's a good idea to make this server-sided. It would be much better suited in client\clientEvents\getOutVehicle.sqf
.Thanks for the feedback. I've tried a number of vehicles, but not the heli/building condition. Do you know of another way to check for collisions with terrain or editor-placed objects in situations like this? Because vehicle in/out is uncommon, I didn't notice a performance hit from the function. I have unpacked this func in the past and lowered to 500 iterations, but I'm aware of the looping to which you refer. Perhaps a version that's client-sided with a modified findSafePos for, say, 100-200 random checks?
This code change checks the unit's current position after exiting the vehicle using BIS_fnc_findSafePos with a very small radius. If the position returned is default (map center x,y,z), then the code tries to find a safe position from the vehicle within 5m. If found, it moves the player unit to the new location.