mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
fix tick intervals in headless mode
This commit is contained in:
parent
843cc3769d
commit
0975fcd819
4 changed files with 56 additions and 41 deletions
|
|
@ -130,11 +130,15 @@ void BlocksController::updateBlock(int x, int y, int z) {
|
|||
}
|
||||
|
||||
void BlocksController::update(float delta, uint padding) {
|
||||
if (randTickClock.update(delta)) {
|
||||
randomTick(randTickClock.getPart(), randTickClock.getParts(), padding);
|
||||
if (int parts = randTickClock.update(delta)) {
|
||||
for (int i = 0; i < parts; i++) {
|
||||
randomTick(randTickClock.convertPart(i), randTickClock.getParts(), padding);
|
||||
}
|
||||
}
|
||||
if (blocksTickClock.update(delta)) {
|
||||
onBlocksTick(blocksTickClock.getTickId(), blocksTickClock.getParts());
|
||||
if (int parts = blocksTickClock.update(delta)) {
|
||||
for (int i = 0; i < parts; i++) {
|
||||
onBlocksTick(blocksTickClock.convertPart(i), blocksTickClock.getParts());
|
||||
}
|
||||
}
|
||||
if (worldTickClock.update(delta)) {
|
||||
scripting::on_world_tick(worldTickClock.getTickRate());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue