From 3e8369d24d6bbdb90fee11f34f9b83f4789abc10 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 13 Sep 2020 20:07:24 -0400 Subject: [PATCH] CDrone: Check for normal model in PreRender --- Runtime/Character/CModelData.hpp | 1 + Runtime/MP1/World/CDrone.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/Character/CModelData.hpp b/Runtime/Character/CModelData.hpp index 886c2da9d..feb5baa9b 100644 --- a/Runtime/Character/CModelData.hpp +++ b/Runtime/Character/CModelData.hpp @@ -66,6 +66,7 @@ class CModelData { bool x14_25_sortThermal : 1 = false; zeus::CColor x18_ambientColor; + // were rstl::optional_object> TLockedToken x1c_normalModel; TLockedToken x2c_xrayModel; TLockedToken x3c_infraModel; diff --git a/Runtime/MP1/World/CDrone.cpp b/Runtime/MP1/World/CDrone.cpp index f0d4b778d..78cbd9127 100644 --- a/Runtime/MP1/World/CDrone.cpp +++ b/Runtime/MP1/World/CDrone.cpp @@ -288,7 +288,7 @@ void CDrone::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) { void CDrone::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { CPatterned::PreRender(mgr, frustum); if (x3fc_flavor == EFlavorType::One) { - if (HasModelData() && GetModelData()->HasAnimData()) { + if (HasModelData() && GetModelData()->HasAnimData() && GetModelData()->HasNormalModel()) { if (GetModelAlphau8(mgr) == 0) GetModelData()->GetAnimationData()->BuildPose(); }