Skip to content

Commit 23dfe9c

Browse files
committed
Made camera positions up-to-date for script update
1 parent 706a91e commit 23dfe9c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ namespace RTE {
327327
g_NetworkServer.Update(true);
328328
serverUpdated = true;
329329
}
330+
330331
g_FrameMan.Update();
331332
g_LuaMan.Update();
332333
g_ActivityMan.Update();

Managers/FrameMan.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ namespace RTE {
233233
}
234234
m_ColorTablePruneTimer.Reset();
235235
}
236+
237+
// Update redundantly in sim update to ensure our values are exactly precise for the purposes of script GetOffset()
238+
int screenCount = (m_HSplit ? 2 : 1) * (m_VSplit ? 2 : 1);
239+
for (int playerScreen = 0; playerScreen < screenCount; ++playerScreen) {
240+
g_CameraMan.Update(playerScreen);
241+
}
236242
}
237243

238244
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)