While the previous approach only worked when reading caves from BDCFF
files, the new solution works for all cave file formats, as it changes
the internal cave structure after loading.
char *key_1 = getStringToUpper(gd_element_properties[i].filename);
int element = i;
- // temporary workaround: map scanned elements to their non-scanned counterparts
- if (gd_element_properties[i].properties & P_SCANNED)
- element = gd_element_properties[i].pair;
-
if (hashtable_exists(name_to_element, key_1)) // hash value may be 0
Warn("BDCFF token '%s' already used for element 0x%x", key_1, element);
// initialize some cave variables (like player position)
gd_cave_setup_for_game(prepared_cave);
+ // temporary workaround: set all elements in a cave to their non-scanned counterparts
+ unscan_cave(prepared_cave);
+
return prepared_cave;
}