CElementGen: Use x338_moduColor in RenderModels

This commit is contained in:
Luke Street 2020-04-18 23:41:35 -04:00
parent 30f2ac3f26
commit 025a989e12
1 changed files with 7 additions and 6 deletions

View File

@ -935,7 +935,7 @@ void CElementGen::RenderModels(const CActorLights* actorLights) {
rot = orient * rot; rot = orient * rot;
CParticleGlobals::instance()->SetEmitterTime(x74_curFrame); CParticleGlobals::instance()->SetEmitterTime(x74_curFrame);
zeus::CColor col = {1.f, 1.f, 1.f, 1.f}; zeus::CColor col = x338_moduColor;
zeus::CVector3f pmopVec; zeus::CVector3f pmopVec;
auto matrixIt = x50_parentMatrices.begin(); auto matrixIt = x50_parentMatrices.begin();
@ -992,8 +992,10 @@ void CElementGen::RenderModels(const CActorLights* actorLights) {
} }
CColorElement* pmcl = desc->x78_x64_PMCL.get(); CColorElement* pmcl = desc->x78_x64_PMCL.get();
if (pmcl) if (pmcl) {
pmcl->GetValue(partFrame, col); pmcl->GetValue(partFrame, col);
col *= x338_moduColor;
}
CGraphics::SetModelMatrix((x10c_globalScaleTransform * partTrans) * x178_localScaleTransform); CGraphics::SetModelMatrix((x10c_globalScaleTransform * partTrans) * x178_localScaleTransform);
@ -1040,11 +1042,10 @@ void CElementGen::RenderModels(const CActorLights* actorLights) {
model->Draw({5, 0, 1, zeus::CColor(1.f, 0.5f)}); model->Draw({5, 0, 1, zeus::CColor(1.f, 0.5f)});
} else if (desc->x44_31_x31_25_PMAB) { } else if (desc->x44_31_x31_25_PMAB) {
model->Draw({7, 0, 1, col}); model->Draw({7, 0, 1, col});
} else { } else if (1.f == col.a()) {
if (1.f == col.a())
model->Draw({0, 0, 3, zeus::skWhite}); model->Draw({0, 0, 3, zeus::skWhite});
else } else {
model->Draw({5, 0, 1, col}); model->Draw({5, 0, 1, zeus::CColor(1.f, col.a())});
} }
} }