From b421e7504033890c77e78ef3db0ecb7dde92bdaf Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 16 Dec 2013 21:19:49 -0500 Subject: [PATCH] Send the right RefMsg, please... So this is interesting. If you disable Planar Reflections and visit an age with a DCM, you will crash after a few minutes. This is because plDynamicCamMap is sending the wrong plRefMsg to the plLayer. This does nothing (aside from waste time), so we keep sending the ref again and again and again and again until we get some weird heap corruption and KABLOOOOOOOOOOOEY! --- Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp index 2bdb150a..facec419 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp @@ -753,13 +753,13 @@ void plDynamicCamMap::IPrepTextureLayers() { fMatLayers[i]->SetUVWSrc(plLayerInterface::kUVWPosition); fMatLayers[i]->SetMiscFlags(hsGMatState::kMiscCam2Screen | hsGMatState::kMiscPerspProjection); - hsgResMgr::ResMgr()->SendRef(GetKey(), new plGenRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(GetKey(), new plLayRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); } else { fMatLayers[i]->SetUVWSrc(0); fMatLayers[i]->SetMiscFlags(0); - hsgResMgr::ResMgr()->SendRef(fDisableTexture->GetKey(), new plGenRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); + hsgResMgr::ResMgr()->SendRef(fDisableTexture->GetKey(), new plLayRefMsg(fMatLayers[i]->GetKey(), plRefMsg::kOnRequest, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef); } } }