mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-06 12:03:39 +00:00
fix: use dynamic_pointer_cast for throwable
This commit is contained in:
parent
a10c106c24
commit
70e93e57c3
|
|
@ -263,7 +263,7 @@ float Throwable::getShadowHeightOffs() { return 0; }
|
|||
|
||||
std::shared_ptr<LivingEntity> Throwable::getOwner() {
|
||||
if (owner == nullptr && !ownerName.empty()) {
|
||||
owner = std::static_pointer_cast<LivingEntity>(level->getPlayerByName(ownerName));
|
||||
owner = std::dynamic_pointer_cast<LivingEntity>(level->getPlayerByName(ownerName));
|
||||
}
|
||||
return owner;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue