Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/map.cc54
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();