mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-27 08:23:08 +00:00
fixed an error with ptds going beyond the end of array
This commit is contained in:
1 parent
905f88e8cb
commit
625df0f009
1 file changed
+2
-3
+2
-3
@@ -2631,8 +2631,7 @@ EX void drawqueue() {
|
|||||||
|
|
||||||
for(PPR p: {PPR::TRANSPARENT_WALL}) {
|
for(PPR p: {PPR::TRANSPARENT_WALL}) {
|
||||||
int pp = int(p);
|
int pp = int(p);
|
||||||
if(qp0[pp] == qp[pp]) continue;
|
sort(ptds.data() + qp0[pp], ptds.data() + qp[pp],
|
||||||
sort(&ptds[qp0[int(p)]], &ptds[qp[int(p)]],
|
|
||||||
[] (const unique_ptr<drawqueueitem>& p1, const unique_ptr<drawqueueitem>& p2) {
|
[] (const unique_ptr<drawqueueitem>& p1, const unique_ptr<drawqueueitem>& p2) {
|
||||||
return p1->subprio > p2->subprio;
|
return p1->subprio > p2->subprio;
|
||||||
});
|
});
|
||||||
@@ -2651,7 +2650,7 @@ EX void drawqueue() {
|
|||||||
h = unshift(d->V) * h;
|
h = unshift(d->V) * h;
|
||||||
return h[2];
|
return h[2];
|
||||||
};
|
};
|
||||||
sort(&ptds[qp0[int(p)]], &ptds[qp[int(p)]],
|
sort(ptds.data() + qp0[pp], ptds.data() + qp[pp],
|
||||||
[&] (const unique_ptr<drawqueueitem>& p1, const unique_ptr<drawqueueitem>& p2) {
|
[&] (const unique_ptr<drawqueueitem>& p1, const unique_ptr<drawqueueitem>& p2) {
|
||||||
return get_z(p1) > get_z(p2);
|
return get_z(p1) > get_z(p2);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user