summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/modelinfo/BaseModelInfo.h8
-rw-r--r--src/modelinfo/ClumpModelInfo.cpp17
2 files changed, 20 insertions, 5 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h
index 783f871f..2505967b 100644
--- a/src/modelinfo/BaseModelInfo.h
+++ b/src/modelinfo/BaseModelInfo.h
@@ -31,6 +31,14 @@ protected:
ModelInfoType m_type;
uint8 m_num2dEffects;
bool m_bOwnsColModel;
+#ifdef EXTRA_MODEL_FLAGS
+public:
+ // from mobile
+ bool m_bIsDoubleSided;
+ bool m_bIsTree;
+ bool m_bCanBeIgnored; // for low-end devices
+ bool RenderDoubleSided(void) { return m_bIsDoubleSided || m_bIsTree; }
+#endif
public:
CBaseModelInfo(ModelInfoType type);
diff --git a/src/modelinfo/ClumpModelInfo.cpp b/src/modelinfo/ClumpModelInfo.cpp
index 49198437..1ae936a7 100644
--- a/src/modelinfo/ClumpModelInfo.cpp
+++ b/src/modelinfo/ClumpModelInfo.cpp
@@ -5,6 +5,7 @@
#include "NodeName.h"
#include "VisibilityPlugins.h"
#include "ModelInfo.h"
+#include "ModelIndices.h"
void
CClumpModelInfo::DeleteRwObject(void)
@@ -110,12 +111,18 @@ CClumpModelInfo::SetClump(RpClump *clump)
weights->w3 /= sum;
}
RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS));
- }else
-#endif
- // do not set on skinned clip because cutscene head is not compatible with player head
- if(strncmp(GetName(), "playerh", 8) == 0)
+ }
+ if(strncmp(GetName(), "playerh", 8) == 0){
+ // playerh is incompatible with the xbox player skin
+ // so check if player model is skinned and only apply skin to head if it isn't
+ CPedModelInfo *body = (CPedModelInfo*)CModelInfo::GetModelInfo(MI_PLAYER);
+ if(!(body->m_clump && IsClumpSkinned(body->m_clump)))
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
-
+ }
+#else
+ if(strncmp(GetName(), "playerh", 8) == 0){
+ RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
+#endif
}
void