From b3916e77448eb65dd54434113cf5f55491edc83a Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 18 Apr 2014 13:44:09 +0200 Subject: [PATCH] Crime: mark witnesses as alarmed. Fixes guard dialogue to properly detect if the player turned himself in. --- apps/openmw/mwmechanics/actors.cpp | 1 + apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index f7478e22c..7b83ff1f1 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -763,6 +763,7 @@ namespace MWMechanics // TODO: Not a complete list, disposition changes? creatureStats.setHostile(false); creatureStats.setAttacked(false); + creatureStats.setAlarmed(false); // Update witness crime id npcStats.setCrimeId(-1); diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index 3a26ea7dc..a44d1a2ba 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -866,6 +866,9 @@ namespace MWMechanics { it1->getClass().getNpcStats(*it1).setCrimeId(id); } + + // Mark as Alarmed for dialogue + it1->getClass().getCreatureStats(*it1).setAlarmed(true); } break; // Someone saw the crime and everyone has been told }