summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-08 20:50:59 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-08 20:50:59 +0100
commit8eed6ae1794989eb15fe95d867c44c196080c4dd (patch)
tree2e995dcc6e9c1eb830fe634fe695b0778c4d7957 /src/modelinfo
parentMerge pull request #909 from Fire-Head/master (diff)
downloadre3-8eed6ae1794989eb15fe95d867c44c196080c4dd.tar
re3-8eed6ae1794989eb15fe95d867c44c196080c4dd.tar.gz
re3-8eed6ae1794989eb15fe95d867c44c196080c4dd.tar.bz2
re3-8eed6ae1794989eb15fe95d867c44c196080c4dd.tar.lz
re3-8eed6ae1794989eb15fe95d867c44c196080c4dd.tar.xz
re3-8eed6ae1794989eb15fe95d867c44c196080c4dd.tar.zst
re3-8eed6ae1794989eb15fe95d867c44c196080c4dd.zip
Diffstat (limited to 'src/modelinfo')
-rw-r--r--src/modelinfo/BaseModelInfo.h4
-rw-r--r--src/modelinfo/ClumpModelInfo.cpp4
-rw-r--r--src/modelinfo/ModelInfo.cpp2
-rw-r--r--src/modelinfo/PedModelInfo.cpp6
-rw-r--r--src/modelinfo/SimpleModelInfo.cpp2
-rw-r--r--src/modelinfo/TimeModelInfo.cpp4
6 files changed, 11 insertions, 11 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h
index ae2b6668..3a94a83a 100644
--- a/src/modelinfo/BaseModelInfo.h
+++ b/src/modelinfo/BaseModelInfo.h
@@ -54,8 +54,8 @@ public:
bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE ||
m_type == MITYPE_MLO || m_type == MITYPE_XTRACOMPS; // unused but what the heck
}
- char *GetName(void) { return m_name; }
- void SetName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); }
+ char *GetModelName(void) { return m_name; }
+ void SetModelName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); }
void SetColModel(CColModel *col, bool owns = false){
m_colModel = col; m_bOwnsColModel = owns; }
CColModel *GetColModel(void) { return m_colModel; }
diff --git a/src/modelinfo/ClumpModelInfo.cpp b/src/modelinfo/ClumpModelInfo.cpp
index 64bb5ed5..ec64977b 100644
--- a/src/modelinfo/ClumpModelInfo.cpp
+++ b/src/modelinfo/ClumpModelInfo.cpp
@@ -112,7 +112,7 @@ CClumpModelInfo::SetClump(RpClump *clump)
}
RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS));
}
- if(strcmp(GetName(), "playerh") == 0){
+ if(strcmp(GetModelName(), "playerh") == 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);
@@ -120,7 +120,7 @@ CClumpModelInfo::SetClump(RpClump *clump)
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
}
#else
- if(strcmp(GetName(), "playerh") == 0){
+ if(strcmp(GetModelName(), "playerh") == 0){
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
#endif
}
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index dcde0df3..7aa5fc8b 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -192,7 +192,7 @@ CModelInfo::GetModelInfo(const char *name, int *id)
CBaseModelInfo *modelinfo;
for(int i = 0; i < MODELINFOSIZE; i++){
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
- if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name)){
+ if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name)){
if(id)
*id = i;
return modelinfo;
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index 38ce6d38..d0816467 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -97,7 +97,7 @@ CPedModelInfo::SetClump(RpClump *clump)
#endif
#ifdef PED_SKIN
// CB has to be set here before atomics are detached from clump
- if(strcmp(GetName(), "player") == 0)
+ if(strcmp(GetModelName(), "player") == 0)
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
if(IsClumpSkinned(clump)){
LimbCBarg limbs = { this, clump, { 0, 0, 0 } };
@@ -108,7 +108,7 @@ CPedModelInfo::SetClump(RpClump *clump)
if(m_hitColModel == nil && !IsClumpSkinned(clump))
CreateHitColModel();
// And again because CClumpModelInfo resets it
- if(strcmp(GetName(), "player") == 0)
+ if(strcmp(GetModelName(), "player") == 0)
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
else if(IsClumpSkinned(clump))
// skinned peds have no low detail version, so they don't have the right render Cb
@@ -118,7 +118,7 @@ CPedModelInfo::SetClump(RpClump *clump)
SetFrameIds(m_pPedIds);
if(m_hitColModel == nil)
CreateHitColModel();
- if(strcmp(GetName(), "player") == 0)
+ if(strcmp(GetModelName(), "player") == 0)
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
#endif
}
diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp
index 416bdad5..55828b31 100644
--- a/src/modelinfo/SimpleModelInfo.cpp
+++ b/src/modelinfo/SimpleModelInfo.cpp
@@ -143,7 +143,7 @@ CSimpleModelInfo::FindRelatedModel(void)
for(i = 0; i < MODELINFOSIZE; i++){
mi = CModelInfo::GetModelInfo(i);
if(mi && mi != this &&
- !CGeneral::faststrcmp(GetName()+3, mi->GetName()+3)){
+ !CGeneral::faststrcmp(GetModelName()+3, mi->GetModelName()+3)){
assert(mi->IsSimple());
this->SetRelatedModel((CSimpleModelInfo*)mi);
return;
diff --git a/src/modelinfo/TimeModelInfo.cpp b/src/modelinfo/TimeModelInfo.cpp
index c1c18dac..0db5fb78 100644
--- a/src/modelinfo/TimeModelInfo.cpp
+++ b/src/modelinfo/TimeModelInfo.cpp
@@ -11,7 +11,7 @@ CTimeModelInfo::FindOtherTimeModel(void)
char *p;
int i;
- strcpy(name, GetName());
+ strcpy(name, GetModelName());
// change _nt to _dy
if(p = strstr(name, "_nt"))
strncpy(p, "_dy", 4);
@@ -24,7 +24,7 @@ CTimeModelInfo::FindOtherTimeModel(void)
for(i = 0; i < MODELINFOSIZE; i++){
CBaseModelInfo *mi = CModelInfo::GetModelInfo(i);
if (mi && mi->GetModelType() == MITYPE_TIME &&
- !CGeneral::faststrncmp(name, mi->GetName(), MAX_MODEL_NAME)){
+ !CGeneral::faststrncmp(name, mi->GetModelName(), MAX_MODEL_NAME)){
m_otherTimeModelID = i;
return (CTimeModelInfo*)mi;
}