diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 4ef38ff52..d2379e5a8 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -589,7 +589,7 @@ int npc_timerevent(int tid,unsigned int tick,int id,int data) nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,id,next); } - run_script(nd->u.scr.script,te->pos,0,nd->bl.id); + run_script(nd->u.scr.script,te->pos,nd->u.scr.timerrid,nd->bl.id); return 0; } /*========================================== @@ -612,6 +612,7 @@ int npc_timerevent_start(struct npc_data *nd) } nd->u.scr.nexttimer=j; nd->u.scr.timertick=gettick(); + nd->u.scr.timerrid=0; // no players attached by default [celest] if(j>=n) return 0; |