Fixed problem with animation when leaving Fog Of War
Fixed problem with animation when leaving Fog Of War

--- a/src/com/dryerzinia/pokemon/map/Level.java
+++ b/src/com/dryerzinia/pokemon/map/Level.java
@@ -88,7 +88,7 @@
 

 		for(Person person : peopleInLevel)

     		if(UI.visibleManhattanDistance > GameState.getMap().manhattanDistance(ClientState.player.getPose(), person.getPose()))

-    			person.draw(person.getPose().getY() - x, person.getPose().getY() - y, graphics);

+   				person.draw(person.getPose().getY() - x, person.getPose().getY() - y, graphics);

 

 		for(Player player : playersInLevel)

 			if(PokemonServer.VISIBLE_DISTANCE > GameState.getMap().manhattanDistance(ClientState.player.getPose(), player.getPose()))


--- a/src/com/dryerzinia/pokemon/net/msg/client/act/SendActMovedClientMessage.java
+++ b/src/com/dryerzinia/pokemon/net/msg/client/act/SendActMovedClientMessage.java
@@ -5,7 +5,6 @@
 
 import java.io.*;
 
-import com.dryerzinia.pokemon.map.Direction;
 import com.dryerzinia.pokemon.map.Pose;
 import com.dryerzinia.pokemon.net.Client;
 import com.dryerzinia.pokemon.net.msg.server.act.RequestPerson;

--- a/src/com/dryerzinia/pokemon/net/msg/server/PlayerPositionMessage.java
+++ b/src/com/dryerzinia/pokemon/net/msg/server/PlayerPositionMessage.java
@@ -83,8 +83,10 @@
         	/*
         	 * Sweet spot for Spotting people
         	 */
-    		if((distance < PokemonServer.VISIBLE_DISTANCE && distance > PokemonServer.VISIBLE_DISTANCE-PokemonServer.TRANSITION_ZONE) || (distance < PokemonServer.VISIBLE_DISTANCE && levelChange))
+    		if((distance < PokemonServer.VISIBLE_DISTANCE && distance > PokemonServer.VISIBLE_DISTANCE-PokemonServer.TRANSITION_ZONE) || (distance < PokemonServer.VISIBLE_DISTANCE && levelChange)){
     			p.writeClientMessage(new SendActMovedClientMessage(person.id, person.getPose()));
+    			System.out.println(person.getPose());
+    		}
 
     		/*
         	 * Sweet spot for people leaving

--- a/src/com/dryerzinia/pokemon/obj/MovementAnimator.java
+++ b/src/com/dryerzinia/pokemon/obj/MovementAnimator.java
@@ -210,10 +210,14 @@
     		 * If we get a new position where character is facing
     		 * Direction.NONE that means player is in fog of war so we need to
     		 * forget where player is
-    		 */
-    		if(newPosition.facing() == Direction.NONE){
+    		 * If the position is already fog of war we just set the new position
+    		 * as the current position no animation
+    		 */
+    		if(newPosition.facing() == Direction.NONE || position.getLevel() == -1){
+
     			position.set(newPosition);
     			return null;
+
     		}
 
     		boolean directionChange = position.facing() != newPosition.facing();

--- a/src/com/dryerzinia/pokemon/obj/tiles/Person.java
+++ b/src/com/dryerzinia/pokemon/obj/tiles/Person.java
@@ -2,15 +2,18 @@
 

 import java.io.*;

 import java.util.HashMap;

+import java.util.Iterator;

 import java.awt.*;

 

 import com.dryerzinia.pokemon.event.EventCore;

 import com.dryerzinia.pokemon.map.Direction;

+import com.dryerzinia.pokemon.map.Level;

 import com.dryerzinia.pokemon.map.Pose;

 import com.dryerzinia.pokemon.ui.menu.GMenu;

 import com.dryerzinia.pokemon.util.ResourceLoader;

 import com.dryerzinia.pokemon.obj.Actor;

 import com.dryerzinia.pokemon.obj.ClientState;

+import com.dryerzinia.pokemon.obj.GameState;

 import com.dryerzinia.pokemon.obj.MovementAnimator;

 

 public class Person extends Tile implements Actor, OnClick {