summaryrefslogtreecommitdiff
path: root/src/map/npc.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-23 21:44:50 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-23 21:44:50 -0700
commit6fc0f5f1c1704664e178430056376981520744b4 (patch)
treef1e9cff0f85c3a00fbd72c5d385c95ab0f04c2a1 /src/map/npc.cpp
parent413cd3fbc5138512ade671907ece6457b7d98d56 (diff)
downloadtmwa-6fc0f5f1c1704664e178430056376981520744b4.tar.gz
tmwa-6fc0f5f1c1704664e178430056376981520744b4.tar.bz2
tmwa-6fc0f5f1c1704664e178430056376981520744b4.tar.xz
tmwa-6fc0f5f1c1704664e178430056376981520744b4.zip
Swat
Diffstat (limited to 'src/map/npc.cpp')
-rw-r--r--src/map/npc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index ef10d82..7b31729 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -1303,7 +1303,10 @@ int npc_parse_script(XString w1, XString w2, NpcName w3, ZString w4,
}
else
{
- if (!extract(w4, &npc_class))
+ XString w4x = w4;
+ if (w4x.endswith(','))
+ w4x = w4x.xrslice_h(1);
+ if (!extract(w4x, &npc_class))
abort();
nd->scr.xs = 0;
nd->scr.ys = 0;