rekterakathom / Overthrow

A dynamic and persistent revolution platform for Arma 3
https://steamcommunity.com/sharedfiles/filedetails/?id=2824471652
GNU General Public License v2.0
14 stars 9 forks source link

Refactor and remove SHK_pos library entirely #65

Closed Tuupertunut closed 1 year ago

Tuupertunut commented 1 year ago

Before: SHK_pos library was included in overthrow codebase at functions/geography/SHK_pos. It included many functions, but the only one used was SHK_pos_fnc_pos, sometimes correctly and sometimes not. It was used for two purposes:

After: SHK_pos library is now removed from the codebase and all remaining usages have been refactored to use getPos and random. Mostly the new code is more readable. The SHK_pos_fnc_pos was a slow function, doing all kinds of unnecessary checks, so the code should also be much faster.

Additionally some bugs were fixed, where the SHK_pos arguments were in wrong order, causing things to happen at wrong positions.

Possible drawbacks:

More info in the commit messages.