mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-07 11:52:51 +00:00
fixed a bug with spherical textures losing more parts than expected due to global variables changing
This commit is contained in:
parent
7e033e5025
commit
2f9eebbb51
@ -619,7 +619,7 @@ void drawpolyline(polytodraw& p) {
|
|||||||
else {
|
else {
|
||||||
// If we are on a zlevel, the algorithm above will not work correctly.
|
// If we are on a zlevel, the algorithm above will not work correctly.
|
||||||
// It is hard to tell what to do in this case. Just fill neither side
|
// It is hard to tell what to do in this case. Just fill neither side
|
||||||
p.col = 0;
|
nofill = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,7 +630,7 @@ void drawpolyline(polytodraw& p) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
glLineWidth(linewidthat(tC0(pp.V), pp.minwidth));
|
glLineWidth(linewidthat(tC0(pp.V), pp.minwidth));
|
||||||
if(pp.tinf && pp.offset) {
|
if(pp.tinf && pp.offset && !nofill) {
|
||||||
vector<glvertex> tv;
|
vector<glvertex> tv;
|
||||||
for(int i=0; i<pp.cnt; i++)
|
for(int i=0; i<pp.cnt; i++)
|
||||||
tv.push_back(pp.tinf->tvertices[pp.offset+i]);
|
tv.push_back(pp.tinf->tvertices[pp.offset+i]);
|
||||||
@ -639,7 +639,7 @@ void drawpolyline(polytodraw& p) {
|
|||||||
swap(pp.tinf->tvertices, tv);
|
swap(pp.tinf->tvertices, tv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gldraw(3, Id, glcoords, 0, size(glcoords), p.col, pp.outline, poly_flags, pp.tinf);
|
gldraw(3, Id, glcoords, 0, size(glcoords), nofill ? 0 : p.col, pp.outline, poly_flags, nofill ? NULL : pp.tinf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user