1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-05 06:11:32 +00:00

Merge pull request #2788 from Capostrophic/pickup

Make sure non-carriable light sources can't be picked up
This commit is contained in:
Alexei Dobrohotov 2020-04-20 23:54:20 +03:00 committed by GitHub
commit 8fc56e4614
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -732,7 +732,8 @@ namespace MWGui
&& (type != typeid(ESM::Potion).name()))
return;
if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up
// An object that can be picked up must have a tooltip.
if (!object.getClass().hasToolTip(object))
return;
int count = object.getRefData().getCount();