소스 검색

Fix for guards of neutral towns.

DjWarmonger 15 년 전
부모
커밋
d1c1758aad
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      hch/CObjectHandler.cpp

+ 2 - 1
hch/CObjectHandler.cpp

@@ -2193,7 +2193,7 @@ void CGTownInstance::newTurn() const
 					int n, i = rand() % std::min (ARMY_SIZE, cb->getDate(3)<<1);	
 					{//no lower tiers or above current month
 
-						if ((n = getSlotFor(town->basicCreatures[i], ARMY_SIZE)))
+						if ((n = getSlotFor(town->basicCreatures[i], ARMY_SIZE))>=0)
 						{ 
 							SetGarrisons sg;
 							sg.garrs[id] = getArmy();
@@ -5891,6 +5891,7 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons
 		}
 		cb->setObjProperty (id, 15, 0); //bc = NULL
 	}
+
 }
 
 void CGPyramid::initObj()