Skip to content

Commit

Permalink
Save player camera pos in memory instead of writting original file
Browse files Browse the repository at this point in the history
The original behavior loaded the file, modified and saved back without
storing the camera in current mission in memory causing the saves
to not contain the new positions, now we simply leave the original file
alone unless is saved manually
  • Loading branch information
IonAgorria committed May 17, 2024
1 parent 9d4c0a0 commit b5b0c4c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Source/UserInterface/GameShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2541,11 +2541,7 @@ void GameShell::rememberPlayerCamera(terPlayer* player, const char* triggerName)
if(universe()->activePlayer()->isWorld())
return;

SavePrm data;
if(!CurrentMission.loadMission(data))
return;
data.manualData.saveCamera(player->playerStrategyIndex(), triggerName);
CurrentMission.saveMission(data, false);
savePrm().manualData.saveCamera(player->playerStrategyIndex(), triggerName);
}

void GameShell::setCountDownTime(int timeLeft) {
Expand Down

0 comments on commit b5b0c4c

Please sign in to comment.