From 9f02928d74df7210707e5eaf5c88b4de7225b805 Mon Sep 17 00:00:00 2001 From: RektInator Date: Thu, 31 Oct 2019 15:05:15 +0100 Subject: [PATCH] duplicate certain rendering states for _dfog areas when porting from iw3 --- src/IW3/Assets/Techset.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/IW3/Assets/Techset.cpp b/src/IW3/Assets/Techset.cpp index c76237c..1aa3981 100644 --- a/src/IW3/Assets/Techset.cpp +++ b/src/IW3/Assets/Techset.cpp @@ -354,6 +354,11 @@ namespace ZoneTool if (itr->second >= 0) { iw4_statebits[itr->second] = statebits[i]; + + if (itr->second >= 5 && itr->second <= 36) + { + iw4_statebits[itr->second + 1] = statebits[i]; + } } } } @@ -379,6 +384,11 @@ namespace ZoneTool const auto size = sizeof(IW4::MaterialTechniqueHeader) + (sizeof(IW4::MaterialPass) * asset->techniques[i]->hdr.numPasses); iw4_techset->techniques[itr->second] = reinterpret_cast( new char[size]); + + if (itr->second >= 5 && itr->second <= 36) + { + iw4_techset->techniques[itr->second + 1] = iw4_techset->techniques[itr->second]; + } memcpy(iw4_techset->techniques[itr->second], asset->techniques[i], size); @@ -425,6 +435,11 @@ namespace ZoneTool { if (iw4_techset->techniques[i]) { + if (i >= 5 && i <= 36 && i % 2 == 0) + { + continue; + } + for (short pass = 0; pass < iw4_techset->techniques[i]->hdr.numPasses; pass++) { delete iw4_techset->techniques[i]->pass[pass].pixelShader;