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 committed Dec 2, 2023
1 parent bb5d641 commit 96a0d1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game.cpp
Original file line number Diff line number Diff line change
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 96a0d1f

Please sign in to comment.