mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #8801 from ZehMatt/mp-playerinfo
Synchronize player info
This commit is contained in:
commit
4805c1c082
|
@ -31,7 +31,7 @@
|
|||
// This string specifies which version of network stream current build uses.
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
#define NETWORK_STREAM_VERSION "49"
|
||||
#define NETWORK_STREAM_VERSION "50"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
static Peep* _pickup_peep = nullptr;
|
||||
|
|
|
@ -26,13 +26,15 @@ void NetworkPlayer::Read(NetworkPacket& packet)
|
|||
{
|
||||
const utf8* name = packet.ReadString();
|
||||
SetName(name);
|
||||
packet >> Id >> Flags >> Group;
|
||||
packet >> Id >> Flags >> Group >> LastAction >> LastActionCoord.x >> LastActionCoord.y >> LastActionCoord.z >> MoneySpent
|
||||
>> CommandsRan;
|
||||
}
|
||||
|
||||
void NetworkPlayer::Write(NetworkPacket& packet)
|
||||
{
|
||||
packet.WriteString((const char*)Name.c_str());
|
||||
packet << Id << Flags << Group;
|
||||
packet << Id << Flags << Group << LastAction << LastActionCoord.x << LastActionCoord.y << LastActionCoord.z << MoneySpent
|
||||
<< CommandsRan;
|
||||
}
|
||||
|
||||
void NetworkPlayer::AddMoneySpent(money32 cost)
|
||||
|
|
Loading…
Reference in New Issue