apparently forgot to commit bugfix for bug #15366

This commit is contained in:
Jérémy Rosen 2010-02-17 18:49:50 +00:00
parent 0e4db5f296
commit 9d9b045238
4 changed files with 29 additions and 4 deletions

View file

@ -4,6 +4,7 @@ Version 1.7.13+svn:
* Graphics:
* Fixed bug 15344: missing ice to nothing transition
* Fixed weird side effect of long first frame in standing anims
* Fix bug 15366 : overlay terrains badly interacting with submerge and height adjustments
* Language and i18n:
* Updated translations: Czech, Italian, Polish
* Multiplayer

View file

@ -66,6 +66,8 @@
name= _ "Bridge"
string=^Bw|
aliasof=_bas, Gt
submerge=0
unit_height_adjust=22
editor_group=bridge, water
[/terrain_type]
@ -76,6 +78,8 @@
string=^Bw/
aliasof=_bas, Gt
editor_group=bridge, water
submerge=0
unit_height_adjust=22
[/terrain_type]
[terrain_type]
@ -85,6 +89,8 @@
string=^Bw\
aliasof=_bas, Gt
editor_group=bridge, water
submerge=0
unit_height_adjust=22
[/terrain_type]
# >>>>>>>> Chasm Bridge

View file

@ -40,10 +40,12 @@ terrain_type::terrain_type() :
mvt_type_(1, t_translation::VOID_TERRAIN),
def_type_(1, t_translation::VOID_TERRAIN),
union_type_(1, t_translation::VOID_TERRAIN),
height_adjust_(0),
height_adjust_(0),
height_adjust_set_(false),
submerge_(0.0),
submerge_set_(false),
light_modification_(0),
heals_(0),
heals_(0),
income_description_(),
income_description_ally_(),
income_description_enemy_(),
@ -70,7 +72,9 @@ terrain_type::terrain_type(const config& cfg) :
def_type_(),
union_type_(),
height_adjust_(atoi(cfg["unit_height_adjust"].c_str())),
height_adjust_set_(!cfg["unit_height_adjust"].empty()),
submerge_(atof(cfg["submerge"].c_str())),
submerge_set_(!cfg["submerge"].empty()),
light_modification_(atoi(cfg["light"].c_str())),
heals_(lexical_cast_default<int>(cfg["heals"], 0)),
income_description_(),
@ -178,8 +182,10 @@ terrain_type::terrain_type(const terrain_type& base, const terrain_type& overlay
mvt_type_(overlay.mvt_type_),
def_type_(overlay.def_type_),
union_type_(),
height_adjust_(overlay.height_adjust_),
submerge_(overlay.submerge_),
height_adjust_(base.height_adjust_),
height_adjust_set_(base.height_adjust_set_),
submerge_(base.submerge_),
submerge_set_(base.submerge_set_),
light_modification_(base.light_modification_ + overlay.light_modification_),
heals_(std::max<int>(base.heals_, overlay.heals_)),
income_description_(),
@ -196,6 +202,16 @@ terrain_type::terrain_type(const terrain_type& base, const terrain_type& overlay
hide_in_editor_(base.hide_in_editor_ || overlay.hide_in_editor_)
{
if(overlay.height_adjust_set_) {
height_adjust_set_ = true;
height_adjust_ = overlay.height_adjust_;
}
if(overlay.submerge_set_) {
submerge_set_ = true;
submerge_ = overlay.submerge_;
}
merge_alias_lists(mvt_type_, base.mvt_type_);
merge_alias_lists(def_type_, base.def_type_);

View file

@ -98,8 +98,10 @@ private:
t_translation::t_list union_type_;
int height_adjust_;
bool height_adjust_set_;
double submerge_;
bool submerge_set_;
int light_modification_, heals_;