Add Player::isDead function to check player is dead
return;
}
+ /*
+ * If player is dead, we don't need to update the breath
+ * He is dead !
+ */
+ if (player->isDead()) {
+ return;
+ }
+
+
PlayerSAO *playersao = player->getPlayerSAO();
if (playersao == NULL) {
errorstream << "Server::ProcessData(): Cancelling: "
inventory.setModified(x);
}
+ // Use a function, if isDead can be defined by other conditions
+ bool isDead() { return hp == 0; }
+
bool touching_ground;
// This oscillates so that the player jumps a bit above the surface
bool in_liquid;