mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Battle UFO: fix spawn ordering logic
If the mapthings went in reverse order, so mapthing #1 had a higher ID than mapthing #2, the spawn ordering logic would get stuck because it wanted mapthing #1 to have a lower ID than mapthing #2. The root of the bug is that the previously used spawners ID was not totally ignored. Now it is.
This commit is contained in:
parent
bea26879ea
commit
9d28967206
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ public:
|
||||||
auto min = [&](auto cmp) { return std::min_element(list_.begin(), list_.end(), cmp); };
|
auto min = [&](auto cmp) { return std::min_element(list_.begin(), list_.end(), cmp); };
|
||||||
|
|
||||||
return *(it != list_.end()
|
return *(it != list_.end()
|
||||||
? min([order](T a, T b) { return order < a->id() && a->id() < b->id(); })
|
? min([order](T a, T b) { return order < a->id() && (b->id() <= order || a->id() < b->id()); })
|
||||||
: min([](T a, T b) { return a->id() < b->id(); }));
|
: min([](T a, T b) { return a->id() < b->id(); }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue