Update Commands.cs
(time % 1.0) * 60.0 can be equal to 59.8, then it gets rounded to undesirable 60 displayed in the time format
This commit is contained in:
parent
c4452c6d13
commit
c8549db087
1 changed files with 1 additions and 1 deletions
|
|
@ -3872,7 +3872,7 @@ namespace TShockAPI
|
|||
if (!Main.dayTime)
|
||||
time += 15.0;
|
||||
time = time % 24.0;
|
||||
args.Player.SendInfoMessage("The current time is {0}:{1:D2}.", (int)Math.Floor(time), (int)Math.Round((time % 1.0) * 60.0));
|
||||
args.Player.SendInfoMessage("The current time is {0}:{1:D2}.", (int)Math.Floor(time), (int)Math.Floor((time % 1.0) * 60.0));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue