From 184f0ed51d24cbc1eac68becfadfa6c7e50e9403 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 7 Aug 2006 17:43:53 +0000 Subject: - Cleaned some of mpeg's updated work. - Fixed HT_BLITZBEAT hitting neutral characters when it auto-triggers. - Simplified the Tatami Gaeshi code. - Fixed AS_SPLASHER doing full damage on everyone except targetted char instead of the other way around. - Fixed KAENSIN clearing out SUITON cells and viceversa. - The spawn area is now seen as range rather than absolute for mob spawn lines. This means that x,y,10,10 will spawn the mob on a 21x21 grid around the given x,y point. - Some clean up of the mob-spawn code. Now you can specify negative areas, so that a spawn location such as 100,150,0,-1 will spawn a mob always on x=100, but any Y value of the current map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8165 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 0ebec7aaf..90345feea 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2209,17 +2209,18 @@ int npc_parse_mob (char *w1, char *w2, char *w3, char *w4) mob.class_ = (short) class_; mob.x = (unsigned short)x; mob.y = (unsigned short)y; - mob.xs = (unsigned short)xs; - mob.ys = (unsigned short)ys; + mob.xs = (signed short)xs; + mob.ys = (signed short)ys; if (mob.num > 1 && battle_config.mob_count_rate != 100) { if ((mob.num = mob.num * battle_config.mob_count_rate / 100) < 1) mob.num = 1; } - if (battle_config.force_random_spawn) + if (battle_config.force_random_spawn || (mob.x == 0 && mob.y == 0)) { //Force a random spawn anywhere on the map. - mob.x = mob.y = mob.xs = mob.ys = 0; + mob.x = mob.y = 0; + mob.xs = mob.ys = -1; } //Apply the spawn delay fix [Skotlex] -- cgit v1.2.3-70-g09d2