Skip to content

Commit

Permalink
Don't handle PlayerPos packet coming from client if player is dead
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Mar 12, 2015
1 parent 6ce0985 commit 3067d78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/network/packethandlers/server.cpp
Expand Up @@ -555,6 +555,11 @@ void Server::handleCommand_PlayerPos(NetworkPacket* pkt)
return;
}

// If player is dead we don't care of this packet
if (player->hp == 0) {
return;
}

PlayerSAO *playersao = player->getPlayerSAO();
if (playersao == NULL) {
errorstream << "Server::ProcessData(): Cancelling: "
Expand Down

3 comments on commit 3067d78

@HybridDog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix the corpses which run around on some servers?

@nerzhul
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the goal, yes

@HybridDog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fixing this bug this way makes sense to me
but some time ago there were weird player bugs which caused players to ride on others (maybe someone was attached to the player object)
and sometimes players were upside down
screenshot_3215737037_low

Please sign in to comment.