mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Refactor peep struct
This commit is contained in:
committed by
Michael Steenbeek
parent
453855993d
commit
cdec457abd
@@ -34,7 +34,7 @@
|
||||
#define NETWORK_STREAM_VERSION "49"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
static rct_peep* _pickup_peep = nullptr;
|
||||
static Peep* _pickup_peep = nullptr;
|
||||
static int32_t _pickup_peep_old_x = LOCATION_NULL;
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
@@ -2032,7 +2032,7 @@ void Network::RemoveClient(std::unique_ptr<NetworkConnection>& connection)
|
||||
}
|
||||
|
||||
chat_history_add(text);
|
||||
rct_peep* pickup_peep = network_get_pickup_peep(connection_player->Id);
|
||||
Peep* pickup_peep = network_get_pickup_peep(connection_player->Id);
|
||||
if (pickup_peep)
|
||||
{
|
||||
game_command_playerid = connection_player->Id;
|
||||
@@ -3664,7 +3664,7 @@ int32_t network_can_perform_command(uint32_t groupindex, int32_t index)
|
||||
return gNetwork.group_list[groupindex]->CanPerformCommand(index);
|
||||
}
|
||||
|
||||
void network_set_pickup_peep(uint8_t playerid, rct_peep* peep)
|
||||
void network_set_pickup_peep(uint8_t playerid, Peep* peep)
|
||||
{
|
||||
if (gNetwork.GetMode() == NETWORK_MODE_NONE)
|
||||
{
|
||||
@@ -3680,7 +3680,7 @@ void network_set_pickup_peep(uint8_t playerid, rct_peep* peep)
|
||||
}
|
||||
}
|
||||
|
||||
rct_peep* network_get_pickup_peep(uint8_t playerid)
|
||||
Peep* network_get_pickup_peep(uint8_t playerid)
|
||||
{
|
||||
if (gNetwork.GetMode() == NETWORK_MODE_NONE)
|
||||
{
|
||||
@@ -4049,11 +4049,11 @@ int32_t network_can_perform_command(uint32_t groupindex, int32_t index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void network_set_pickup_peep(uint8_t playerid, rct_peep* peep)
|
||||
void network_set_pickup_peep(uint8_t playerid, Peep* peep)
|
||||
{
|
||||
_pickup_peep = peep;
|
||||
}
|
||||
rct_peep* network_get_pickup_peep(uint8_t playerid)
|
||||
Peep* network_get_pickup_peep(uint8_t playerid)
|
||||
{
|
||||
return _pickup_peep;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user