jacobhinds said:
It's just as precise, but the values are essentially arbitrary because they're squared. If all you need is to compare two squared distances then it should work fine, but if you need something that calculates something based on distance (like troops gaining health based on how close they are to a medic troop, for example) then it's basically useless.
you can use it with ranges. Example:
100% healing if closer than 3 m
50% healing if closer than 10m
...
You can't use the distance value (sq) in direct calculation, like trying to sum up two distances.
Remember this is a optimization and you should only use it if your code can impact performance. If you are doing a simple one time calculation, no reason for it. If you have a trigger that does hundreds of calculations per second, each CPU cycle matters.
emir512 said:
Friend! If you read it right, I'm trying to merge freelancer not diplomacy and freelancer latest source was made and tested for 1143 not with any later one. I have diplomacy source for 1168 with many brand new features.
I mentioned diplomacy as it has freelancer merged on it, but you could also use other mods as your base. Floris, Freelancer (full modsys, not the modmerger), etc. There are some newer updates on the mod forums for 1.166+ version, so you could check them and talk to the devs (modders) to ask for the source.
But of course if you want to do it manually that is a option as well. Note that is unlike your game will run well if you use 1.143 modsys with the current engine (1.16
, so you will need a old game version as well.