- Timestamp:
- Jul 24, 2014, 3:25:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/TelnetCommands/GetTime.cs
r84 r103 19 19 public override void Run (string[] _params) 20 20 { 21 ulong time = this.m_Console.gameManager.World.gameTime; 22 int day = (int)(time / 24000) + 1; 23 int hour = (int)(time % 24000) / 1000 + 8; 24 if (hour > 23) { 25 day++; 26 hour -= 24; 21 try { 22 ulong time = this.m_Console.gameManager.World.gameTime; 23 int day = (int)(time / 24000) + 1; 24 int hour = (int)(time % 24000) / 1000 + 8; 25 if (hour > 23) { 26 day++; 27 hour -= 24; 28 } 29 int min = (int)(time % 1000) * 60 / 1000; 30 m_Console.md000a (String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, min)); 31 } catch (Exception e) { 32 Log.Out ("Error in GetTime.Run: " + e); 27 33 } 28 int min = (int)(time % 1000) * 60 / 1000;29 m_Console.md000a (String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, min));30 34 } 31 35 }
Note:
See TracChangeset
for help on using the changeset viewer.