- bugfix for selection circle on units on the edge of map cells
This commit is contained in:
parent
16c7316887
commit
d300c5635b
|
@ -2660,6 +2660,13 @@ void Renderer::renderSelectionEffects() {
|
|||
}
|
||||
else {
|
||||
Vec2i pos= c->getPos();
|
||||
if(pos.x < 0) {
|
||||
pos.x = 0;
|
||||
}
|
||||
if(pos.y < 0) {
|
||||
pos.y = 0;
|
||||
}
|
||||
|
||||
arrowTarget= Vec3f(pos.x, map->getCell(pos)->getHeight(), pos.y);
|
||||
}
|
||||
|
||||
|
@ -2670,6 +2677,13 @@ void Renderer::renderSelectionEffects() {
|
|||
//meeting point arrow
|
||||
if(unit->getType()->getMeetingPoint()) {
|
||||
Vec2i pos= unit->getMeetingPos();
|
||||
if(pos.x < 0) {
|
||||
pos.x = 0;
|
||||
}
|
||||
if(pos.y < 0) {
|
||||
pos.y = 0;
|
||||
}
|
||||
|
||||
Vec3f arrowTarget= Vec3f(pos.x, map->getCell(pos)->getHeight(), pos.y);
|
||||
renderArrow(unit->getCurrVectorFlat(), arrowTarget, Vec3f(0.f, 0.f, 1.f), 0.3f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue