1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +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 return; // TODO: implement animal rights
const MWMechanics::NpcStats& victimStats = victim.getClass().getNpcStats(victim); const MWMechanics::NpcStats& victimStats = victim.getClass().getNpcStats(victim);
if (victimStats.getCrimeId() == -1) const MWWorld::Ptr &player = getPlayer();
return; bool canCommit = attacker == player && canCommitCrimeAgainst(attacker, victim);
// For now we report only about crimes of player and player's followers // For now we report only about crimes of player and player's followers
const MWWorld::Ptr &player = getPlayer();
if (attacker != player) if (attacker != player)
{ {
std::set<MWWorld::Ptr> playerFollowers; std::set<MWWorld::Ptr> playerFollowers;
@ -1524,6 +1523,9 @@ namespace MWMechanics
return; return;
} }
if (!canCommit && victimStats.getCrimeId() == -1)
return;
// Simple check for who attacked first: if the player attacked first, a crimeId should be set // 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, // 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. // for bystanders it is not possible to tell who attacked first, anyway.