From a3cb4a25426511f1c2c97393923501003ba0a9b6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 3 Dec 2014 15:42:54 -0500 Subject: [PATCH] v0.2.3: re-fixed a bug with mobs and save/loading --- .../shatteredpixeldungeon/actors/mobs/Mob.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index a4e2a0e4c..2057de822 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -17,8 +17,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; -import java.util.HashSet; - import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -41,6 +39,8 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.utils.Bundle; import com.watabou.utils.Random; +import java.util.HashSet; + public abstract class Mob extends Char { 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) { bundle.put( STATE, Passive.TAG ); } + bundle.put( SEEN, enemySeen ); bundle.put( TARGET, target ); } @@ -121,6 +122,8 @@ public abstract class Mob extends Char { this.state = PASSIVE; } + enemySeen = bundle.getBoolean( SEEN ); + target = bundle.getInt( TARGET ); }