mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
M_Shuffle_UINT16: Fix to not rule out half of all possible Spray Can orders
This commit is contained in:
parent
e1b7cb66cb
commit
53549bfa2d
1 changed files with 6 additions and 1 deletions
|
|
@ -661,9 +661,14 @@ static void M_Shuffle_UINT16(UINT16 *list, size_t len)
|
|||
{
|
||||
size_t i;
|
||||
UINT16 temp;
|
||||
while (--len > 1) // no need to swap on ==
|
||||
|
||||
while (len > 1)
|
||||
{
|
||||
i = M_RandomKey(len);
|
||||
|
||||
if (i == --len)
|
||||
continue;
|
||||
|
||||
temp = list[i];
|
||||
list[i] = list[len];
|
||||
list[len] = temp;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue