mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:49:58 +00:00
Fixed: creatures won't witness crimes
and potential crash.
This commit is contained in:
parent
0409e18a0e
commit
7599b26d30
1 changed files with 4 additions and 2 deletions
|
@ -843,7 +843,8 @@ namespace MWMechanics
|
|||
// Find an actor who witnessed the crime
|
||||
for (std::vector<MWWorld::Ptr>::iterator it = neighbors.begin(); it != neighbors.end(); ++it)
|
||||
{
|
||||
if (*it == ptr) continue; // not the player
|
||||
if ( *it == ptr
|
||||
&& it->getClass().isNpc()) continue; // not the player and is an NPC
|
||||
|
||||
// Was the crime seen?
|
||||
if ( ( MWBase::Environment::get().getWorld()->getLOS(ptr, *it) && awarenessCheck(ptr, *it) ) ||
|
||||
|
@ -859,7 +860,8 @@ namespace MWMechanics
|
|||
// Tell everyone, including yourself
|
||||
for (std::vector<MWWorld::Ptr>::iterator it1 = neighbors.begin(); it1 != neighbors.end(); ++it1)
|
||||
{
|
||||
if (*it1 == ptr) continue; // not the player
|
||||
if ( *it == ptr
|
||||
&& it->getClass().isNpc()) continue; // not the player and is an NPC
|
||||
|
||||
// TODO: Add more messages
|
||||
if (type == OT_Theft)
|
||||
|
|
Loading…
Reference in a new issue