Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarClientCommandProcessor.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-11-24 20:35:45 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2023-11-24 20:35:45 +1100
commit994b0fe3cff39a2640d931aa3677f2474863cd47 (patch)
tree804f5d051873aa48c65224dbd14a36a11654a3ca /source/frontend/StarClientCommandProcessor.cpp
parentde53f8c7d73bcd3e2aab57e56f337818fd11ce92 (diff)
Fix TestUniverse
Diffstat (limited to 'source/frontend/StarClientCommandProcessor.cpp')
-rw-r--r--source/frontend/StarClientCommandProcessor.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp
index 00ec2e5..933d87b 100644
--- a/source/frontend/StarClientCommandProcessor.cpp
+++ b/source/frontend/StarClientCommandProcessor.cpp
@@ -155,24 +155,27 @@ String ClientCommandProcessor::boxes() {
if (!adminCommandAllowed())
return "You must be an admin to use this command.";
- return strf("Geometry debug display {}",
- m_universeClient->worldClient()->toggleCollisionDebug()
- ? "enabled" : "disabled");
+ auto worldClient = m_universeClient->worldClient();
+ bool state = !worldClient->collisionDebug();
+ worldClient->setCollisionDebug(state);
+ return strf("Geometry debug display {}", state ? "enabled" : "disabled");
}
String ClientCommandProcessor::fullbright() {
if (!adminCommandAllowed())
return "You must be an admin to use this command.";
- return strf("Fullbright render lighting {}",
- m_universeClient->worldClient()->toggleFullbright()
- ? "enabled" : "disabled");
+ auto worldClient = m_universeClient->worldClient();
+ bool state = !worldClient->fullBright();
+ worldClient->setFullBright(state);
+ return strf("Fullbright render lighting {}", state ? "enabled" : "disabled");
}
String ClientCommandProcessor::asyncLighting() {
- return strf("Asynchronous render lighting {}",
- m_universeClient->worldClient()->toggleAsyncLighting()
- ? "enabled" : "disabled");
+ auto worldClient = m_universeClient->worldClient();
+ bool state = !worldClient->asyncLighting();
+ worldClient->setAsyncLighting(state);
+ return strf("Asynchronous render lighting {}", state ? "enabled" : "disabled");
}
String ClientCommandProcessor::setGravity(String const& argumentsString) {