- 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 {
|
else {
|
||||||
Vec2i pos= c->getPos();
|
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);
|
arrowTarget= Vec3f(pos.x, map->getCell(pos)->getHeight(), pos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2670,6 +2677,13 @@ void Renderer::renderSelectionEffects() {
|
||||||
//meeting point arrow
|
//meeting point arrow
|
||||||
if(unit->getType()->getMeetingPoint()) {
|
if(unit->getType()->getMeetingPoint()) {
|
||||||
Vec2i pos= unit->getMeetingPos();
|
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);
|
Vec3f arrowTarget= Vec3f(pos.x, map->getCell(pos)->getHeight(), pos.y);
|
||||||
renderArrow(unit->getCurrVectorFlat(), arrowTarget, Vec3f(0.f, 0.f, 1.f), 0.3f);
|
renderArrow(unit->getCurrVectorFlat(), arrowTarget, Vec3f(0.f, 0.f, 1.f), 0.3f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user