diff options
author | Stijn Buys <ingar@osirion.org> | 2009-03-21 12:35:44 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-03-21 12:35:44 +0000 |
commit | 3885d7521fdaea218e9e8f98156be472f2e58b5c (patch) | |
tree | ded0784b04fd0c6eaeb982e4b4fdd169a66b1e6f /src/client | |
parent | 89562dd7a94e17cedb24d97104a9944aab15e976 (diff) |
don't draw a docked ship on the map
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/map.cc | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/src/client/map.cc b/src/client/map.cc index 10a207c..6ad8b23 100644 --- a/src/client/map.cc +++ b/src/client/map.cc @@ -145,6 +145,13 @@ void Map::draw() draw_icon = false; } } + + if (entity == core::localplayer()->view()) { + valid_target = true; + if (core::application()->time() - floorf(core::application()->time()) > 0.5f) { + draw_icon = false; + } + } } if (entity == core::localcontrol()) { @@ -199,30 +206,33 @@ void Map::draw() // draw localcontrol icon entity = core::localcontrol(); - l.assign(v); - l.x -= s / scale * entity->location().y; - l.y -= s / scale * entity->location().x; - if (core::application()->time() - floorf(core::application()->time()) < 0.5f) { - if (texture_current != texture_entity) { - gl::end(); - texture_current = render::Textures::bind(texture_entity); - gl::begin(gl::Quads); - } - math::Color color(entity->color()); - color.a = 1.0f; - gl::color(color); - glTexCoord2f(0.0f, 0.0f); - gl::vertex(l.x-r, l.y-r); + if (core::localcontrol()->state() != core::Entity::Docked) { + l.assign(v); + l.x -= s / scale * entity->location().y; + l.y -= s / scale * entity->location().x; + if (core::application()->time() - floorf(core::application()->time()) < 0.5f) { + if (texture_current != texture_entity) { + gl::end(); + texture_current = render::Textures::bind(texture_entity); + gl::begin(gl::Quads); + } + + math::Color color(entity->color()); + color.a = 1.0f; + gl::color(color); + glTexCoord2f(0.0f, 0.0f); + gl::vertex(l.x-r, l.y-r); + + glTexCoord2f(1.0f, 0.0f); + gl::vertex(l.x+r, l.y-r); - glTexCoord2f(1.0f, 0.0f); - gl::vertex(l.x+r, l.y-r); - - glTexCoord2f(1.0f, 1.0f); - gl::vertex(l.x+r, l.y+r); - - glTexCoord2f(0.0f, 1.0f); - gl::vertex(l.x-r, l.y+r); + glTexCoord2f(1.0f, 1.0f); + gl::vertex(l.x+r, l.y+r); + + glTexCoord2f(0.0f, 1.0f); + gl::vertex(l.x-r, l.y+r); + } } gl::end(); |