fix: use dynamic_pointer_cast for throwable

This commit is contained in:
Tropical 2026-03-31 16:53:55 -05:00
parent a10c106c24
commit 70e93e57c3

View file

@ -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;
}