diff --git a/Runtime/ImGuiConsole.cpp b/Runtime/ImGuiConsole.cpp index fd702e6f4..f4f59bf66 100644 --- a/Runtime/ImGuiConsole.cpp +++ b/Runtime/ImGuiConsole.cpp @@ -643,6 +643,11 @@ void ImGuiConsole::ShowAppMainMenuBar(bool canInspect) { } void ImGuiConsole::PreUpdate() { + // We ned to make sure we have a valid CRandom16 at all times, so lets do that here + if (g_StateManager && g_StateManager->GetActiveRandom() == nullptr) { + g_StateManager->SetActiveRandomToDefault(); + } + if (m_stepFrame) { g_Main->SetPaused(true); m_stepFrame = false; diff --git a/Runtime/ImGuiEntitySupport.cpp b/Runtime/ImGuiEntitySupport.cpp index bdcb769b1..035af29ec 100644 --- a/Runtime/ImGuiEntitySupport.cpp +++ b/Runtime/ImGuiEntitySupport.cpp @@ -427,7 +427,17 @@ IMGUI_ENTITY_INSPECT(CScriptRoomAcoustics, CEntity, ScriptRoomAcoustics, {}) IMGUI_ENTITY_INSPECT(CScriptSpawnPoint, CEntity, ScriptSpawnPoint, {}) IMGUI_ENTITY_INSPECT(CScriptStreamedMusic, CEntity, ScriptStreamedMusic, {}) IMGUI_ENTITY_INSPECT(CScriptSwitch, CEntity, ScriptSwitch, {}) -IMGUI_ENTITY_INSPECT(CScriptTimer, CEntity, ScriptTimer, {}) +IMGUI_ENTITY_INSPECT(CScriptTimer, CEntity, ScriptTimer, { + ImGui::DragFloat("Time", &x34_time); + ImGui::DragFloat("Start Time", &x38_startTime); + ImGui::DragFloat("Max Random Delay", &x3c_maxRandDelay); + ImGui::Checkbox("Loop", &x40_loop); + ImGui::Checkbox("Auto Start", &x41_autoStart); + ImGui::Checkbox("Is Timing", &x42_isTiming); + if (ImGui::Button("Reset")) { + g_StateManager->SendScriptMsg(this, x8_uid, EScriptObjectMessage::ResetAndStart); + } +}) IMGUI_ENTITY_INSPECT(CScriptWorldTeleporter, CEntity, ScriptWorldTeleporter, {}) IMGUI_ENTITY_INSPECT(CTeamAiMgr, CEntity, TeamAiMgr, {})