v0.9.3: fixed further issues with actor IDs caused by saving/loading

This commit is contained in:
Evan Debenham 2021-04-28 20:36:59 -04:00
parent 9a52b49467
commit 1792974051
2 changed files with 2 additions and 1 deletions

View File

@ -559,6 +559,7 @@ public class Dungeon {
seed = bundle.contains( SEED ) ? bundle.getLong( SEED ) : DungeonSeed.randomSeed();
Actor.clear();
Actor.restoreNextID( bundle );
quickslot.reset();

View File

@ -111,7 +111,6 @@ public abstract class Actor implements Bundlable {
}
}
private static int nextID = 1;
public int id() {
if (id > 0) {
return id;
@ -129,6 +128,7 @@ public abstract class Actor implements Bundlable {
private static volatile Actor current;
private static SparseArray<Actor> ids = new SparseArray<>();
private static int nextID = 1;
private static float now = 0;