mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Fixed broken transforms after play mode
This commit is contained in:
@@ -343,6 +343,8 @@ namespace Nuake {
|
||||
if (Engine::GetGameState() == GameState::Paused)
|
||||
{
|
||||
Engine::SetGameState(GameState::Playing);
|
||||
std::string statusMessage = ICON_FA_RUNNING + std::string(" Playing...");
|
||||
SetStatusMessage(statusMessage.c_str(), { 97.0 / 255.0, 0, 1, 1 });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -388,6 +390,7 @@ namespace Nuake {
|
||||
|
||||
Engine::LoadScene(SceneSnapshot);
|
||||
Selection = EditorSelection();
|
||||
SetStatusMessage("Ready");
|
||||
}
|
||||
|
||||
if (!wasPlayMode)
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Nuake
|
||||
s_LastFrameTime = s_Time;
|
||||
|
||||
// Dont update if no scene is loaded.
|
||||
if (s_CurrentWindow->GetScene() && GetGameState() == GameState::Playing)
|
||||
if (s_CurrentWindow->GetScene())
|
||||
{
|
||||
float scaledTimeStep = s_TimeStep * s_TimeScale;
|
||||
s_CurrentWindow->Update(scaledTimeStep);
|
||||
|
||||
Reference in New Issue
Block a user