Skip to content

Commit e0cf21c

Browse files
committed
2 parents 79503aa + eee4631 commit e0cf21c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Source/Entities/MovableObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ int MovableObject::ReloadScripts() {
563563

564564
// 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.
565565
MovableObject* movableObjectPreset = const_cast<MovableObject*>(dynamic_cast<const MovableObject*>(g_PresetMan.GetEntityPreset(GetClassName(), GetPresetName(), GetModuleID())));
566-
if (this != movableObjectPreset) {
566+
if (movableObjectPreset && this != movableObjectPreset) {
567567
movableObjectPreset->ReloadScripts();
568568
}
569569

Source/Main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ void RunGameLoop() {
319319

320320
g_PerformanceMan.StartPerformanceMeasurement(PerformanceMan::SimTotal);
321321

322+
g_LuaMan.Update();
323+
322324
g_UInputMan.Update();
325+
g_ConsoleMan.Update();
323326

324327
// 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.
325328
if (g_NetworkServer.IsServerModeEnabled()) {
@@ -328,7 +331,7 @@ void RunGameLoop() {
328331
}
329332

330333
g_FrameMan.Update();
331-
g_LuaMan.Update();
334+
332335
g_ActivityMan.Update();
333336

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

350-
g_ConsoleMan.Update();
351353
g_PerformanceMan.StopPerformanceMeasurement(PerformanceMan::SimTotal);
352354

353355
if (!g_ActivityMan.IsInActivity()) {

0 commit comments

Comments
 (0)