Fix #8798: Player info not being synchronized over network.

This commit is contained in:
Matt 2019-02-28 20:15:11 +01:00
parent 453855993d
commit 0000e9741f
1 changed files with 4 additions and 2 deletions

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)