Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DPInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ void DPInstance::Service(uint32_t timeout)

DPID id = (DPID)m_vPlayers.size() + 1;
enet_peer_send(evt.peer, ENET_CHANNEL_NORMAL, DPMsg::NewId(id));
evt.peer->data = (LPVOID)id; // set id which means the player is authenticated
evt.peer->data = (LPVOID)id; // set id which means the player is authenticated

#ifdef _DEBUG
printf("[LOADER] New peer id %u\n", id);
Expand Down Expand Up @@ -632,7 +632,7 @@ void DPInstance::Service(uint32_t timeout)
{
if (msg->GetType() == DPMSG_TYPE_NEWID)
{
evt.peer->data = (LPVOID)msg->Read2(sizeof(DPID)); // Assign the readed id
evt.peer->data = (LPVOID) * (DPID*)msg->Read2(sizeof(DPID)); // fixed assign the readed id
m_pClientPeer->data = evt.peer->data;
#ifdef _DEBUG
printf("[LOADER] Assigned peer id from server %u\n", (DPID)m_pClientPeer->data);
Expand Down