summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-23 10:40:54 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-23 10:40:54 +0000
commit9a545eac54af73dabf7a34de89e98a7d30b124f0 (patch)
tree2235cbb18525eb6e05b662d3a87dbcfd98668c86
parent44e6bd5d396dd89cb6d5981d6dc3eee14df1e945 (diff)
downloadhercules-9a545eac54af73dabf7a34de89e98a7d30b124f0.tar.gz
hercules-9a545eac54af73dabf7a34de89e98a7d30b124f0.tar.bz2
hercules-9a545eac54af73dabf7a34de89e98a7d30b124f0.tar.xz
hercules-9a545eac54af73dabf7a34de89e98a7d30b124f0.zip
Reloadscript cleanup
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6707 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/script.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 72e0935dd..e6539bd5c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11966,9 +11966,20 @@ int script_reload()
mapreg_db->clear(mapreg_db, NULL);
mapregstr_db->clear(mapreg_db, NULL);
- userfunc_db->clear(mapreg_db, NULL);
+ userfunc_db->clear(mapreg_db,do_final_userfunc_sub);
scriptlabel_db->clear(mapreg_db, NULL);
-
+
+ if(sleep_db) {
+ struct linkdb_node *n = (struct linkdb_node *)sleep_db;
+ while(n) {
+ struct script_state *st = (struct script_state *)n->data;
+ script_free_stack(st->stack);
+ free(st);
+ n = n->next;
+ }
+ linkdb_final(&sleep_db);
+ }
+
script_load_mapreg();
return 0;
}