Soliton noted the 50% was arbitarily chosen since 100% defence wasn't allowed,

now that it is reset to 100% if invalid.
This commit is contained in:
Mark de Wever 2008-03-12 16:16:34 +00:00
parent 7baa3e680c
commit 9e66e9550b
2 changed files with 4 additions and 4 deletions

View File

@ -2100,8 +2100,8 @@ int unit::defense_modifier(t_translation::t_terrain terrain, int recurse_count)
}
}
if(res < 0) {
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 50.\n";
res = 50;
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 0 (100% defence).\n";
res = 0;
}
// defense_mods_.insert(std::pair<terrain_type::TERRAIN,int>(terrain,res));

View File

@ -418,8 +418,8 @@ int unit_movement_type::defense_modifier(const gamemap& map,
}
if(res < 0) {
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 50.\n";
res = 50;
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 0 (100% defence).\n";
res = 0;
}
defenseMods_.insert(std::pair<t_translation::t_terrain, int>(terrain, res));