Browse Source

fix initialization order issues

feature/replace-renderer
Martin Dørum 3 years ago
parent
commit
fc129655b5
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      libswan/include/swan/LightServer.h

+ 3
- 2
libswan/include/swan/LightServer.h View File

void processEvent(const Event &event, std::vector<NewLightChunk> &newChunks); void processEvent(const Event &event, std::vector<NewLightChunk> &newChunks);
void run(); void run();


LightCallback &cb_;
bool running_ = true; bool running_ = true;
std::map<std::pair<int, int>, LightChunk> chunks_; std::map<std::pair<int, int>, LightChunk> chunks_;
std::set<std::pair<int, int>> updatedChunks_; std::set<std::pair<int, int>> updatedChunks_;
int buffer_ = 0; int buffer_ = 0;
std::vector<Event> buffers_[2] = { {}, {} }; std::vector<Event> buffers_[2] = { {}, {} };
std::vector<NewLightChunk> newChunkBuffers_[2] = { {}, {} }; std::vector<NewLightChunk> newChunkBuffers_[2] = { {}, {} };
std::thread thread_;
std::condition_variable cond_; std::condition_variable cond_;
std::mutex mut_; std::mutex mut_;

LightCallback &cb_;
std::thread thread_;
}; };


inline void LightServer::onSolidBlockAdded(TilePos pos) { inline void LightServer::onSolidBlockAdded(TilePos pos) {

Loading…
Cancel
Save