Bed: fixed recursion when setting state to something it already is

fixes #2236
This commit is contained in:
Dylan K. Taylor 2018-06-13 04:16:52 -04:00
parent 2e6afa54c2
commit 31c187f366

View File

@ -85,7 +85,7 @@ class Bed extends Transparent{
$this->getLevel()->setBlock($this, $this, false, false);
if(($other = $this->getOtherHalf()) !== null and !$other->isOccupied()){
if(($other = $this->getOtherHalf()) !== null and $other->isOccupied() !== $occupied){
$other->setOccupied($occupied);
}
}