mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 18:11:15 +00:00
fix a slight problem with the submerge animation parameter...
...always being overridden by the engine.
This commit is contained in:
parent
579bed74f9
commit
646325a13e
@ -1461,6 +1461,9 @@ void formula_ai::make_candidate_moves() {
|
||||
variant enemy_unit_callable(new unit_callable(*(*best_move)->get_enemy_unit()));
|
||||
callable.add("target", enemy_unit_callable);
|
||||
}
|
||||
game_display::get_singleton()->float_label(
|
||||
(*(*best_move)->get_action_unit()).first,
|
||||
(*best_move)->get_name(),0,0,0);
|
||||
const_formula_ptr move_formula((*best_move)->get_move());
|
||||
make_move(move_formula, callable);
|
||||
// And re-evaluate candidate moves
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
void evaluate_move(const formula_ai* ai, unit_map& units, size_t team_num);
|
||||
|
||||
int get_score() const {return score_;}
|
||||
const std::string& get_name() { return name_;}
|
||||
std::string get_type() const {return type_;}
|
||||
unit_map::unit_iterator get_action_unit() {return action_unit_;}
|
||||
unit_map::unit_iterator get_enemy_unit() {return enemy_unit_;}
|
||||
|
@ -585,7 +585,7 @@ const frame_parameters unit_frame::merge_parameters(int current_time,const frame
|
||||
|
||||
/** engine provides a submerge for units in water */
|
||||
result.submerge = current_val.submerge?current_val.submerge:animation_val.submerge;
|
||||
if(primary && engine_val.submerge) result.submerge = engine_val.submerge;
|
||||
if(primary && engine_val.submerge && !result.submerge ) result.submerge = engine_val.submerge;
|
||||
|
||||
assert(engine_val.x == 0);
|
||||
result.x = current_val.x?current_val.x:animation_val.x;
|
||||
|
Loading…
x
Reference in New Issue
Block a user