diff options
Diffstat (limited to 'src/emap/npc.c')
-rw-r--r-- | src/emap/npc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emap/npc.c b/src/emap/npc.c index 727ea76..9f7ce36 100644 --- a/src/emap/npc.c +++ b/src/emap/npc.c @@ -254,6 +254,7 @@ int enpc_unload_pre(struct npc_data** ndPtr, { struct npc_data *nd = *ndPtr; nullpo_ret(nd); + aFree(nd->vd); if (nd->subtype == SCRIPT) { if (nd->src_id != 0) @@ -283,3 +284,14 @@ int enpc_unload_pre(struct npc_data** ndPtr, } return 0; } + +struct view_data *enpc_get_viewdata_post(struct view_data *retVal, + int class_ __attribute__ ((unused))) +{ + nullpo_retr(NULL, retVal); + + struct view_data *vd; + CREATE(vd, struct view_data, 1); + memcpy(vd, retVal, sizeof(struct view_data)); + return vd; +} |