From 320f82ae7e355be0d801dedf3a500ce6bd7e6be3 Mon Sep 17 00:00:00 2001 From: Flugente Date: Tue, 20 Aug 2013 20:55:12 +0000 Subject: [PATCH] Fix: game crash when civilians kill other civilians in a town git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6298 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Strategic Town Loyalty.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Strategic/Strategic Town Loyalty.cpp b/Strategic/Strategic Town Loyalty.cpp index 6e504d3d..f57c45da 100644 --- a/Strategic/Strategic Town Loyalty.cpp +++ b/Strategic/Strategic Town Loyalty.cpp @@ -930,6 +930,22 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional ) } break; + // Flugente: civilians might also kill somebody, no matter how unlikely that sounds + // punish the player - he didnt stop the bloodshed + case CIV_TEAM: + { + // on our side, penalty + iLoyaltyChange *= REDUCTION_FOR_MURDER_NOT_OUR_FAULT; + iLoyaltyChange /= 100; + + // lose loyalty + fIncrement = FALSE; + + // debug message + ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Town holds you responsible for not stopping the murder."); + } + break; + default: Assert(FALSE); return;