mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	fixed an error with ptds going beyond the end of array
This commit is contained in:
		| @@ -2631,8 +2631,7 @@ EX void drawqueue() { | ||||
|  | ||||
|   for(PPR p: {PPR::TRANSPARENT_WALL}) { | ||||
|     int pp = int(p); | ||||
|     if(qp0[pp] == qp[pp]) continue; | ||||
|     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) { | ||||
|         return p1->subprio > p2->subprio; | ||||
|         }); | ||||
| @@ -2651,7 +2650,7 @@ EX void drawqueue() { | ||||
|       h = unshift(d->V) * h; | ||||
|       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) { | ||||
|         return get_z(p1) > get_z(p2); | ||||
|         }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue