Update library/modules/Items.cpp

Co-authored-by: Alan <lethosor@users.noreply.github.com>
develop
Myk 2021-08-19 19:21:27 -07:00 committed by GitHub
parent 06a85d6f0d
commit 8b824244ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

@ -831,8 +831,8 @@ static bool detachItem(MapExtras::MapCache &mc, df::item *item)
}
}
if (df::general_ref *ref =
Items::getGeneralRef(item, general_ref_type::PROJECTILE))
if (auto *ref =
virtual_cast<df::general_ref_projectile>(Items::getGeneralRef(item, general_ref_type::PROJECTILE)))
{
int32_t proj_id = ((df::general_ref_projectile *)ref)->projectile_id;
df::proj_list_link *link = world->proj_list.next;