b-casey / OpenSMACX

A project to decompile SMAC/X to C++ with the long term goal of creating a full open source clone.
GNU General Public License v3.0
52 stars 4 forks source link

enemy_capabilities() issues #10

Open b-casey opened 4 years ago

b-casey commented 4 years ago

The problem stems from weap_strat() and arm_strat() using values inside PlayersData to make calculations for those same values inside enemy_capabilities() causing circular references. This in turn causes all sorts of inconsistent behavior related to the psi values.

There is also the possibility of inconsistent results dependent on the faction order. It seems to take a couple iterations of the capabilities function to normalize. This will need some more review.

The full original function can be found here: https://github.com/b-casey/OpenSMACX/blob/master/src/veh.cpp#L216

See this post for more details: https://alphacentauri2.info/index.php?topic=21414.msg123689