mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 00:04:43 +01:00
Add guard to ensure game action is registered
This also reorders the headers, which caused RideDemolishAction to fail compiling, but that's also solved by adding the namespace before the call.
This commit is contained in:
committed by
Michael Steenbeek
parent
e8b2a3df0d
commit
8fac2e1480
@@ -19,12 +19,11 @@
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/MemoryStream.h"
|
||||
#include "../core/Util.hpp"
|
||||
#include "../network/network.h"
|
||||
#include "GameAction.h"
|
||||
|
||||
#include "../platform/platform.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../network/network.h"
|
||||
#include "../platform/platform.h"
|
||||
#include "../world/Park.h"
|
||||
#include "GameAction.h"
|
||||
|
||||
GameActionResult::GameActionResult()
|
||||
{
|
||||
@@ -88,6 +87,7 @@ namespace GameActions
|
||||
result = factory();
|
||||
}
|
||||
}
|
||||
Guard::ArgumentNotNull(result);
|
||||
return std::unique_ptr<GameAction>(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
window_close_by_class(WC_NEW_CAMPAIGN);
|
||||
|
||||
// Refresh windows that display the ride name
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
auto windowManager = OpenRCT2::GetContext()->GetUiContext()->GetWindowManager();
|
||||
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_RIDE_LIST));
|
||||
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_GUEST_LIST));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user