turbo_speed defaults to 2.0 instead of 1.0
tuned scrolling speed range a bit (slightly slower) accel_time should be constant, added comments to clarify
This commit is contained in:
parent
35e137f8ed
commit
9cb4ddebc6
2 changed files with 7 additions and 7 deletions
|
@ -94,7 +94,7 @@ display::display(unit_map& units, CVideo& video, const gamemap& map,
|
|||
invalidateAll_(true), invalidateUnit_(true),
|
||||
invalidateGameStatus_(true), panelsDrawn_(false),
|
||||
currentTeam_(0), activeTeam_(0),
|
||||
turbo_speed_(1), turbo_(false), grid_(false), sidebarScaling_(1.0),
|
||||
turbo_speed_(2), turbo_(false), grid_(false), sidebarScaling_(1.0),
|
||||
theme_(theme_cfg,screen_area()), builder_(cfg, level, map),
|
||||
first_turn_(true), in_game_(false), map_labels_(*this,map, 0),
|
||||
tod_hex_mask1(NULL), tod_hex_mask2(NULL), reach_map_changed_(true),
|
||||
|
@ -601,8 +601,8 @@ void display::scroll_to_tile(int x, int y, SCROLL_TYPE scroll_type, bool check_f
|
|||
int t_prev = SDL_GetTicks();
|
||||
|
||||
// those values might need some fine-tuning:
|
||||
const double accel_time = 0.3*turbo_speed(); // seconds
|
||||
const double decel_time = 0.4*turbo_speed(); // seconds
|
||||
const double accel_time = 0.3; // seconds until full speed is reached
|
||||
const double decel_time = 0.4; // seconds from full speed to stop
|
||||
|
||||
double velocity = 0.0;
|
||||
while (dist_moved < dist_total) {
|
||||
|
@ -618,8 +618,8 @@ void display::scroll_to_tile(int x, int y, SCROLL_TYPE scroll_type, bool check_f
|
|||
|
||||
//std::cout << t << " " << hypot(x_old, y_old) << "\n";
|
||||
|
||||
double velocity_max = preferences::scroll_speed() * 80.0;
|
||||
velocity_max *= turbo_speed();
|
||||
double velocity_max = preferences::scroll_speed() * 60.0;
|
||||
velocity_max *= turbo_speed();
|
||||
double accel = velocity_max / accel_time;
|
||||
double decel = velocity_max / decel_time;
|
||||
|
||||
|
|
|
@ -181,12 +181,12 @@ void _set_turbo(bool ison)
|
|||
|
||||
double turbo_speed()
|
||||
{
|
||||
return lexical_cast_default<double>(prefs["turbo_speed"], 1);
|
||||
return lexical_cast_default<double>(prefs["turbo_speed"], 2);
|
||||
}
|
||||
|
||||
void save_turbo_speed(const double speed)
|
||||
{
|
||||
prefs["turbo_speed"] = lexical_cast_default<std::string>(speed, "1");
|
||||
prefs["turbo_speed"] = lexical_cast_default<std::string>(speed, "2");
|
||||
}
|
||||
|
||||
bool show_lobby_minimaps()
|
||||
|
|
Loading…
Add table
Reference in a new issue