mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Workaround for player hitbox bug on respawn
this happens when a player respawns before their death animation ends. I don't know why, but their bounding box height suddenly becomes zero. This solves the bug by simply resending the height and width properties to viewers on respawn. Closes #2135.
This commit is contained in:
parent
9ed0d9d36f
commit
a889a0e517
@ -3669,6 +3669,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
|
||||
$this->sendData($this);
|
||||
$this->sendData($this->getViewers());
|
||||
|
||||
$this->sendSettings();
|
||||
$this->inventory->sendContents($this);
|
||||
|
@ -531,6 +531,8 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$this->propertyManager->setString(self::DATA_NAMETAG, "");
|
||||
$this->propertyManager->setLong(self::DATA_LEAD_HOLDER_EID, -1);
|
||||
$this->propertyManager->setFloat(self::DATA_SCALE, 1);
|
||||
$this->propertyManager->setFloat(self::DATA_BOUNDING_BOX_WIDTH, $this->width);
|
||||
$this->propertyManager->setFloat(self::DATA_BOUNDING_BOX_HEIGHT, $this->height);
|
||||
|
||||
$this->fireTicks = $this->namedtag->getShort("Fire", 0);
|
||||
if($this->isOnFire()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user