mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
add 'network' permission
This commit is contained in:
parent
7eeac66abf
commit
0af072a129
10 changed files with 67 additions and 27 deletions
|
|
@ -138,7 +138,10 @@ void Engine::initialize(CoreParameters coreParameters) {
|
|||
|
||||
editor = std::make_unique<devtools::Editor>(*this);
|
||||
cmd = std::make_unique<cmd::CommandsInterpreter>();
|
||||
network = network::Network::create(settings.network);
|
||||
|
||||
if (project->permissions.has(Permissions::NETWORK)) {
|
||||
network = network::Network::create(settings.network);
|
||||
}
|
||||
|
||||
if (!params.debugServerString.empty()) {
|
||||
try {
|
||||
|
|
@ -233,7 +236,9 @@ void Engine::run() {
|
|||
}
|
||||
|
||||
void Engine::postUpdate() {
|
||||
network->update();
|
||||
if (network) {
|
||||
network->update();
|
||||
}
|
||||
postRunnables.run();
|
||||
scripting::process_post_runnables();
|
||||
|
||||
|
|
@ -266,6 +271,8 @@ void Engine::nextFrame(bool waitForRefresh) {
|
|||
}
|
||||
|
||||
void Engine::startPauseLoop() {
|
||||
assert (network != nullptr);
|
||||
|
||||
bool initialCursorLocked = false;
|
||||
if (!isHeadless()) {
|
||||
initialCursorLocked = input->isCursorLocked();
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@
|
|||
#include "CoreParameters.hpp"
|
||||
#include "PostRunnables.hpp"
|
||||
#include "Time.hpp"
|
||||
#include "delegates.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "typedefs.hpp"
|
||||
#include "util/ObjectsKeeper.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
class Assets;
|
||||
class ContentControl;
|
||||
|
|
@ -161,8 +160,8 @@ public:
|
|||
return *window;
|
||||
}
|
||||
|
||||
network::Network& getNetwork() {
|
||||
return *network;
|
||||
network::Network* getNetwork() {
|
||||
return network.get();
|
||||
}
|
||||
|
||||
cmd::CommandsInterpreter& getCmd() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue