mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
fixed bb detection when monster is attacking
This commit is contained in:
parent
b18cf8de69
commit
6e6dc3eb4c
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ class Monster extends Creature{
|
|||
* @see Entity::attackEntity()
|
||||
*/
|
||||
public function attackEntity($entity, $distance){
|
||||
if($distance < 2.0 && $entity->boundingBox->maxX > $this->boundingBox->minY && $entity->boundingBox->minY < $this->boundingBox->maxY){
|
||||
if($distance < 2.0 && $entity->boundingBox->maxY > $this->boundingBox->minY && $entity->boundingBox->minY < $this->boundingBox->maxY){
|
||||
$entity->harm($this->getAttackDamage(), $this->eid);
|
||||
return true;
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue