From 02b285bf20603bab6fc75d106acbaccead645eb9 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 24 Nov 2010 23:00:28 +0000 Subject: 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 --- src/core/parser.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/core/parser.cc') 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(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; } -- cgit v1.2.3