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/render/render.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/render/render.cc')
-rw-r--r-- | src/render/render.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/render/render.cc b/src/render/render.cc index 7776ef2..33dcb0c 100644 --- a/src/render/render.cc +++ b/src/render/render.cc @@ -172,9 +172,14 @@ void unload() if (entity->type() == core::Entity::Globe) { core::EntityGlobe *globe = static_cast<core::EntityGlobe *>(entity); - if (globe->render_texture) { - render::Textures::unload(globe->render_texture); - globe->render_texture = 0; + + if (globe->texture_id()) { + render::Textures::unload("textures/" + globe->texturename()); + globe->set_texture_id(0); + } + if (globe->corona_id()) { + render::Textures::unload("textures/corona/" + globe->coronaname()); + globe->set_corona_id(0); } } @@ -199,7 +204,14 @@ void clear() if (entity->type() == core::Entity::Globe) { core::EntityGlobe *globe = static_cast<core::EntityGlobe *>(entity); - globe->render_texture = 0; + if (globe->texture_id()) { + render::Textures::unload("textures/" + globe->texturename()); + globe->set_texture_id(0); + } + if (globe->corona_id()) { + render::Textures::unload("textures/corona/" + globe->coronaname()); + globe->set_corona_id(0); + } } if (ext_render(entity)) { |