diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java index 8471d3917..59f1269d5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java @@ -104,7 +104,12 @@ public abstract class Actor implements Bundlable { @Override public void restoreFromBundle( Bundle bundle ) { time = bundle.getFloat( TIME ); - id = bundle.getInt( ID ); + int incomingID = bundle.getInt( ID ); + if (Actor.findById(id) == null){ + id = incomingID; + } else { + id = nextID++; + } } private static int nextID = 1;