warzone2100
warzone2100 copied to clipboard
VTOL orientation and speed issue when loading saves
Out of mere luck while testing Cyp's patch to fix falling droids I had discovered what is the cause of ticket 4650.
So how can it be reproduced? It simply depends on what the terrain is like exactly below the VTOL. If a VTOL happens to be over non-flat ground it will be angled as they are placed at the Z height of the tile where it's xy coordinates are in reallyBuildDroid(). This, in addition, forces all flying objects to fly up from ground level as the save loads. It's not possible for VTOLs to ever be stuck in a downwards orientation from my tests.
I'll also note affected VTOLs still have their original speed for a moment until they reach the map height limit. Once reached, they become extremely slow as if the movement vector is being slowed down due to trying to gain height or something. Their orientation is also not corrected when they do land and only updates when ordered to move (source probably always expects VTOLs to never be rotated at odd angles while descending).
Here is the result of a VTOL that was over a steep cliff on sk-valley when a save was created and reloaded.