Skip to content

Commit

Permalink
Relax time acceleration limits
Browse files Browse the repository at this point in the history
- Slightly reduce time acceleration limits to allow 1000x time acceleration in medium/high orbits around small bodies
  • Loading branch information
sturnclaw committed Oct 8, 2023
1 parent ae75ff7 commit 674b1b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,17 +375,17 @@ bool Game::UpdateTimeAccel()

vector3d toBody = m_player->GetPosition() - b->GetPositionRelTo(m_player->GetFrame());
double dist = toBody.Length();
double rad = b->GetPhysRadius();
double rad = std::max(b->GetPhysRadius(), 10000.0);

if (dist < 1000.0) {
newTimeAccel = std::min(newTimeAccel, Game::TIMEACCEL_1X);
} else if (dist < std::min(rad + 0.0001 * AU, rad * 1.1)) {
newTimeAccel = std::min(newTimeAccel, Game::TIMEACCEL_10X);
} else if (dist < std::min(rad + 0.001 * AU, rad * 5.0)) {
} else if (dist < std::min(rad + 0.001 * AU, rad * 2.5)) {
newTimeAccel = std::min(newTimeAccel, Game::TIMEACCEL_100X);
} else if (dist < std::min(rad + 0.01 * AU, rad * 10.0)) {
} else if (dist < std::min(rad + 0.01 * AU, rad * 5.0)) {
newTimeAccel = std::min(newTimeAccel, Game::TIMEACCEL_1000X);
} else if (dist < std::min(rad + 0.1 * AU, rad * 1000.0)) {
} else if (dist < std::min(rad + 0.1 * AU, rad * 500.0)) {
newTimeAccel = std::min(newTimeAccel, Game::TIMEACCEL_10000X);
}
}
Expand Down

0 comments on commit 674b1b7

Please sign in to comment.