Fix elevation calculation and polar snowline threshold preventing unit movement

This commit is contained in:
bart
2026-11-08 20:44:55 +01:00
parent df6eac62ca
commit 9fe4a631e4
3 changed files with 12 additions and 7 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ TerrainMovementConfig::TerrainMovementConfig()
snowHeightKm(3.1f),
polarSnowLineEnabled(true),
polarSnowLineBaseKm(2.5f),
polarSnowFactorStart(0.40f),
polarSnowFactorEnd(0.85f),
polarSnowFactorStart(0.88f),
polarSnowFactorEnd(0.98f),
uphillSlopeMultiplier(4.0f),
downhillSlopeBonusMultiplier(2.0f),
minStepCost(0.25f),
@@ -143,7 +143,7 @@ QString TerrainMovementManager::getTerrainType(int tx, int ty, Matrix2D<TerrainP
return "water";
}
float heightKm = (tp.height / 255.0f) * 3.5f + 1.0f;
float heightKm = (tp.height / 255.0f) * 3.5f;
// 2. High peak snow
if (heightKm >= m_config.snowHeightKm) {