Vanilla-Conquer
Vanilla-Conquer copied to clipboard
[TD] Crash Bug in Commit e6dab4c (Oblelisk/AGT crew spawn location fix)
Commit e6dab4c contains a crash bug for TD. The added code uses a COORDINATE as an index into Map[]. But that's an array of CellClass's, so it should be indexed with a CELL. The value of a COORDINATE type is likely way past the end of the array. (Hence, crash.) The fix is to call Coord_Cell() so we can pass a CELL value to Map[].
(Not an issue in RA because there's a special override of [] to handle when it's passed a COORDINATE that calls Coord_Cell() for you. Though perhaps it should be changed too anyway as a bad coding practice?)
Thanks for pointing this out. VanillaTD builds from the past few months were prone to crashing. I applied this one line fix and VanillaTD now runs for hours without any problems.
This might explain why when the AI sells everything off some minigunners spawns in the map borders in the DS port.