OpenApoc / OpenApoc

Opensource rebuild of the XCOM Apocalypse Engine that requires the original files to run.
http://openapoc.org
GNU General Public License v3.0
508 stars 99 forks source link

Multi-Tile Units in Battlescape can spawn, or move part of their form, outside of the map limits causing a "Incorrect Tile Coordinates" CTD #1007

Open Empy5657 opened 3 years ago

Empy5657 commented 3 years ago

Still currently on a previous build (998) so that you know it isn't related to most recent merging. Basically I saved the game and got the error below with a CTD. Reloaded the game and it loaded in fine, then went to end the turn and it immediately CTD'd again with the same error message.

Capture

Empy5657 commented 3 years ago

Oh should mention this was during a combat mission, not geoscape!

makus82 commented 3 years ago

log file is better the most )

Empy5657 commented 3 years ago

This was the only log file I could find and it does document the crash, hope it helps! Also attached the game file. Let me know if you need anything else.

log.txt

save_Bugsave 1.zip

Empy5657 commented 3 years ago

Happened again in a different mission, log attached for that one too. This one didn't happen when saving, however, but just popped up and CTD'd without warning.

log.txt

FilmBoy84 commented 2 years ago

I have finally been able to recreate this, and ascertain the problem

It was also witness, live, on Quickmind's stream of 23rd October 2021 (See stream video for this date at around 5:57:50 and it's resolution a few minutes later https://www.twitch.tv/videos/1184682999 )

Multi-tile units, such as Multiworms, Psimorph, Megaspawn, etc. Can either spawn in a position where part of their form is outside of the confines of the map - causing a "Incorrect Tile Coordinates" crash

OR

Multi-tile units, as they move around, can have part or all of their form move outside the confines of the map (such is the case in the save attached above - one multiworm - see image below is positioned partly outside of the map, ending the turn causes the crash. Additionally, there is a second multiworm with the Anthropods who also, in some instances, attempts to move out of the map due to his bulk)

image

We need to implement a mechanism to both the spawn conditions AND pathfinding that checks the size of a unit and does not permit it to spawn in areas that it cannot fit or travel paths that force part of it's form beyond the map boundaries - or indeed any wall/object they may collide with

Spawn process should probably be altered to place larger units FIRST then add the smaller units afterwards