浏览代码

Fix for showing penalty limit in red for unlimited ranged archers

krs 2 年之前
父节点
当前提交
e938152c1d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/battle/CUnitState.cpp

+ 1 - 1
lib/battle/CUnitState.cpp

@@ -614,7 +614,7 @@ uint8_t CUnitState::getSootingRangeDistance() const
 	if(!isShooter())
 	if(!isShooter())
 		return 0;
 		return 0;
 
 
-	uint8_t shootingRangeDistance = GameConstants::BATTLE_PENALTY_DISTANCE;
+	uint8_t shootingRangeDistance = 255; // no range limit for shooters
 
 
 	// overwrite full ranged damage distance with the value set in Additional info field of LIMITED_SHOOTING_RANGE bonus
 	// overwrite full ranged damage distance with the value set in Additional info field of LIMITED_SHOOTING_RANGE bonus
 	if(this->hasBonus(Selector::type()(BonusType::LIMITED_SHOOTING_RANGE)))
 	if(this->hasBonus(Selector::type()(BonusType::LIMITED_SHOOTING_RANGE)))