A3Wasteland / ArmA3_Wasteland.Stratis

A3Wasteland is a survival sandbox mission for Arma 3 where two teams and independent players fight for survival. Built in collaboration between GoT, TPG, KoS, 404Games, and others. –
http://a3wasteland.com/
GNU Affero General Public License v3.0
39 stars 79 forks source link

Makes glitching into objects harder when exiting a vehicle #111

Closed jacleland closed 5 years ago

jacleland commented 5 years ago

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.

jacleland commented 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.

AgentRev commented 5 years ago
jacleland commented 5 years ago

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?