bugfix: "Standalone Game" play does not listen port

This commit is contained in:
monsieurgustav
2016-03-16 19:51:19 +01:00
parent 7358d0baf2
commit c073711dc6
+5 -5
View File
@@ -22,7 +22,7 @@ public:
} }
#if OSC_EDITOR_BUILD #if OSC_EDITOR_BUILD
_isPlayingInEditor = false; _mustListen = !GIsEditor; // must not listen now if IsEditor (listen when PIE), else (Standalone Game) listen now
FEditorDelegates::BeginPIE.AddRaw(this, &FOscModule::OnBeginPIE); FEditorDelegates::BeginPIE.AddRaw(this, &FOscModule::OnBeginPIE);
FEditorDelegates::EndPIE.AddRaw(this, &FOscModule::OnEndPIE); FEditorDelegates::EndPIE.AddRaw(this, &FOscModule::OnEndPIE);
#endif #endif
@@ -82,7 +82,7 @@ public:
// receive settings // receive settings
#if OSC_EDITOR_BUILD #if OSC_EDITOR_BUILD
if(_isPlayingInEditor) if(_mustListen)
{ {
Listen(settings); Listen(settings);
} }
@@ -117,7 +117,7 @@ private:
#if OSC_EDITOR_BUILD #if OSC_EDITOR_BUILD
void OnBeginPIE(bool isSimulating) void OnBeginPIE(bool isSimulating)
{ {
_isPlayingInEditor = true; _mustListen = true;
check(_dispatcher.IsValid()) check(_dispatcher.IsValid())
auto settings = GetMutableDefault<UOscSettings>(); auto settings = GetMutableDefault<UOscSettings>();
@@ -126,11 +126,11 @@ private:
void OnEndPIE(bool isSimulating) void OnEndPIE(bool isSimulating)
{ {
_isPlayingInEditor = false; _mustListen = false;
_dispatcher->Stop(); _dispatcher->Stop();
} }
bool _isPlayingInEditor; bool _mustListen;
#endif #endif
private: private: