diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-27 16:37:31 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-03-27 16:37:31 +0000 |
commit | 1740acaa418d4f7c079f43e5bdf8bb36ef73d4f6 (patch) | |
tree | a5b11ec3360e5f684a586cadb9a509ebaeceac84 /src/map | |
parent | b7bda5cccb691b35415a7aa1f51190c4ca487fc9 (diff) | |
download | hercules-1740acaa418d4f7c079f43e5bdf8bb36ef73d4f6.tar.gz hercules-1740acaa418d4f7c079f43e5bdf8bb36ef73d4f6.tar.bz2 hercules-1740acaa418d4f7c079f43e5bdf8bb36ef73d4f6.tar.xz hercules-1740acaa418d4f7c079f43e5bdf8bb36ef73d4f6.zip |
Fixed a mistake in r12223, where during warping between mapservers, a character's coordinates would get changed before removing the character from the map, producing an infinite loop if the character returned back to the original coordinates. (bugreport:1286)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12442 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 838de158d..e9dde09de 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3586,11 +3586,12 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y if(!sd->mapindex || map_mapname2ipport(mapindex,&ip,&port)) return 2; + //remove from map, THEN change x/y coordinates + unit_remove_map_pc(sd,clrtype); sd->mapindex = mapindex; sd->bl.x=x; sd->bl.y=y; pc_clean_skilltree(sd); - unit_remove_map_pc(sd,clrtype); chrif_save(sd,2); chrif_changemapserver(sd, ip, (short)port); //It is important to invoke remove_map separately from unit_free before |