Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -21,9 +21,9 @@ bool SitGoal::canUse()
|
||||
if (!mob->onGround) return false;
|
||||
|
||||
shared_ptr<LivingEntity> owner = dynamic_pointer_cast<LivingEntity>( mob->getOwner() );
|
||||
if (owner == nullptr) return true; // owner not on level
|
||||
if (owner == NULL) return true; // owner not on level
|
||||
|
||||
if (mob->distanceToSqr(owner) < FollowOwnerGoal::TeleportDistance * FollowOwnerGoal::TeleportDistance && owner->getLastHurtByMob() != nullptr) return false;
|
||||
if (mob->distanceToSqr(owner) < FollowOwnerGoal::TeleportDistance * FollowOwnerGoal::TeleportDistance && owner->getLastHurtByMob() != NULL) return false;
|
||||
|
||||
return _wantToSit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user