Skip to content
Permalink
Browse files

Fix: #552

  • Loading branch information...
mattyx14 committed Apr 15, 2019
1 parent 541f97e commit 46c166feae739c4d3d18895cb04cf53b7300d308
Showing with 3 additions and 18 deletions.
  1. +3 −18 path_8_6/src/protocolgame.cpp
@@ -365,30 +365,15 @@ void ProtocolGame::writeToOutputBuffer(const NetworkMessage& msg)

void ProtocolGame::parsePacket(NetworkMessage& msg)
{
if (!acceptPackets || g_game.getGameState() == GAME_STATE_SHUTDOWN || msg.getLength() <= 0) {
if (!player || !acceptPackets || g_game.getGameState() == GAME_STATE_SHUTDOWN || msg.getLength() <= 0) {
return;
}

uint8_t recvbyte = msg.getByte();

if (!player) {
if (recvbyte == 0x0F) {
disconnect();
}

return;
}

//a dead player can not performs actions
if (player->isRemoved() || player->getHealth() <= 0) {
if (recvbyte == 0x0F) {
disconnect();
return;
}

if (recvbyte != 0x14) {
return;
}
if (!player->isRemoved() && recvbyte != 0x14) {
return;
}

switch (recvbyte) {

0 comments on commit 46c166f

Please sign in to comment.
You can’t perform that action at this time.