mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-05 18:11:32 +00:00
Fixes #845: NPCs hold torches during the day
Added check for Player character so it won't be affected by showing, or hidding torches. Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
6eb674e4e5
commit
abc126e2af
1 changed files with 36 additions and 34 deletions
|
@ -709,6 +709,8 @@ bool CharacterController::updateNpcState(bool onground, bool inwater, bool isrun
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mPtr.getRefData().getHandle() != "player")
|
||||||
|
{
|
||||||
if (MWBase::Environment::get().getWorld()->isNight())
|
if (MWBase::Environment::get().getWorld()->isNight())
|
||||||
{
|
{
|
||||||
MWWorld::ContainerStoreIterator item = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
MWWorld::ContainerStoreIterator item = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
||||||
|
@ -750,7 +752,7 @@ bool CharacterController::updateNpcState(bool onground, bool inwater, bool isrun
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return forcestateupdate;
|
return forcestateupdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue