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

Evicted sea triad probe teams can be returned to a landlocked base #3

Open b-casey opened 4 years ago

b-casey commented 4 years ago

When the "Interrogate them, then return them unharmed." option of ENEMYPROBE is selected, the game moves the offending probe to the base with the largest population size controlled by the evicted probe's faction. The code doesn't take into account whether the probe has a sea based chassis allowing a sea probe to end up in a land locked base.

Reported by: bvanevery See: https://alphacentauri2.info/index.php?topic=21235.0 Issue found inside order_veh() function. See offsets: 00597021 - 00597044 Potential fix: Add a check for TRIAD value of the probe before base search call. If it is a sea unit then the base would also have to pass a call to is_port(). Edge case: what if faction has all their sea and port bases captured or destroyed with a sea probe still alive? Maybe move probe back into sea controlled territory of faction. Or closest unclaimed and unoccupied sea tile to probe essentially evicting it out of other faction's territory.