diff --git a/src/player_display.cpp b/src/player_display.cpp index 06bdd03dd7937..b10ee7fbd1927 100644 --- a/src/player_display.cpp +++ b/src/player_display.cpp @@ -948,21 +948,21 @@ static std::vector get_speedlist_entries( const Character &you, { std::vector entries; - for( const speed_bonus_effect &effect : you.get_speed_bonus_effects() ) { - if( effect.bonus != 0 ) { - const speedlist_entry entry { true, effect.description, effect.bonus, false }; + for( const std::pair &speed_effect : speed_effects ) { + if( speed_effect.second != 0 ) { + const speedlist_entry entry { true, speed_effect.first, speed_effect.second, false }; entries.push_back( entry ); } } - //FIXME I think these are already included above. Need more testing. - for( const std::pair &speed_effect : speed_effects ) { - if( speed_effect.second != 0 ) { - const speedlist_entry entry { true, speed_effect.first, speed_effect.second, false }; + for( const speed_bonus_effect &effect : you.get_speed_bonus_effects() ) { + if( effect.bonus != 0 && speed_effects.end() == speed_effects.find( effect.description ) ) { + const speedlist_entry entry { true, effect.description, effect.bonus, false }; entries.push_back( entry ); } } + float movecost = 100; for( const run_cost_effect &effect : you.run_cost_effects( movecost ) ) { const int percent = std::trunc( effect.times * 100 - 100 ); // truncate toward 0%