Merge pull request #8801 from ZehMatt/mp-playerinfo

Synchronize player info
This commit is contained in:
ζeh Matt 2019-02-28 20:41:00 +01:00 committed by GitHub
commit 4805c1c082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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)