keeperfx
keeperfx copied to clipboard
Map specific config settings not freed when selecting other map
To reproduce:
- Download and install the halloween map pack
- Start KeeperFX and go to the halloween pack in the free play levels list
- Start map 'Desert Tomb'
- Exit it again, returning to the map list
- 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.
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.
I remember fixing this, do not know when, but I tested it fixed now.