diff options
author | Andy <drumsetmonkey@gmail.com> | 2017-01-20 10:37:21 -0500 |
---|---|---|
committer | Andy <drumsetmonkey@gmail.com> | 2017-01-20 10:37:21 -0500 |
commit | 4d8f9974156068e4595bf219cacfd9fcd2fd7174 (patch) | |
tree | f3e938c0e49537a9dea661f46eed6ee74950b48a /src/world.cpp | |
parent | 1894e311bdeb098c3bef9bd342e0eaf78d197a9b (diff) | |
parent | 1ac412a5496fb6c63c47f199dfc7facd5f4c080a (diff) |
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/world.cpp b/src/world.cpp index 1d29bfe..4f2f99c 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -12,6 +12,12 @@ #include <chrono> using namespace std::literals::chrono_literals; +#include <common.hpp> +#include <debug.hpp> +#include <error.hpp> +#include <fileio.hpp> +#include <vector3.hpp> + // local game headers #include <ui.hpp> #include <gametime.hpp> @@ -369,7 +375,8 @@ void WorldSystem::load(const std::string& file) entity.assign<Physics>(g); } else if (tname == "Name") { - entity.assign<Name>(coalesce(wxml->Attribute("name"), abcd->Attribute("value"))); + auto name = wxml->Attribute("name"); + entity.assign<Name>( name != nullptr ? name : abcd->Attribute("value")); } else if (tname == "Dialog") { entity.assign<Dialog>((wxml->BoolAttribute("hasDialog") ? 0 : 9999)); } else if (tname == "Grounded") { |