summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 8bdba2871..d8b1436a0 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -498,7 +498,12 @@ int npc_timerevent_start(struct npc_data* nd, int rid)
}
//Check if timer is already started.
- if( (sd && sd->npc_timer_id != -1) || nd->u.scr.timerid != -1 )
+ if( sd )
+ {
+ if( sd->npc_timer_id != -1 )
+ return 0;
+ }
+ else if( nd->u.scr.timerid != -1 )
return 0;
ted = ers_alloc(timer_event_ers, struct timer_event_data);