diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-19 14:44:21 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-19 14:44:21 +1100 |
commit | 17ea975970d8f2be994bb1c8e7646f9c8a6c4647 (patch) | |
tree | 15cce8038d3d4ea4482cce5bb03a4d989687c0d2 | |
parent | 5ca42599ef52236274938dba9bd6e113611cb734 (diff) |
Update StarCommandProcessor.cpp
-rw-r--r-- | source/game/StarCommandProcessor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarCommandProcessor.cpp b/source/game/StarCommandProcessor.cpp index ee0b4fb..46222ce 100644 --- a/source/game/StarCommandProcessor.cpp +++ b/source/game/StarCommandProcessor.cpp @@ -222,7 +222,7 @@ String CommandProcessor::timescale(ConnectionId connectionId, String const& argu auto arguments = m_parser.tokenizeToStringList(argumentsString); if (arguments.empty()) - return "Not enough arguments to /timescale"; + return strf("Current timescale is {:6.6f}x", GlobalTimescale); float timescale = clamp(lexicalCast<float>(arguments[0]), 0.001f, 32.0f); m_universe->setTimescale(timescale); @@ -236,11 +236,11 @@ String CommandProcessor::tickrate(ConnectionId connectionId, String const& argum auto arguments = m_parser.tokenizeToStringList(argumentsString); if (arguments.empty()) - return "Not enough arguments to /tickrate"; + return strf("Current tick rate is {:4.2f}Hz", 1.0f / ServerGlobalTimestep); - unsigned tickRate = clamp<unsigned>(lexicalCast<unsigned>(arguments[0]), 5, 500); + float tickRate = clamp(lexicalCast<float>(arguments[0]), 5.f, 500.f); m_universe->setTickRate(tickRate); - return strf("Set tick rate to {}Hz", tickRate); + return strf("Set tick rate to {:4.2f}Hz", tickRate); } String CommandProcessor::setTileProtection(ConnectionId connectionId, String const& argumentString) { |