summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-09 01:25:19 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-09 01:25:19 +0000
commit8bd7cb69b1242ac0bf42a6bb3f77afda516d1fe9 (patch)
treee8dbfa89bca142b0813f16392a291dcbccc174bb /src/map/npc.c
parent5487756030da284dd45d9114e6c820154607af6c (diff)
downloadhercules-8bd7cb69b1242ac0bf42a6bb3f77afda516d1fe9.tar.gz
hercules-8bd7cb69b1242ac0bf42a6bb3f77afda516d1fe9.tar.bz2
hercules-8bd7cb69b1242ac0bf42a6bb3f77afda516d1fe9.tar.xz
hercules-8bd7cb69b1242ac0bf42a6bb3f77afda516d1fe9.zip
* Added const to the return value of get_timer.
* Added a maximum timer interval. Avoids server shutdowns being delayed for ~10 seconds under some circumstances on windows. * Replaced the fake timer heap (ordered array) with a binary min heap. (actually, this is just a merge and has been in use for months) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12926 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index c987bd5b8..827ee76f8 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -511,7 +511,7 @@ int npc_timerevent_start(struct npc_data* nd, int rid)
int npc_timerevent_stop(struct npc_data* nd)
{
struct map_session_data *sd =NULL;
- struct TimerData *td = NULL;
+ const struct TimerData *td = NULL;
int *tid;
nullpo_retr(0, nd);
if (nd->u.scr.rid) {
@@ -541,7 +541,7 @@ int npc_timerevent_stop(struct npc_data* nd)
*------------------------------------------*/
void npc_timerevent_quit(struct map_session_data* sd)
{
- struct TimerData *td;
+ const struct TimerData *td;
struct npc_data* nd;
struct timer_event_data *ted;
if (sd->npc_timer_id == -1)
@@ -1378,7 +1378,7 @@ int npc_unload(struct npc_data* nd)
{
ev_db->foreach(ev_db,npc_unload_ev,nd->exname); //Clean up all events related.
if (nd->u.scr.timerid != -1) {
- struct TimerData *td = NULL;
+ const struct TimerData *td = NULL;
td = get_timer(nd->u.scr.timerid);
if (td && td->data)
ers_free(timer_event_ers, (void*)td->data);