mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +00:00
Player: fixed attack sounds being added at the wrong position
This commit is contained in:
parent
a3597e195a
commit
574b615b4c
@ -1657,7 +1657,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
$entity->attack($ev);
|
||||
|
||||
$soundPos = $entity->getPosition()->add(0, $entity->width / 2, 0);
|
||||
$soundPos = $entity->getPosition()->add(0, $entity->height / 2, 0);
|
||||
if($ev->isCancelled()){
|
||||
$this->getWorld()->addSound($soundPos, new EntityAttackNoDamageSound());
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user