Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Entities/MovableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ int MovableObject::ReloadScripts() {

// TODO consider getting rid of this const_cast. It would require either code duplication or creating some non-const methods (specifically of PresetMan::GetEntityPreset, which may be unsafe. Could be this gross exceptional handling is the best way to go.
MovableObject* movableObjectPreset = const_cast<MovableObject*>(dynamic_cast<const MovableObject*>(g_PresetMan.GetEntityPreset(GetClassName(), GetPresetName(), GetModuleID())));
if (this != movableObjectPreset) {
if (movableObjectPreset && this != movableObjectPreset) {
movableObjectPreset->ReloadScripts();
}

Expand Down
6 changes: 4 additions & 2 deletions Source/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ void RunGameLoop() {

g_PerformanceMan.StartPerformanceMeasurement(PerformanceMan::SimTotal);

g_LuaMan.Update();

g_UInputMan.Update();
g_ConsoleMan.Update();

// It is vital that server is updated after input manager but before activity because input manager will clear received pressed and released events on next update.
if (g_NetworkServer.IsServerModeEnabled()) {
Expand All @@ -328,7 +331,7 @@ void RunGameLoop() {
}

g_FrameMan.Update();
g_LuaMan.Update();

g_ActivityMan.Update();

if (g_SceneMan.GetScene()) {
Expand All @@ -347,7 +350,6 @@ void RunGameLoop() {
// It's in this spot to allow it to be set by UInputMan update and ConsoleMan update, and read from ActivityMan update.
g_PresetMan.ClearReloadEntityPresetCalledThisUpdate();

g_ConsoleMan.Update();
g_PerformanceMan.StopPerformanceMeasurement(PerformanceMan::SimTotal);

if (!g_ActivityMan.IsInActivity()) {
Expand Down