mirror of
https://github.com/open-goal/jak-project
synced 2026-08-09 02:49:19 -04:00
model replacements: prevent duplicate processing (#3789)
Store a small database of which models have already been swapped out in a level to prevent duplicate processing. Also a small fix for cases where using a model replacement that has no armature would cause merc nightmares due to only having a `max_bones` of 3.
This commit is contained in:
@@ -112,10 +112,12 @@ void extract_art_groups_from_level(const ObjectFileDB& db,
|
||||
std::map<std::string, level_tools::ArtData>& art_group_data) {
|
||||
if (db.obj_files_by_dgo.count(dgo_name)) {
|
||||
const auto& files = db.obj_files_by_dgo.at(dgo_name);
|
||||
MercSwapInfo swapped_info;
|
||||
for (const auto& file : files) {
|
||||
if (file.name.length() > 3 && !file.name.compare(file.name.length() - 3, 3, "-ag")) {
|
||||
const auto& ag_file = db.lookup_record(file);
|
||||
extract_merc(ag_file, tex_db, db.dts, tex_remap, level_data, false, db.version());
|
||||
extract_merc(ag_file, tex_db, db.dts, tex_remap, level_data, false, db.version(),
|
||||
swapped_info);
|
||||
extract_joint_group(ag_file, db.dts, db.version(), art_group_data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user