1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 08:49:40 +00:00

Don't attempt to use broken weapons in AI

This commit is contained in:
scrawl 2014-08-28 02:01:41 +02:00
parent 0bdc1b243a
commit 2e623bac5a

View file

@ -102,7 +102,11 @@ namespace MWMechanics
}
if (item.getClass().hasItemHealth(item))
{
if (item.getClass().getItemHealth(item) == 0)
return 0.f;
rating *= item.getClass().getItemHealth(item) / float(item.getClass().getItemMaxHealth(item));
}
if (weapon->mData.mType == ESM::Weapon::MarksmanBow)
{