mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix debugitemodds allocations, add extra prints
This commit is contained in:
parent
4217c9e214
commit
5c0a03f696
1 changed files with 13 additions and 0 deletions
|
|
@ -734,6 +734,8 @@ static void K_InitRoulette(itemroulette_t *const roulette)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
CONS_Printf("HC: init\n");
|
||||||
|
|
||||||
#ifndef ITEM_LIST_SIZE
|
#ifndef ITEM_LIST_SIZE
|
||||||
if (roulette->itemList.items == NULL)
|
if (roulette->itemList.items == NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -744,6 +746,8 @@ static void K_InitRoulette(itemroulette_t *const roulette)
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CONS_Printf("HC: alloc init\n");
|
||||||
|
|
||||||
if (roulette->itemList.items == NULL)
|
if (roulette->itemList.items == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Not enough memory for item roulette list\n");
|
I_Error("Not enough memory for item roulette list\n");
|
||||||
|
|
@ -847,6 +851,8 @@ void K_PushToRouletteItemList(itemroulette_t *const roulette, INT32 item)
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CONS_Printf("HC: alloc double to %d\n", roulette->itemList.cap);
|
||||||
|
|
||||||
if (roulette->itemList.items == NULL)
|
if (roulette->itemList.items == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Not enough memory for item roulette list\n");
|
I_Error("Not enough memory for item roulette list\n");
|
||||||
|
|
@ -856,6 +862,8 @@ void K_PushToRouletteItemList(itemroulette_t *const roulette, INT32 item)
|
||||||
|
|
||||||
roulette->itemList.items[ roulette->itemList.len ] = item;
|
roulette->itemList.items[ roulette->itemList.len ] = item;
|
||||||
roulette->itemList.len++;
|
roulette->itemList.len++;
|
||||||
|
|
||||||
|
CONS_Printf("HC: adding item %d - %d\n", item, roulette->itemList.len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
|
|
@ -1220,6 +1228,11 @@ void K_FillItemRouletteData(player_t *player, itemroulette_t *const roulette, bo
|
||||||
|
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
|
|
||||||
|
if (roulette->itemList.items == NULL)
|
||||||
|
{
|
||||||
|
K_InitRoulette(roulette);
|
||||||
|
}
|
||||||
|
|
||||||
if (ringbox == true)
|
if (ringbox == true)
|
||||||
{
|
{
|
||||||
// If this is being invoked by a Ring Box, it should literally never produce items.
|
// If this is being invoked by a Ring Box, it should literally never produce items.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue