diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-11 10:12:58 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-11 10:12:58 +0000 |
commit | 0f94f735f50a320d97c0dacb806de2a65662cc3c (patch) | |
tree | 47509760c4ca70a6bfe7d6599db9e27e0f2c8c4c /src/map/npc.c | |
parent | a1079df40c646c82f6c7fc1e17c1dc0976fbb28c (diff) | |
download | hercules-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/npc.c')
-rw-r--r-- | src/map/npc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index f6e7f0cf0..4752991c7 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1977,7 +1977,7 @@ void npc_unsetcells(struct npc_data* nd) if (m < 0 || xs < 1 || ys < 1) return; - //Locate max range on which we can localte npce cells + //Locate max range on which we can locate npc cells for(x0 = x-xs/2; x0 > 0 && map_getcell(m, x0, y, CELL_CHKNPC); x0--); for(x1 = x+xs/2-1; x1 < map[m].xs && map_getcell(m, x1, y, CELL_CHKNPC); x1++); for(y0 = y-ys/2; y0 > 0 && map_getcell(m, x, y0, CELL_CHKNPC); y0--); @@ -1999,11 +1999,9 @@ void npc_movenpc(struct npc_data* nd, int x, int y) x = cap_value(x, 0, map[m].xs-1); y = cap_value(y, 0, map[m].ys-1); - npc_unsetcells(nd); map_foreachinrange(clif_outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); map_moveblock(&nd->bl, x, y, gettick()); map_foreachinrange(clif_insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl); - npc_setcells(nd); } int npc_changename(const char* name, const char* newname, short look) |