Object Events and some formatting corrections.

This commit is contained in:
Vatiken 2013-02-26 06:01:26 +00:00
parent 36f35cdf55
commit f0d34e6cd6
5 changed files with 55 additions and 35 deletions

View file

@ -816,6 +816,17 @@ void extract_obj(struct obj_data *obj)
if (SCRIPT(obj))
extract_script(obj, OBJ_TRIGGER);
if (obj->events != NULL) {
if (obj->events->iSize > 0) {
struct event * pEvent;
while ((pEvent = simple_list(obj->events)) != NULL)
event_cancel(pEvent);
}
free_list(obj->events);
obj->events = NULL;
}
if (GET_OBJ_RNUM(obj) == NOTHING || obj->proto_script != obj_proto[GET_OBJ_RNUM(obj)].proto_script)
free_proto_script(obj, OBJ_TRIGGER);