Fix: check wether a building is in a town

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5916 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-03-10 15:33:47 +00:00
parent 94a55654d1
commit 29867c0302
+4
View File
@@ -1047,6 +1047,10 @@ void HandleLoyaltyForDemolitionOfBuilding( SOLDIERTYPE *pSoldier, INT16 sPointsD
// get town id
bTownId = GetTownIdForSector( pSoldier->sSectorX, pSoldier->sSectorY );
// Flugente: for safety reasons, exit if not in a town
if( bTownId == BLANK_SECTOR )
return;
// penalize the side that did it
if( pSoldier->bTeam == OUR_TEAM )
{