Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ void WeaponSet::xfer( Xfer *xfer )
if (tt == nullptr)
throw INI_INVALID_DATA;

// TheSuperHackers @fix bobtista 27/01/2026 findTemplate returns the base template, but Object
// uses getFinalOverride() in its constructor. We must do the same here so m_curWeaponTemplateSet
// points to the same ThingTemplate's weapon sets, avoiding unnecessary reallocation in updateWeaponSet.
tt = static_cast<const ThingTemplate*>(tt->getFinalOverride());

m_curWeaponTemplateSet = tt->findWeaponTemplateSet(wsFlags);
if (m_curWeaponTemplateSet == nullptr)
throw INI_INVALID_DATA;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ void WeaponSet::xfer( Xfer *xfer )
if (tt == nullptr)
throw INI_INVALID_DATA;

// TheSuperHackers @fix bobtista 27/01/2026 findTemplate returns the base template, but Object
// uses getFinalOverride() in its constructor. We must do the same here so m_curWeaponTemplateSet
// points to the same ThingTemplate's weapon sets, avoiding unnecessary reallocation in updateWeaponSet.
tt = static_cast<const ThingTemplate*>(tt->getFinalOverride());

m_curWeaponTemplateSet = tt->findWeaponTemplateSet(wsFlags);
if (m_curWeaponTemplateSet == nullptr)
throw INI_INVALID_DATA;
Expand Down
Loading