summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-08 20:53:42 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-08 20:53:42 +0100
commitaf09cb06f5c148f16c1bd1b5f20e766a15abe8c4 (patch)
tree0260b5d6504e05b1e6f009015638c7ef0115ca5f /src/modelinfo
parentCKeyGen (diff)
parentUse original names (diff)
downloadre3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.tar
re3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.tar.gz
re3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.tar.bz2
re3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.tar.lz
re3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.tar.xz
re3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.tar.zst
re3-af09cb06f5c148f16c1bd1b5f20e766a15abe8c4.zip
Diffstat (limited to 'src/modelinfo')
-rw-r--r--src/modelinfo/BaseModelInfo.h4
-rw-r--r--src/modelinfo/ModelInfo.cpp4
-rw-r--r--src/modelinfo/PedModelInfo.cpp2
-rw-r--r--src/modelinfo/SimpleModelInfo.cpp4
-rw-r--r--src/modelinfo/TimeModelInfo.cpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h
index 23ba5e66..a4906fc9 100644
--- a/src/modelinfo/BaseModelInfo.h
+++ b/src/modelinfo/BaseModelInfo.h
@@ -50,8 +50,8 @@ public:
bool IsBuilding(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME; }
bool IsSimple(void) { return m_type == MITYPE_SIMPLE || m_type == MITYPE_TIME || m_type == MITYPE_WEAPON; }
bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE; }
- 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/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index 9e5b0470..0a542cf6 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -189,7 +189,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;
@@ -207,7 +207,7 @@ CModelInfo::GetModelInfo(const char *name, int minIndex, int maxIndex)
CBaseModelInfo *modelinfo;
for(int i = minIndex; i <= maxIndex; i++){
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
- if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name))
+ if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name))
return modelinfo;
}
return nil;
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index bd515391..e84b9272 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -48,7 +48,7 @@ CPedModelInfo::SetClump(RpClump *clump)
if(m_hitColModel == nil)
CreateHitColModelSkinned(clump);
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPedCB);
- if(strcmp(GetName(), "player") == 0)
+ if(strcmp(GetModelName(), "player") == 0)
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
}
diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp
index 77275ce7..d584dada 100644
--- a/src/modelinfo/SimpleModelInfo.cpp
+++ b/src/modelinfo/SimpleModelInfo.cpp
@@ -167,7 +167,7 @@ CSimpleModelInfo::FindRelatedModel(int32 minID, int32 maxID)
for(i = minID; i <= maxID; 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;
@@ -189,7 +189,7 @@ CSimpleModelInfo::SetupBigBuilding(int32 minID, int32 maxID)
m_lodDistances[2] = related->GetLargestLodDistance()/TheCamera.LODDistMultiplier;
if(m_drawLast){
m_drawLast = false;
- debug("%s was draw last\n", GetName());
+ debug("%s was draw last\n", GetModelName());
}
}else
m_lodDistances[2] = NEAR_DRAW_DIST;
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;
}