Skip to content

Commit

Permalink
Tuning: fixed savegames not loading correctly
Browse files Browse the repository at this point in the history
Problem1 = .tuneup with empty name-line breaks parsing. Fixed in Actor.cpp
Problem2 = the addonpart bundles didn't get always loaded. Fixed in ActorSpawner.cpp
  • Loading branch information
ohlidalp committed Jan 24, 2024
1 parent cf9ff5b commit 8e94942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/main/physics/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4601,5 +4601,6 @@ void Actor::ensureWorkingTuneupDef()
if (!m_working_tuneup_def)
{
m_working_tuneup_def = new TuneupDef();
m_working_tuneup_def->name = fmt::format("Tuned {}", ar_filename);
}
}
2 changes: 2 additions & 0 deletions source/main/physics/ActorSpawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ void ActorSpawner::ConfigureAddonParts(TuneupDefPtr& tuneup_def)
CacheEntryPtr addonpart_entry = App::GetCacheSystem()->FindEntryByFilename(LT_AddonPart, /*partial:*/false, addonpart);
if (addonpart_entry)
{
App::GetCacheSystem()->LoadResource(addonpart_entry);

AddonPartUtility util;
util.ResolveUnwantedAndTweakedElements(tuneup_def, addonpart_entry);
auto module = util.TransformToRigDefModule(addonpart_entry);
Expand Down

0 comments on commit 8e94942

Please sign in to comment.