diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 15 |
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;
}
|