K_drawKartNameTags: Move to static sized array

We don't need to dedicate time to allocation - we know the upper bound to this array size, and it's not very much at all.
This commit is contained in:
toaster 2023-12-16 21:51:36 +00:00
parent 0ca9fca869
commit 8bc610bf40

View file

@ -3743,7 +3743,7 @@ static void K_drawKartNameTags(void)
if (sortlen > 0)
{
UINT8 *sortedplayers = Z_Malloc(sizeof(UINT8) * sortlen, PU_STATIC, NULL);
UINT8 sortedplayers[MAXPLAYERS];
for (i = 0; i < sortlen; i++)
{
@ -3822,8 +3822,6 @@ static void K_drawKartNameTags(void)
}
}
}
Z_Free(sortedplayers);
}
V_ClearClipRect();