add some casts to allow compilation for arm when some...

..."float optimization" is used (otherwise compilation breaks!)
This commit is contained in:
Nils Kneuper 2010-07-09 09:07:05 +00:00
parent 8ed9dd7319
commit 027599e18f
2 changed files with 2 additions and 2 deletions

View file

@ -399,7 +399,7 @@ std::pair<map_location,map_location> testing_move_to_targets_phase::choose_move(
// but best_rating is too big for scout and support
// which give a too small locStopValue
// so keep costy A* for the moment.
//const double locStopValue = std::min(best_target->value / best_rating, 100.0);
//const double locStopValue = std::min(best_target->value / best_rating, (double) 100.0);
const double locStopValue = 500.0;
pathfind::plain_route cur_route = pathfind::a_star_search(u->get_location(), best_target->loc, locStopValue, &calc, map_.w(), map_.h());

View file

@ -666,7 +666,7 @@ const frame_parameters unit_frame::merge_parameters(int current_time,const frame
/** engine provide a blend color for poisoned units */
result.blend_ratio = current_val.blend_ratio?current_val.blend_ratio:animation_val.blend_ratio;
if(primary && engine_val.blend_ratio) result.blend_ratio = std::min(result.blend_ratio + engine_val.blend_ratio,1.0);
if(primary && engine_val.blend_ratio) result.blend_ratio = std::min(result.blend_ratio + engine_val.blend_ratio, (double) 1.0);
/** engine provide a highlight ratio for selected units and visible "invisible" units */
result.highlight_ratio = current_val.highlight_ratio!=1.0?current_val.highlight_ratio:animation_val.highlight_ratio;