mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-31 18:31:04 +00:00
Use stable sort in HUD rendering
This commit is contained in:
parent
36b5374715
commit
baaab310fe
1 changed files with 2 additions and 1 deletions
|
@ -363,7 +363,8 @@ void Hud::drawLuaElements(const v3s16 &camera_offset)
|
|||
}
|
||||
|
||||
// Reorder by Z-index for rendering
|
||||
std::sort(elems.begin(), elems.end(), [] (HudElement *l, HudElement *r) {
|
||||
// Note: we don't guarantee rendering in ID order, but it used to work so let's keep it.
|
||||
std::stable_sort(elems.begin(), elems.end(), [] (HudElement *l, HudElement *r) {
|
||||
return l->z_index < r->z_index;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue