mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
implement player ticks in headless mode & prevent on_player_tick call if player chunk does not exists
This commit is contained in:
parent
8e7dfe3e0b
commit
1cd85b6f77
9 changed files with 70 additions and 41 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "BlocksController.hpp"
|
||||
#include "ChunksController.hpp"
|
||||
#include "util/Clock.hpp"
|
||||
|
||||
class Engine;
|
||||
class Level;
|
||||
|
|
@ -17,6 +18,8 @@ class LevelController {
|
|||
// Sub-controllers
|
||||
std::unique_ptr<BlocksController> blocks;
|
||||
std::unique_ptr<ChunksController> chunks;
|
||||
|
||||
util::Clock playerTickClock;
|
||||
public:
|
||||
LevelController(Engine* engine, std::unique_ptr<Level> level, Player* clientPlayer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue