diff options
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/world.cpp b/src/world.cpp index 7904c4f..9f57b87 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -350,9 +350,10 @@ void WorldSystem::loader(void) entity.assign<Dialog>(wxml, abcd); else if (tname == "Grounded") entity.assign<Grounded>(); // no need to pass xmls... - else if (tname == "Wander") - entity.assign<Wander>(); - else if (tname == "Hop") + else if (tname == "Wander") { + auto script = abcd->GetText(); + entity.assign<Wander>(script != nullptr ? script : ""); + } else if (tname == "Hop") entity.assign<Hop>(); else if (tname == "Health") entity.assign<Health>(wxml, abcd); |