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