fixed a possible crash + wth =

This commit is contained in:
GameHerobrine 2023-08-21 10:42:23 +03:00
parent f7aeca11cc
commit 4fdf9f50e6

View file

@ -39,7 +39,7 @@ class Pig extends Animal implements Rideable{
$this->linkEntity($e, SetEntityLinkPacket::TYPE_RIDE);
return true;
}
if($e->isRiding && $this->linkedEntity->eid = $e->eid){
if($e->isRiding && $this->linkedEntity instanceof Entity && $this->linkedEntity->eid === $e->eid){
$this->linkEntity($e, SetEntityLinkPacket::TYPE_REMOVE);
$e->isRiding = false;
$this->linkedEntity = 0;