- fixed arrow show path of units

This commit is contained in:
Mark Vejvoda 2010-09-10 15:57:07 +00:00
parent 793ac7a8cb
commit f4e6e8ffd7
1 changed files with 3 additions and 2 deletions

View File

@ -3520,6 +3520,7 @@ void Renderer::renderArrow(const Vec3f &pos1, const Vec3f &pos2,
Vec3f pos1Right= pos1 - normal*(width+0.05f);
//arrow body
glBegin(GL_TRIANGLE_STRIP);
for(int i=0; i<=tesselation; ++i) {
float t= static_cast<float>(i)/tesselation;
Vec3f a= pos1Left.lerp(t, pos2Left);
@ -3528,12 +3529,12 @@ void Renderer::renderArrow(const Vec3f &pos1, const Vec3f &pos2,
glColor4fv(c.ptr());
glBegin(GL_TRIANGLE_STRIP);
glVertex3fv(a.ptr());
glVertex3fv(b.ptr());
glEnd();
}
glEnd();
//arrow end
glBegin(GL_TRIANGLES);
glVertex3fv((pos2Left + normal*(arrowEndSize-0.1f)).ptr());