1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Fix issue in which murder wouldn't be reported after paying fine

This commit is contained in:
James Carty 2018-08-16 18:58:51 +01:00
parent 4b0a6074e7
commit 43f1c9163c

View File

@ -1511,11 +1511,10 @@ namespace MWMechanics
return; // TODO: implement animal rights
const MWMechanics::NpcStats& victimStats = victim.getClass().getNpcStats(victim);
if (victimStats.getCrimeId() == -1)
return;
const MWWorld::Ptr &player = getPlayer();
bool canCommit = attacker == player && canCommitCrimeAgainst(attacker, victim);
// For now we report only about crimes of player and player's followers
const MWWorld::Ptr &player = getPlayer();
if (attacker != player)
{
std::set<MWWorld::Ptr> playerFollowers;
@ -1524,6 +1523,9 @@ namespace MWMechanics
return;
}
if (!canCommit && victimStats.getCrimeId() == -1)
return;
// Simple check for who attacked first: if the player attacked first, a crimeId should be set
// Doesn't handle possible edge case where no one reported the assault, but in such a case,
// for bystanders it is not possible to tell who attacked first, anyway.