Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Update Scene sensibly as part of sim instead in inside draw
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 30, 2023
1 parent b5cd499 commit c996ee7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ namespace RTE {
g_LuaMan.Update();
g_ActivityMan.Update();

if (g_SceneMan.GetScene()) {
g_SceneMan.GetScene()->Update();
}

g_LuaMan.ClearScriptTimings();
g_MovableMan.Update();
g_PerformanceMan.UpdateSortedScriptTimings(g_LuaMan.GetScriptTimings());
Expand Down
5 changes: 0 additions & 5 deletions Managers/SceneMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2773,11 +2773,6 @@ void SceneMan::Update(int screenId) {

m_LastUpdatedScreen = screenId;

// Update the scene, only if doing the first screen, since it only needs done once per update.
if (screenId == 0) {
m_pCurrentScene->Update();
}

const Vector &offset = g_CameraMan.GetOffset(screenId);
m_pMOColorLayer->SetOffset(offset);
m_pMOIDLayer->SetOffset(offset);
Expand Down

0 comments on commit c996ee7

Please sign in to comment.