diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-27 01:21:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-27 01:32:31 +0300 |
commit | 1906d3327c586b72c6989f9ba4a7b95b25dc6341 (patch) | |
tree | dd8abdcbeee553c56feb62c23fa56f7cf0be009a /src/map/npc.c | |
parent | 5d7679de84fc41431b3bc7a137db83f33642779b (diff) | |
download | hercules-1906d3327c586b72c6989f9ba4a7b95b25dc6341.tar.gz hercules-1906d3327c586b72c6989f9ba4a7b95b25dc6341.tar.bz2 hercules-1906d3327c586b72c6989f9ba4a7b95b25dc6341.tar.xz hercules-1906d3327c586b72c6989f9ba4a7b95b25dc6341.zip |
Fix unit_data unitialisation.
Introduce method unit->init_ud.
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 1b784b0c8..86e9e5e7a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -4965,14 +4965,8 @@ static void npc_debug_warps(void) { int do_init_npc(bool minimal) { int i; - memset(&npc->base_ud, 0, sizeof( struct unit_data) ); - npc->base_ud.bl = NULL; - npc->base_ud.walktimer = INVALID_TIMER; - npc->base_ud.skilltimer = INVALID_TIMER; - npc->base_ud.attacktimer = INVALID_TIMER; - npc->base_ud.attackabletime = - npc->base_ud.canact_tick = - npc->base_ud.canmove_tick = timer->gettick(); + unit->init_ud(&npc->base_ud); + npc->base_ud.bl = NULL; //Stock view data for normal npcs. memset(&npc_viewdb, 0, sizeof(npc_viewdb)); |