fix: entities despawn on F5
This commit is contained in:
parent
74a714fe2c
commit
6ab48fda93
@ -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…
x
Reference in New Issue
Block a user