keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Map specific config settings not freed when selecting other map

Open Loobinex opened this issue 1 year ago • 1 comments

To reproduce:

  1. Download and install the halloween map pack
  2. Start KeeperFX and go to the halloween pack in the free play levels list
  3. Start map 'Desert Tomb'
  4. Exit it again, returning to the map list
  5. Start 'Belzebub' -> Notice the dungeon heart is transparent.

This is because map03110.objects.cfg (from Desert Tomb) has object 5 as transparent. Starting the new map does not change that.

Loobinex avatar Nov 18 '24 01:11 Loobinex

I could be wrong but I think it's cause the params are not initialised.

In parse_objects_object_blocks

    if ((flags & CnfLd_AcceptPartial) == 0) {
        for (int i = 0; i < OBJECT_TYPES_MAX; i++) {
            objst = &game.conf.object_conf.object_cfgstats[i];
            LbMemorySet(objst->code_name, 0, COMMAND_WORD_LEN);
            objst->name_stridx = 201;
            objst->map_icon = 0;
            objst->genre = 0;
            objst->draw_class = ODC_Default;
            object_desc[i].name = objst->code_name;
            object_desc[i].num = i;
        }
    }

Only those are initialised.

walt253 avatar Dec 20 '24 15:12 walt253

I remember fixing this, do not know when, but I tested it fixed now.

Loobinex avatar Nov 12 '25 16:11 Loobinex