forked from teamnwah/openmw-tes3coop
[General] Fix PacketPreInit
This commit is contained in:
parent
690211ad99
commit
435d9780a7
2 changed files with 13 additions and 5 deletions
|
@ -11,15 +11,15 @@ mwmp::PacketPreInit::PacketPreInit(RakNet::RakPeerInterface *peer) : BasePacket(
|
|||
packetID = ID_GAME_PREINIT;
|
||||
}
|
||||
|
||||
void mwmp::PacketPreInit::Packet(RakNet::BitStream *bs, bool send, PluginContainer &checksums)
|
||||
void mwmp::PacketPreInit::Packet(RakNet::BitStream *bs, bool send)
|
||||
{
|
||||
BasePacket::Packet(bs, send);
|
||||
|
||||
unsigned int size = checksums.size();
|
||||
unsigned int size = checksums->size();
|
||||
RW(size, send);
|
||||
if(send)
|
||||
{
|
||||
BOOST_FOREACH(PluginContainer::value_type & checksum, checksums)
|
||||
BOOST_FOREACH(PluginContainer::value_type & checksum, *checksums)
|
||||
{
|
||||
RW(checksum.first, true);
|
||||
RW(checksum.second, true);
|
||||
|
@ -32,7 +32,12 @@ void mwmp::PacketPreInit::Packet(RakNet::BitStream *bs, bool send, PluginContain
|
|||
PluginPair checksum;
|
||||
RW(checksum.first, false);
|
||||
RW(checksum.second, false);
|
||||
checksums.push_back(checksum);
|
||||
checksums->push_back(checksum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mwmp::PacketPreInit::setChecksums(mwmp::PacketPreInit::PluginContainer *checksums)
|
||||
{
|
||||
this->checksums = checksums;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,10 @@ namespace mwmp
|
|||
|
||||
PacketPreInit(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send, PluginContainer &checksums);
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
void setChecksums(PluginContainer *checksums);
|
||||
private:
|
||||
PluginContainer *checksums;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue