浏览代码

* fixed problem with stack positioning on battlefield when creature bank is attacked

mateuszb 16 年之前
父节点
当前提交
1f958bc240
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      server/CGameHandler.cpp

+ 2 - 2
server/CGameHandler.cpp

@@ -1030,11 +1030,11 @@ void CGameHandler::setupBattle( BattleInfo * curB, int3 tile, const CCreatureSet
 
 	for(unsigned g=0; g<stacks.size(); ++g) //shifting positions of two-hex creatures
 	{
-		if((stacks[g]->position%17)==1 && stacks[g]->hasFeatureOfType(StackFeature::DOUBLE_WIDE))
+		if((stacks[g]->position%17)==1 && stacks[g]->hasFeatureOfType(StackFeature::DOUBLE_WIDE) && stacks[g]->attackerOwned)
 		{
 			stacks[g]->position += 1;
 		}
-		else if((stacks[g]->position%17)==15 && stacks[g]->hasFeatureOfType(StackFeature::DOUBLE_WIDE))
+		else if((stacks[g]->position%17)==15 && stacks[g]->hasFeatureOfType(StackFeature::DOUBLE_WIDE) && !stacks[g]->attackerOwned)
 		{
 			stacks[g]->position -= 1;
 		}