mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
Make changes to match @ZehMatt code
This commit is contained in:
committed by
Michał Janiszewski
parent
a7d1cbee9e
commit
149a854c51
@@ -23,6 +23,7 @@
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "../platform/platform.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../windows/error.h"
|
||||
#include "../world/park.h"
|
||||
@@ -110,6 +111,8 @@ namespace GameActions
|
||||
|
||||
GameActionResult Execute(const IGameAction * action, uint32 flags, GameActionCallback callback)
|
||||
{
|
||||
log_info("[%s] GameAction::Execute\n", network_get_mode() == NETWORK_MODE_CLIENT ? "cl" : "sv");
|
||||
|
||||
Guard::ArgumentNotNull(action);
|
||||
|
||||
uint16 actionFlags = action->GetFlags();
|
||||
@@ -155,7 +158,7 @@ namespace GameActions
|
||||
// Allow autosave to commence
|
||||
if (gLastAutoSaveUpdate == AUTOSAVE_PAUSE)
|
||||
{
|
||||
gLastAutoSaveUpdate = SDL_GetTicks();
|
||||
gLastAutoSaveUpdate = platform_get_ticks();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1123,7 +1123,7 @@ void Network::Client_Send_GAME_ACTION(const IGameAction *action, uint32 flags =
|
||||
MemoryStream stream;
|
||||
action->Serialise(&stream);
|
||||
packet->Write((uint8*)stream.GetData(), stream.GetLength());
|
||||
server_connection.QueuePacket(std::move(packet));
|
||||
server_connection->QueuePacket(std::move(packet));
|
||||
}
|
||||
|
||||
void Network::Server_Send_GAME_ACTION(const IGameAction *action, uint32 flags = 0)
|
||||
@@ -1359,7 +1359,7 @@ void Network::ProcessGameCommandQueue()
|
||||
if (game_command_queue.begin()->tick != gCurrentTicks)
|
||||
break;
|
||||
}
|
||||
if (gc.actionType != 0xFFFFFFFF) {
|
||||
if (gc.actionType != UINT32_MAX) {
|
||||
IGameAction * action = GameActions::Create(gc.actionType);
|
||||
uint32 flags = gc.parameters->ReadValue<uint32>();
|
||||
action->Deserialise(gc.parameters);
|
||||
|
||||
Reference in New Issue
Block a user