mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-27 04:28:48 +01:00
Object Events and some formatting corrections.
This commit is contained in:
parent
36f35cdf55
commit
f0d34e6cd6
5 changed files with 55 additions and 35 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue