summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-15 10:27:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-15 10:27:05 +0000
commitc0f2069689110d1df816d52e36d049d4b97a7a22 (patch)
tree79b5d2a9dbaff90eaf32470e1fd586f8c7ad43aa /src/map/script.c
parentf51be442a0990eb5755e10346abaeb94404af2b1 (diff)
downloadhercules-c0f2069689110d1df816d52e36d049d4b97a7a22.tar.gz
hercules-c0f2069689110d1df816d52e36d049d4b97a7a22.tar.bz2
hercules-c0f2069689110d1df816d52e36d049d4b97a7a22.tar.xz
hercules-c0f2069689110d1df816d52e36d049d4b97a7a22.zip
- Fixed a bunch of invalid memory access bugs as reported by Valgrind.
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is passed. (bugreport:3078) - Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state. - Corrected a few compiler warnings - Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index f0fab4ce6..a85346218 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7519,7 +7519,9 @@ BUILDIN_FUNC(killmonster)
}
}
+ map_freeblock_lock();
map_foreachinmap(buildin_killmonster_sub_strip, m, BL_MOB, event ,allflag);
+ map_freeblock_unlock();
return 0;
}
@@ -11160,7 +11162,7 @@ BUILDIN_FUNC(npcstop)
struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
if(nd) {
- unit_stop_walking(&nd->bl,1);
+ unit_stop_walking(&nd->bl,5);
}
return 0;
@@ -12738,7 +12740,7 @@ BUILDIN_FUNC(unitstop)
if( bl != NULL )
{
unit_stop_attack(bl);
- unit_stop_walking(bl,0);
+ unit_stop_walking(bl,4);
if( bl->type == BL_MOB )
((TBL_MOB*)bl)->target_id = 0;
}