Minor CActor fixes

This commit is contained in:
2022-12-07 01:14:03 -05:00
parent 84e8d8a9fa
commit b61e1774c1
7 changed files with 21 additions and 18 deletions

View File

@@ -296,7 +296,7 @@ void CActor::AddToRenderer(const CFrustumPlanes& planes, const CStateManager& mg
void CActor::EnsureRendered(const CStateManager& mgr, const CVector3f& pos,
const CAABox& bounds) const {
if (GetModelData()) {
const EWhichModel which = CModelData::GetRenderingModel(mgr);
const CModelData::EWhichModel which = CModelData::GetRenderingModel(mgr);
GetModelData()->RenderUnsortedParts(which, GetTransform(), GetActorLights(), GetModelFlags());
}
mgr.AddDrawableActor(*this, pos, bounds);
@@ -354,8 +354,8 @@ void CActor::Render(const CStateManager& mgr) const {
}
void CActor::RenderInternal(const CStateManager& mgr) const {
EWhichModel which = CModelData::GetRenderingModel(mgr);
if (which == kWM_ThermalHot) {
CModelData::EWhichModel which = CModelData::GetRenderingModel(mgr);
if (which == CModelData::kWM_ThermalHot) {
if (GetModelData()->GetSortThermal()) {
uchar addMag;
uchar mulMag = 255;

View File

@@ -230,7 +230,7 @@ void CGunWeapon::Update(float dt, CStateManager& mgr) {
LoadFxIdle(dt, mgr);
if ((x210_loadFlags & 0x1f) == 0x1f) {
CSkinnedModel& model = x10_solidModelData->PickAnimatedModel(kWM_Normal);
CSkinnedModel& model = x10_solidModelData->PickAnimatedModel(CModelData::kWM_Normal);
bool flag1 = model.GetModel()->IsLoaded(x20c_shaderIdx);
bool flag2 = xb0_suitArmModelData->IsLoaded(0);
if (flag1 && flag2) {
@@ -358,7 +358,7 @@ void CGunWeapon::DrawHologram(const CStateManager& mgr, const CTransform4f& xf,
// TODO
if (x218_29_drawHologram) {
x60_holoModelData->FlatDraw(kWM_Normal, xf, false, flags);
x60_holoModelData->FlatDraw(CModelData::kWM_Normal, xf, false, flags);
} else {
const CVector3f& scale = x10_solidModelData->GetScale();
CTransform4f modelMatrix(xf);