summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-11-28 14:45:41 +0100
committerHaru <haru@dotalux.com>2017-11-28 15:00:09 +0100
commit3e02dc0e6884e6e7f9dfbf18aed251211ab65bb5 (patch)
tree72852372e3f0be11f3f346dedde72b98e8eadeb9 /src
parent1418831c609781901fa994a27ae944781cc20f28 (diff)
downloadhercules-3e02dc0e6884e6e7f9dfbf18aed251211ab65bb5.tar.gz
hercules-3e02dc0e6884e6e7f9dfbf18aed251211ab65bb5.tar.bz2
hercules-3e02dc0e6884e6e7f9dfbf18aed251211ab65bb5.tar.xz
hercules-3e02dc0e6884e6e7f9dfbf18aed251211ab65bb5.zip
Fix invisible NPCs (such as FAKE_NPC) showing up as Novice
Use the correct view data (INVISIBLE_CLASS) when initializing new NPCs. The issue was introduced in #1893 Fixes #1916 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r--src/map/npc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 10ff4ebf2..d3dfb39d2 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2708,7 +2708,7 @@ struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, u
nd->area_size = AREA_SIZE + 1;
nd->class_ = class_;
nd->speed = 200;
- nd->vd.class = 0;
+ nd->vd = npc_viewdb[0]; // Copy INVISIBLE_CLASS view data. Actual view data is set by npc->add_to_location() later.
return nd;
}