From: Oskar Wiksten Date: Wed, 29 Aug 2012 14:52:45 +0000 (+0000) Subject: Bugfix: do not reset NPCs on current map when resting. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=628367f77363265d80ec786ad2de24a97957873e;p=users%2Fmchehab%2Fandors-trail.git Bugfix: do not reset NPCs on current map when resting. --- diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/Controller.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/Controller.java index 3caefd6..7fc33e4 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/Controller.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/Controller.java @@ -67,9 +67,9 @@ public final class Controller { if (lostExp < 0) lostExp = 0; player.addExperience(-lostExp); model.statistics.addPlayerDeath(lostExp); - playerRested(world, null); final MainActivity act = view.mainActivity; MovementController.respawnPlayer(act.getResources(), world); + playerRested(world, null); act.updateStatus(); act.mainview.notifyMapChanged(world.model); act.message(act.getResources().getString(R.string.combat_hero_dies, lostExp)); @@ -86,6 +86,9 @@ public final class Controller { player.spawnMap = world.model.currentMap.name; } resetMaps(world, false, true); + if (area != null) { + world.model.currentMap.spawnAll(world); + } } public static void ui_playerRested(final Activity currentActivity, final ViewContext viewContext, MapObject area) {