* Initial commit.

:)
This commit is contained in:
iProgramInCpp
2023-07-30 22:22:02 +03:00
commit 9642818a88
613 changed files with 151754 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#include "Packet.hpp"
AddPlayerPacket::AddPlayerPacket(const RakNet::RakNetGUID& guid, RakNet::RakString name, int id, float x, float y, float z)
{
m_guid = guid;
m_name = name;
m_id = id;
m_x = x;
m_y = y;
m_z = z;
}
void AddPlayerPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{
pCallback->handle(guid, this);
}
void AddPlayerPacket::write(RakNet::BitStream* bs)
{
bs->Write(PACKET_ADD_PLAYER);
bs->Write(m_guid);
bs->Write(m_name);
bs->Write(m_id);
bs->Write(m_x);
bs->Write(m_y);
bs->Write(m_z);
}
void AddPlayerPacket::read(RakNet::BitStream* bs)
{
bs->Read(m_guid);
bs->Read(m_name);
bs->Read(m_id);
bs->Read(m_x);
bs->Read(m_y);
bs->Read(m_z);
}