forked from teamnwah/openmw-tes3coop
Werewolf: only NPCs should have modified fight and react to your transformation
This commit is contained in:
parent
9e0d5dc28a
commit
c1cc66985d
2 changed files with 11 additions and 5 deletions
|
@ -1307,12 +1307,15 @@ namespace MWMechanics
|
||||||
+ ((50 - disposition) * fFightDispMult))
|
+ ((50 - disposition) * fFightDispMult))
|
||||||
+ bias;
|
+ bias;
|
||||||
|
|
||||||
if (target.getClass().getNpcStats(target).isWerewolf() ||
|
if (ptr.getClass().isNpc() && target.getClass().isNpc())
|
||||||
(target == MWBase::Environment::get().getWorld()->getPlayerPtr() &&
|
|
||||||
MWBase::Environment::get().getWorld()->getGlobalInt("pcknownwerewolf")))
|
|
||||||
{
|
{
|
||||||
const ESM::GameSetting * iWerewolfFightMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().search("iWerewolfFightMod");
|
if (target.getClass().getNpcStats(target).isWerewolf() ||
|
||||||
fight += iWerewolfFightMod->getInt();
|
(target == MWBase::Environment::get().getWorld()->getPlayerPtr() &&
|
||||||
|
MWBase::Environment::get().getWorld()->getGlobalInt("pcknownwerewolf")))
|
||||||
|
{
|
||||||
|
const ESM::GameSetting * iWerewolfFightMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().search("iWerewolfFightMod");
|
||||||
|
fight += iWerewolfFightMod->getInt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (fight >= 100);
|
return (fight >= 100);
|
||||||
|
|
|
@ -2344,6 +2344,9 @@ namespace MWWorld
|
||||||
if (*it == actor)
|
if (*it == actor)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!it->getClass().isNpc())
|
||||||
|
continue;
|
||||||
|
|
||||||
if (getLOS(*it, actor) && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, *it))
|
if (getLOS(*it, actor) && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, *it))
|
||||||
{
|
{
|
||||||
detected = true;
|
detected = true;
|
||||||
|
|
Loading…
Reference in a new issue