Savage-Game-Design / Mike-Force

Mike Force is cooperative, capture-the-island style gamemode for the Arma 3: S.O.G. Prairie Fire CDLC.
Other
31 stars 32 forks source link

Sites: Estimate terrain objects bounding box overlap with site for hiding rocks etc #181

Open dijksterhuis opened 2 months ago

dijksterhuis commented 2 months ago

TL;DR stop mortars spawned inside rocks soft locking a zone by removing ROCK/ROCKS/HIDE terrain objects with a bounding box estimation.

Estimates whether nearby terrain objects will overlap/intersect with the spawned site, then hides them. Also hides any terrain objects directly on top of those found with bounding box search, otherwise we end up with a bunch of floating bushes. Can be expanded to other kinds of terrain objects on a per site basis.

Requires more testing on my end for both functionality and performance ... so putting up as a draft PR for now.

TODO

screenshots

notes about screenshots

debug markers

image

terrain hiding

image

dijksterhuis commented 2 months ago

Please can someone confirm that vn_mf_sites_load is non-functional?

Did a grep for wherever the sites data is supposed to get set in the profile DB but came up with nothing.

$ find . -name "*.sqf" -exec grep -Hn 'call para_s_fnc_profile_db' {} \; | grep sites
./mission/functions/systems/sites/fn_sites_load.sqf:19:(["GET", "sites", []] call para_s_fnc_profile_db) params ["","_sitesData"];