summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-11 10:12:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-11 10:12:58 +0000
commit0f94f735f50a320d97c0dacb806de2a65662cc3c (patch)
tree47509760c4ca70a6bfe7d6599db9e27e0f2c8c4c /src/map/map.c
parenta1079df40c646c82f6c7fc1e17c1dc0976fbb28c (diff)
downloadhercules-0f94f735f50a320d97c0dacb806de2a65662cc3c.tar.gz
hercules-0f94f735f50a320d97c0dacb806de2a65662cc3c.tar.bz2
hercules-0f94f735f50a320d97c0dacb806de2a65662cc3c.tar.xz
hercules-0f94f735f50a320d97c0dacb806de2a65662cc3c.zip
- Cleaned up pc_calc_weapontype
- made on-touch areas work with walking npcs. Note that the implementation is performance may not be optimal, but I am not sure if it can be done in any better way. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11713 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 495676082..19006cf35 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -465,7 +465,9 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
if (sc->data[SC_MAGICROD].timer != -1)
status_change_end(bl, SC_MAGICROD, -1);
}
- }
+ } else
+ if (bl->type == BL_NPC) npc_unsetcells((BL_NPC*)bl);
+
if (moveblock) map_delblock_sub(bl,0);
#ifdef CELL_NOSTACK
else map_delblcell(bl);
@@ -488,7 +490,8 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
skill_unit_move_unit_group((struct skill_unit_group *)sc->data[SC_WARM].val4, bl->m, x1-x0, y1-y0);
}
}
- }
+ } else
+ if (bl->type == BL_NPC) npc_setcells((BL_NPC*)bl);
return 0;
}