v0.2.3: re-fixed a bug with mobs and save/loading

This commit is contained in:
Evan Debenham 2014-12-03 15:42:54 -05:00
parent d4b66ae6ef
commit a3cb4a2542

View File

@ -17,8 +17,6 @@
*/ */
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import java.util.HashSet;
import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -41,6 +39,8 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Random; import com.watabou.utils.Random;
import java.util.HashSet;
public abstract class Mob extends Char { public abstract class Mob extends Char {
private static final String TXT_DIED = "You hear something died in the distance"; private static final String TXT_DIED = "You hear something died in the distance";
@ -100,6 +100,7 @@ public abstract class Mob extends Char {
} else if (state == PASSIVE) { } else if (state == PASSIVE) {
bundle.put( STATE, Passive.TAG ); bundle.put( STATE, Passive.TAG );
} }
bundle.put( SEEN, enemySeen );
bundle.put( TARGET, target ); bundle.put( TARGET, target );
} }
@ -121,6 +122,8 @@ public abstract class Mob extends Char {
this.state = PASSIVE; this.state = PASSIVE;
} }
enemySeen = bundle.getBoolean( SEEN );
target = bundle.getInt( TARGET ); target = bundle.getInt( TARGET );
} }