Skip to content
Merged
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
9 changes: 8 additions & 1 deletion include/LandscapeSwap.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ namespace LandscapeSwap
const auto manager = SeasonManager::GetSingleton();

const auto swapLT = manager->CanSwapLandscape() ? manager->GetSwapLandTexture(a_txst) : nullptr;
return swapLT ? swapLT->textureSet : a_txst;
const auto finalTXST = swapLT ? swapLT->textureSet : a_txst;

// Save the swapped texture set in the original value because other plugins might need the swapped TXSTs
if (finalTXST != a_txst && a_txst != nullptr && finalTXST != nullptr) {
*a_txst = *finalTXST;
}

return finalTXST;
}
static inline REL::Relocation<decltype(thunk)> func;

Expand Down