Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map specific config settings not freed when selecting other map #3691

Open
Loobinex opened this issue Nov 18, 2024 · 1 comment
Open

Map specific config settings not freed when selecting other map #3691

Loobinex opened this issue Nov 18, 2024 · 1 comment

Comments

@Loobinex
Copy link
Member

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.

@walt253
Copy link
Contributor

walt253 commented Dec 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants