diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-24 23:00:28 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-24 23:00:28 +0000 |
commit | 02b285bf20603bab6fc75d106acbaccead645eb9 (patch) | |
tree | 7be22d06339e1bb70b7ef5011312c13865976ced /src/core/parser.cc | |
parent | f66a28a68114f3c9efe109b6948ecec163cdb153 (diff) |
Actually add entities in the intro to their zone,
removed core::EntityControlable::movement(),
cleaned up core::EntityGlobe,
adds support for a per-globe corona,
adds core::EntityControlable::control_flags(),
bumps network protocol version to 21
Diffstat (limited to 'src/core/parser.cc')
-rw-r--r-- | src/core/parser.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/parser.cc b/src/core/parser.cc index efcc58b..943cfb7 100644 --- a/src/core/parser.cc +++ b/src/core/parser.cc @@ -122,6 +122,32 @@ bool Parser::got_entity_key(filesystem::IniFile &inifile, core::Entity *entity) return true; } + // special globe keys + if (entity->type() == Entity::Globe) { + EntityGlobe *globe = static_cast<EntityGlobe *>(entity); + + if (inifile.got_key_string("texture", strval)) { + globe->set_texturename(strval); + return true; + + } else if (inifile.got_key_string("corona", strval)) { + globe->set_coronaname(strval); + return true; + + } else if (inifile.got_key_float("rotationspeed", f)) { + globe->set_rotationspeed(f); + return true; + + } else if (inifile.got_key_bool("bright", blnval)) { + if (blnval) { + globe->set_flag(core::Entity::Bright); + } else { + globe->unset_flag(core::Entity::Bright); + } + return true; + } + } + return false; } |