remove useless code in unit::advance_to
the line above does exactly the same as the line inside that if(){..} so it has no effect. Also, what the comment says is wrong. We do not want to keep the old recall cost if it is different from the original recall cost because doing that would break removing objects that change recall cost.
This commit is contained in:
parent
e7b2068a44
commit
67d2ee7db0
1 changed files with 0 additions and 8 deletions
|
@ -955,14 +955,6 @@ void unit::advance_to(const unit_type& u_type, bool use_traits)
|
|||
max_experience_ = new_type.experience_needed(false);
|
||||
level_ = new_type.level();
|
||||
recall_cost_ = new_type.recall_cost();
|
||||
|
||||
/* Need to add a check to see if the unit's old cost is equal
|
||||
to the unit's old unit_type cost first. If it is change the cost
|
||||
otherwise keep the old cost. */
|
||||
if(old_type.recall_cost() == recall_cost_) {
|
||||
recall_cost_ = new_type.recall_cost();
|
||||
}
|
||||
|
||||
alignment_ = new_type.alignment();
|
||||
max_hit_points_ = new_type.hitpoints();
|
||||
hp_bar_scaling_ = new_type.hp_bar_scaling();
|
||||
|
|
Loading…
Add table
Reference in a new issue