Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Improved block collision check
Browse files Browse the repository at this point in the history
  • Loading branch information
shoghicp committed Sep 16, 2014
1 parent 8a8a954 commit 45dbb3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pocketmine/entity/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -994,9 +994,9 @@ public function move($dx, $dy, $dz){
}

protected function checkBlockCollision(){
$minX = floor($this->boundingBox->minX + 0.001);
$minY = floor($this->boundingBox->minY + 0.001);
$minZ = floor($this->boundingBox->minZ + 0.001);
$minX = floor($this->boundingBox->minX - 0.001);
$minY = floor($this->boundingBox->minY - 0.001);
$minZ = floor($this->boundingBox->minZ - 0.001);
$maxX = floor($this->boundingBox->maxX + 0.001);
$maxY = floor($this->boundingBox->maxY + 0.001);
$maxZ = floor($this->boundingBox->maxZ + 0.001);
Expand Down
2 changes: 2 additions & 0 deletions src/pocketmine/entity/Living.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public function entityBaseTick(){
}

$this->extinguish();
}else{
$this->airTicks = 300;
}

if($this->attackTime > 0){
Expand Down

0 comments on commit 45dbb3f

Please sign in to comment.