From d41ea7f6c2fac7571d7e7174b1ed2b14c35c65ee Mon Sep 17 00:00:00 2001 From: silversurfer Date: Wed, 13 Nov 2013 11:09:39 +0000 Subject: [PATCH] Bugfix for JaggZilla Bug #587 Objects thrown at civilians don't hurt them anymore. Anybody else will still suffer -1 health. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6593 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/physics.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TileEngine/physics.cpp b/TileEngine/physics.cpp index 83864581..73752214 100644 --- a/TileEngine/physics.cpp +++ b/TileEngine/physics.cpp @@ -2415,7 +2415,12 @@ void CheckForObjectHittingMerc( REAL_OBJECT *pObject, UINT16 usStructureID ) pSoldier = MercPtrs[ usStructureID ]; - sDamage = 1; + // silversurfer: Don't hurt civilians. Throwing objects at civilians to kill them is a lame exploit. + if ( pSoldier->aiData.bNeutral ) + sDamage = 0; + else + sDamage = 1; + sBreath = 0; pSoldier->EVENT_SoldierGotHit( NOTHING, sDamage, sBreath, pSoldier->ubDirection, 0, pObject->ubOwner, FIRE_WEAPON_TOSSED_OBJECT_SPECIAL, 0, 0, NOWHERE );