mirror of
https://github.com/nkomarn/harbor.git
synced 2025-01-05 07:07:34 +01:00
Fix proportional acceleration speed calculation
This commit is contained in:
parent
fc625c9da0
commit
42f51938e3
@ -45,8 +45,8 @@ public class AccelerateNightTask extends BukkitRunnable {
|
||||
int dayTime = Math.max(150, config.getInteger("night-skip.daytime-ticks"));
|
||||
int sleeping = checker.getSleepingPlayers(world).size();
|
||||
|
||||
if (config.getBoolean("night-skip.proportional-acceleration") && sleeping != 0) {
|
||||
timeRate = Math.min(timeRate, Math.round(timeRate / world.getPlayers().size() * sleeping));
|
||||
if (config.getBoolean("night-skip.proportional-acceleration")) {
|
||||
timeRate = Math.min(timeRate, Math.round(timeRate / world.getPlayers().size() * Math.max(1, sleeping)));
|
||||
}
|
||||
|
||||
if (time >= (dayTime - timeRate * 1.5) && time <= dayTime) {
|
||||
|
Loading…
Reference in New Issue
Block a user