mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
fix: entities despawn on F5
This commit is contained in:
parent
74a714fe2c
commit
6ab48fda93
1 changed files with 3 additions and 1 deletions
|
|
@ -167,10 +167,12 @@ void GlobalChunks::decref(Chunk* chunk) {
|
||||||
ekey.pos[0] = chunk->x;
|
ekey.pos[0] = chunk->x;
|
||||||
ekey.pos[1] = chunk->z;
|
ekey.pos[1] = chunk->z;
|
||||||
|
|
||||||
|
save(chunk);
|
||||||
|
|
||||||
if (onUnload) {
|
if (onUnload) {
|
||||||
onUnload(*chunk);
|
onUnload(*chunk);
|
||||||
}
|
}
|
||||||
save(chunk);
|
|
||||||
chunksMap.erase(ekey.key);
|
chunksMap.erase(ekey.key);
|
||||||
refCounters.erase(found);
|
refCounters.erase(found);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue