Skip to content

Commit

Permalink
Reset pitch on moving VTOLs after saveload
Browse files Browse the repository at this point in the history
In case they were over a steep slope during save creation.
  • Loading branch information
KJeff01 authored and pull[bot] committed Jan 13, 2024
1 parent 27d05b3 commit 103238e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game.cpp
Expand Up @@ -5734,6 +5734,11 @@ static bool loadSaveDroid(const char *pFileName, DROID **ppsCurrentDroidLists)
Vector2i tmp = ini.vector2i("bumpPosition");
psDroid->sMove.bumpPos = Vector3i(tmp.x, tmp.y, 0);

if (isVtolDroid(psDroid) && psDroid->sMove.Status != MOVEINACTIVE)
{
psDroid->rot.pitch = 0;
}

// Recreate path-finding jobs
if (psDroid->sMove.Status == MOVEWAITROUTE)
{
Expand Down

0 comments on commit 103238e

Please sign in to comment.