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

summaryrefslogtreecommitdiff
path: root/source/frontend/StarClientCommandProcessor.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-29 10:11:19 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-29 10:11:19 +1000
commit624c7aaaf192f2e87081a241123a8507a4718ba3 (patch)
treea54b09902da8d724f3ba740a215fd53d8a861fd9 /source/frontend/StarClientCommandProcessor.cpp
parent9d67cda97fc327ca3c53e044a897fbfb196104c4 (diff)
Move lighting calculation to separate thread
Diffstat (limited to 'source/frontend/StarClientCommandProcessor.cpp')
-rw-r--r--source/frontend/StarClientCommandProcessor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp
index f006d8e..b6ab53c 100644
--- a/source/frontend/StarClientCommandProcessor.cpp
+++ b/source/frontend/StarClientCommandProcessor.cpp
@@ -24,6 +24,7 @@ ClientCommandProcessor::ClientCommandProcessor(UniverseClientPtr universeClient,
{"debug", bind(&ClientCommandProcessor::debug, this)},
{"boxes", bind(&ClientCommandProcessor::boxes, this)},
{"fullbright", bind(&ClientCommandProcessor::fullbright, this)},
+ {"asyncLighting", bind(&ClientCommandProcessor::asyncLighting, this)},
{"setGravity", bind(&ClientCommandProcessor::setGravity, this, _1)},
{"resetGravity", bind(&ClientCommandProcessor::resetGravity, this)},
{"fixedCamera", bind(&ClientCommandProcessor::fixedCamera, this)},
@@ -151,6 +152,12 @@ String ClientCommandProcessor::fullbright() {
? "enabled" : "disabled");
}
+String ClientCommandProcessor::asyncLighting() {
+ return strf("Asynchronous render lighting {}",
+ m_universeClient->worldClient()->toggleAsyncLighting()
+ ? "enabled" : "disabled");
+}
+
String ClientCommandProcessor::setGravity(StringList const& arguments) {
if (!adminCommandAllowed())
return "You must be an admin to use this command.";