mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
Use original names
This commit is contained in:
parent
6e42c791cf
commit
8eed6ae179
@ -111,7 +111,7 @@ GetModelFromName(const char *name)
|
|||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
for(i = 0; i < MODELINFOSIZE; i++){
|
||||||
mi = CModelInfo::GetModelInfo(i);
|
mi = CModelInfo::GetModelInfo(i);
|
||||||
if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
|
if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
|
||||||
strcmpIgnoringDigits(mi->GetName(), name))
|
strcmpIgnoringDigits(mi->GetModelName(), name))
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
@ -134,7 +134,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
|||||||
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
||||||
CBaseModelInfo *model = GetModelFromName(anim->name);
|
CBaseModelInfo *model = GetModelFromName(anim->name);
|
||||||
assert(model);
|
assert(model);
|
||||||
printf("Associated anim %s with model %s\n", anim->name, model->GetName());
|
printf("Associated anim %s with model %s\n", anim->name, model->GetModelName());
|
||||||
RpClump *clump = (RpClump*)model->CreateInstance();
|
RpClump *clump = (RpClump*)model->CreateInstance();
|
||||||
#ifdef PED_SKIN
|
#ifdef PED_SKIN
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
|
@ -5788,7 +5788,7 @@ cAudioManager::GetCasualMaleOldTalkSfx(int16 sound)
|
|||||||
uint32
|
uint32
|
||||||
cAudioManager::GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound)
|
cAudioManager::GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound)
|
||||||
{
|
{
|
||||||
char *modelName = CModelInfo::GetModelInfo(modelIndex)->GetName();
|
char *modelName = CModelInfo::GetModelInfo(modelIndex)->GetModelName();
|
||||||
if (!CGeneral::faststricmp(modelName, "eight") || !CGeneral::faststricmp(modelName, "eight2")) {
|
if (!CGeneral::faststricmp(modelName, "eight") || !CGeneral::faststricmp(modelName, "eight2")) {
|
||||||
return GetEightTalkSfx(sound);
|
return GetEightTalkSfx(sound);
|
||||||
}
|
}
|
||||||
|
@ -2556,7 +2556,7 @@ void CTheScripts::UpdateObjectIndices()
|
|||||||
CBaseModelInfo* pModel = CModelInfo::GetModelInfo(j);
|
CBaseModelInfo* pModel = CModelInfo::GetModelInfo(j);
|
||||||
if (!pModel)
|
if (!pModel)
|
||||||
continue;
|
continue;
|
||||||
strcpy(name, pModel->GetName());
|
strcpy(name, pModel->GetModelName());
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++)
|
for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++)
|
||||||
#else
|
#else
|
||||||
|
@ -445,7 +445,7 @@ bool
|
|||||||
CFileLoader::StartLoadClumpFile(RwStream *stream, uint32 id)
|
CFileLoader::StartLoadClumpFile(RwStream *stream, uint32 id)
|
||||||
{
|
{
|
||||||
if(RwStreamFindChunk(stream, rwID_CLUMP, nil, nil)){
|
if(RwStreamFindChunk(stream, rwID_CLUMP, nil, nil)){
|
||||||
printf("Start loading %s\n", CModelInfo::GetModelInfo(id)->GetName());
|
printf("Start loading %s\n", CModelInfo::GetModelInfo(id)->GetModelName());
|
||||||
return RpClumpGtaStreamRead1(stream);
|
return RpClumpGtaStreamRead1(stream);
|
||||||
}else{
|
}else{
|
||||||
printf("FAILED\n");
|
printf("FAILED\n");
|
||||||
@ -459,7 +459,7 @@ CFileLoader::FinishLoadClumpFile(RwStream *stream, uint32 id)
|
|||||||
RpClump *clump;
|
RpClump *clump;
|
||||||
CClumpModelInfo *mi;
|
CClumpModelInfo *mi;
|
||||||
|
|
||||||
printf("Finish loading %s\n", CModelInfo::GetModelInfo(id)->GetName());
|
printf("Finish loading %s\n", CModelInfo::GetModelInfo(id)->GetModelName());
|
||||||
clump = RpClumpGtaStreamRead2(stream);
|
clump = RpClumpGtaStreamRead2(stream);
|
||||||
|
|
||||||
if(clump){
|
if(clump){
|
||||||
@ -1075,9 +1075,9 @@ SetModelInfoFlags(CSimpleModelInfo *mi, uint32 flags)
|
|||||||
|
|
||||||
#ifdef HARDCODED_MODEL_FLAGS
|
#ifdef HARDCODED_MODEL_FLAGS
|
||||||
// mobile sets these flags in CFileLoader::SetRelatedModelInfoCB, but that's stupid
|
// mobile sets these flags in CFileLoader::SetRelatedModelInfoCB, but that's stupid
|
||||||
if(MatchModelName(mi->GetName(), DoubleSidedNames)) mi->m_bIsDoubleSided = true;
|
if(MatchModelName(mi->GetModelName(), DoubleSidedNames)) mi->m_bIsDoubleSided = true;
|
||||||
if(MatchModelName(mi->GetName(), TreeNames)) mi->m_bIsTree = true;
|
if(MatchModelName(mi->GetModelName(), TreeNames)) mi->m_bIsTree = true;
|
||||||
if(MatchModelName(mi->GetName(), OptimizedNames)) mi->m_bCanBeIgnored = true;
|
if(MatchModelName(mi->GetModelName(), OptimizedNames)) mi->m_bCanBeIgnored = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -1119,7 +1119,7 @@ CFileLoader::LoadObject(const char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mi = CModelInfo::AddSimpleModel(id);
|
mi = CModelInfo::AddSimpleModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetNumAtomics(numObjs);
|
mi->SetNumAtomics(numObjs);
|
||||||
mi->SetLodDistances(dist);
|
mi->SetLodDistances(dist);
|
||||||
SetModelInfoFlags(mi, flags);
|
SetModelInfoFlags(mi, flags);
|
||||||
@ -1138,7 +1138,7 @@ CFileLoader::LoadMLO(const char *line)
|
|||||||
|
|
||||||
sscanf(line, "%s %s %d %f", smth, name, &modelIndex, &someFloat);
|
sscanf(line, "%s %s %d %f", smth, name, &modelIndex, &someFloat);
|
||||||
CMloModelInfo *minfo = CModelInfo::AddMloModel(modelIndex);
|
CMloModelInfo *minfo = CModelInfo::AddMloModel(modelIndex);
|
||||||
minfo->SetName(name);
|
minfo->SetModelName(name);
|
||||||
minfo->field_34 = someFloat;
|
minfo->field_34 = someFloat;
|
||||||
int instId = CModelInfo::GetMloInstanceStore().allocPtr;
|
int instId = CModelInfo::GetMloInstanceStore().allocPtr;
|
||||||
minfo->firstInstance = instId;
|
minfo->firstInstance = instId;
|
||||||
@ -1216,7 +1216,7 @@ CFileLoader::LoadTimeObject(const char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mi = CModelInfo::AddTimeModel(id);
|
mi = CModelInfo::AddTimeModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetNumAtomics(numObjs);
|
mi->SetNumAtomics(numObjs);
|
||||||
mi->SetLodDistances(dist);
|
mi->SetLodDistances(dist);
|
||||||
SetModelInfoFlags(mi, flags);
|
SetModelInfoFlags(mi, flags);
|
||||||
@ -1238,7 +1238,7 @@ CFileLoader::LoadClumpObject(const char *line)
|
|||||||
|
|
||||||
if(sscanf(line, "%d %s %s", &id, model, txd) == 3){
|
if(sscanf(line, "%d %s %s", &id, model, txd) == 3){
|
||||||
mi = CModelInfo::AddClumpModel(id);
|
mi = CModelInfo::AddClumpModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
mi->SetColModel(&CTempColModels::ms_colModelBBox);
|
mi->SetColModel(&CTempColModels::ms_colModelBBox);
|
||||||
}
|
}
|
||||||
@ -1262,7 +1262,7 @@ CFileLoader::LoadVehicleObject(const char *line)
|
|||||||
&frequency, &level, &comprules, &misc, &wheelScale);
|
&frequency, &level, &comprules, &misc, &wheelScale);
|
||||||
|
|
||||||
mi = CModelInfo::AddVehicleModel(id);
|
mi = CModelInfo::AddVehicleModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
for(p = gamename; *p; p++)
|
for(p = gamename; *p; p++)
|
||||||
if(*p == '_') *p = ' ';
|
if(*p == '_') *p = ' ';
|
||||||
@ -1341,7 +1341,7 @@ CFileLoader::LoadPedObject(const char *line)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
mi = CModelInfo::AddPedModel(id);
|
mi = CModelInfo::AddPedModel(id);
|
||||||
mi->SetName(model);
|
mi->SetModelName(model);
|
||||||
mi->SetTexDictionary(txd);
|
mi->SetTexDictionary(txd);
|
||||||
mi->SetColModel(&CTempColModels::ms_colModelPed1);
|
mi->SetColModel(&CTempColModels::ms_colModelPed1);
|
||||||
mi->m_pedType = CPedType::FindPedType(pedType);
|
mi->m_pedType = CPedType::FindPedType(pedType);
|
||||||
@ -1815,7 +1815,7 @@ CFileLoader::ReloadObject(const char *line)
|
|||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
mi &&
|
mi &&
|
||||||
#endif
|
#endif
|
||||||
mi->GetModelType() == MITYPE_SIMPLE && !strcmp(mi->GetName(), model) && mi->m_numAtomics == numObjs) {
|
mi->GetModelType() == MITYPE_SIMPLE && !strcmp(mi->GetModelName(), model) && mi->m_numAtomics == numObjs) {
|
||||||
mi->SetLodDistances(dist);
|
mi->SetLodDistances(dist);
|
||||||
SetModelInfoFlags(mi, flags);
|
SetModelInfoFlags(mi, flags);
|
||||||
} else {
|
} else {
|
||||||
|
@ -485,7 +485,7 @@ INITSAVEBUF
|
|||||||
#endif
|
#endif
|
||||||
CopyToBuf(buf, CWanted::MaximumWantedLevel);
|
CopyToBuf(buf, CWanted::MaximumWantedLevel);
|
||||||
CopyToBuf(buf, CWanted::nMaximumWantedLevel);
|
CopyToBuf(buf, CWanted::nMaximumWantedLevel);
|
||||||
memcpy(buf, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetName(), MAX_MODEL_NAME);
|
memcpy(buf, CModelInfo::GetModelInfo(pPed->GetModelIndex())->GetModelName(), MAX_MODEL_NAME);
|
||||||
SkipSaveBuf(buf, MAX_MODEL_NAME);
|
SkipSaveBuf(buf, MAX_MODEL_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -515,7 +515,7 @@ CStreaming::ConvertBufferToObject(int8 *buf, int32 streamId)
|
|||||||
// texDict will exist even if only first part has loaded
|
// texDict will exist even if only first part has loaded
|
||||||
if(CTxdStore::GetSlot(mi->GetTxdSlot())->texDict == nil){
|
if(CTxdStore::GetSlot(mi->GetTxdSlot())->texDict == nil){
|
||||||
#endif
|
#endif
|
||||||
debug("failed to load %s because TXD %s is not in memory\n", mi->GetName(), CTxdStore::GetTxdName(mi->GetTxdSlot()));
|
debug("failed to load %s because TXD %s is not in memory\n", mi->GetModelName(), CTxdStore::GetTxdName(mi->GetTxdSlot()));
|
||||||
RemoveModel(streamId);
|
RemoveModel(streamId);
|
||||||
#ifndef FIX_BUGS
|
#ifndef FIX_BUGS
|
||||||
// if we're just waiting for it to load, don't remove this
|
// if we're just waiting for it to load, don't remove this
|
||||||
@ -557,7 +557,7 @@ CStreaming::ConvertBufferToObject(int8 *buf, int32 streamId)
|
|||||||
CTxdStore::RemoveRefWithoutDelete(mi->GetTxdSlot());
|
CTxdStore::RemoveRefWithoutDelete(mi->GetTxdSlot());
|
||||||
|
|
||||||
if(!success){
|
if(!success){
|
||||||
debug("Failed to load %s\n", CModelInfo::GetModelInfo(streamId)->GetName());
|
debug("Failed to load %s\n", CModelInfo::GetModelInfo(streamId)->GetModelName());
|
||||||
RemoveModel(streamId);
|
RemoveModel(streamId);
|
||||||
ReRequestModel(streamId);
|
ReRequestModel(streamId);
|
||||||
RwStreamClose(stream, &mem);
|
RwStreamClose(stream, &mem);
|
||||||
@ -598,7 +598,7 @@ CStreaming::ConvertBufferToObject(int8 *buf, int32 streamId)
|
|||||||
if(!success){
|
if(!success){
|
||||||
ReRequestModel(streamId);
|
ReRequestModel(streamId);
|
||||||
if(streamId < STREAM_OFFSET_TXD)
|
if(streamId < STREAM_OFFSET_TXD)
|
||||||
debug("Failed to load %s.dff\n", mi->GetName());
|
debug("Failed to load %s.dff\n", mi->GetModelName());
|
||||||
else
|
else
|
||||||
debug("Failed to load %s.txd\n", CTxdStore::GetTxdName(streamId - STREAM_OFFSET_TXD));
|
debug("Failed to load %s.txd\n", CTxdStore::GetTxdName(streamId - STREAM_OFFSET_TXD));
|
||||||
return false;
|
return false;
|
||||||
@ -639,7 +639,7 @@ CStreaming::ConvertBufferToObject(int8 *buf, int32 streamId)
|
|||||||
timeDiff = endTime - startTime;
|
timeDiff = endTime - startTime;
|
||||||
if(timeDiff > 5){
|
if(timeDiff > 5){
|
||||||
if(streamId < STREAM_OFFSET_TXD)
|
if(streamId < STREAM_OFFSET_TXD)
|
||||||
debug("model %s took %d ms\n", CModelInfo::GetModelInfo(streamId)->GetName(), timeDiff);
|
debug("model %s took %d ms\n", CModelInfo::GetModelInfo(streamId)->GetModelName(), timeDiff);
|
||||||
else
|
else
|
||||||
debug("txd %s took %d ms\n", CTxdStore::GetTxdName(streamId - STREAM_OFFSET_TXD), timeDiff);
|
debug("txd %s took %d ms\n", CTxdStore::GetTxdName(streamId - STREAM_OFFSET_TXD), timeDiff);
|
||||||
}
|
}
|
||||||
@ -713,7 +713,7 @@ CStreaming::FinishLoadingLargeFile(int8 *buf, int32 streamId)
|
|||||||
timeDiff = endTime - startTime;
|
timeDiff = endTime - startTime;
|
||||||
if(timeDiff > 5){
|
if(timeDiff > 5){
|
||||||
if(streamId < STREAM_OFFSET_TXD)
|
if(streamId < STREAM_OFFSET_TXD)
|
||||||
debug("finish model %s took %d ms\n", CModelInfo::GetModelInfo(streamId)->GetName(), timeDiff);
|
debug("finish model %s took %d ms\n", CModelInfo::GetModelInfo(streamId)->GetModelName(), timeDiff);
|
||||||
else
|
else
|
||||||
debug("finish txd %s took %d ms\n", CTxdStore::GetTxdName(streamId - STREAM_OFFSET_TXD), timeDiff);
|
debug("finish txd %s took %d ms\n", CTxdStore::GetTxdName(streamId - STREAM_OFFSET_TXD), timeDiff);
|
||||||
}
|
}
|
||||||
@ -867,14 +867,14 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag
|
|||||||
uint32 pos, size;
|
uint32 pos, size;
|
||||||
|
|
||||||
mi = CModelInfo::GetModelInfo(modelId);
|
mi = CModelInfo::GetModelInfo(modelId);
|
||||||
if(!CGeneral::faststrcmp(mi->GetName(), modelName)){
|
if(!CGeneral::faststrcmp(mi->GetModelName(), modelName)){
|
||||||
// Already have the correct name, just request it
|
// Already have the correct name, just request it
|
||||||
RequestModel(modelId, flags);
|
RequestModel(modelId, flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(oldName, mi->GetName());
|
strcpy(oldName, mi->GetModelName());
|
||||||
mi->SetName(modelName);
|
mi->SetModelName(modelName);
|
||||||
|
|
||||||
// What exactly is going on here?
|
// What exactly is going on here?
|
||||||
if(CModelInfo::GetModelInfo(oldName, nil)){
|
if(CModelInfo::GetModelInfo(oldName, nil)){
|
||||||
@ -2775,7 +2775,7 @@ CStreaming::PrintStreamingBufferState()
|
|||||||
sprintf(str, "txd %s, refs %d, size %dK, flags 0x%x", CTxdStore::GetTxdName(modelIndex - STREAM_OFFSET_TXD),
|
sprintf(str, "txd %s, refs %d, size %dK, flags 0x%x", CTxdStore::GetTxdName(modelIndex - STREAM_OFFSET_TXD),
|
||||||
CTxdStore::GetNumRefs(modelIndex - STREAM_OFFSET_TXD), 2 * size, streamingInfo->m_flags);
|
CTxdStore::GetNumRefs(modelIndex - STREAM_OFFSET_TXD), 2 * size, streamingInfo->m_flags);
|
||||||
else
|
else
|
||||||
sprintf(str, "model %d,%s, refs%d, size%dK, flags%x", modelIndex, modelInfo->GetName(), modelInfo->GetNumRefs(), 2 * size,
|
sprintf(str, "model %d,%s, refs%d, size%dK, flags%x", modelIndex, modelInfo->GetModelName(), modelInfo->GetNumRefs(), 2 * size,
|
||||||
streamingInfo->m_flags);
|
streamingInfo->m_flags);
|
||||||
AsciiToUnicode(str, wstr);
|
AsciiToUnicode(str, wstr);
|
||||||
CFont::PrintString(24.0f, y, wstr);
|
CFont::PrintString(24.0f, y, wstr);
|
||||||
|
@ -582,7 +582,7 @@ CEntity::SetupBigBuilding(void)
|
|||||||
if(m_level == LEVEL_GENERIC){
|
if(m_level == LEVEL_GENERIC){
|
||||||
if(mi->GetTxdSlot() != CTxdStore::FindTxdSlot("generic")){
|
if(mi->GetTxdSlot() != CTxdStore::FindTxdSlot("generic")){
|
||||||
mi->SetTexDictionary("generic");
|
mi->SetTexDictionary("generic");
|
||||||
printf("%d:%s txd has been set to generic\n", m_modelIndex, mi->GetName());
|
printf("%d:%s txd has been set to generic\n", m_modelIndex, mi->GetModelName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(mi->m_lodDistances[0] > 2000.0f)
|
if(mi->m_lodDistances[0] > 2000.0f)
|
||||||
|
@ -54,8 +54,8 @@ public:
|
|||||||
bool IsClump(void) { return m_type == MITYPE_CLUMP || m_type == MITYPE_PED || m_type == MITYPE_VEHICLE ||
|
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
|
m_type == MITYPE_MLO || m_type == MITYPE_XTRACOMPS; // unused but what the heck
|
||||||
}
|
}
|
||||||
char *GetName(void) { return m_name; }
|
char *GetModelName(void) { return m_name; }
|
||||||
void SetName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); }
|
void SetModelName(const char *name) { strncpy(m_name, name, MAX_MODEL_NAME); }
|
||||||
void SetColModel(CColModel *col, bool owns = false){
|
void SetColModel(CColModel *col, bool owns = false){
|
||||||
m_colModel = col; m_bOwnsColModel = owns; }
|
m_colModel = col; m_bOwnsColModel = owns; }
|
||||||
CColModel *GetColModel(void) { return m_colModel; }
|
CColModel *GetColModel(void) { return m_colModel; }
|
||||||
|
@ -112,7 +112,7 @@ CClumpModelInfo::SetClump(RpClump *clump)
|
|||||||
}
|
}
|
||||||
RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS));
|
RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS));
|
||||||
}
|
}
|
||||||
if(strcmp(GetName(), "playerh") == 0){
|
if(strcmp(GetModelName(), "playerh") == 0){
|
||||||
// playerh is incompatible with the xbox player skin
|
// 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
|
// so check if player model is skinned and only apply skin to head if it isn't
|
||||||
CPedModelInfo *body = (CPedModelInfo*)CModelInfo::GetModelInfo(MI_PLAYER);
|
CPedModelInfo *body = (CPedModelInfo*)CModelInfo::GetModelInfo(MI_PLAYER);
|
||||||
@ -120,7 +120,7 @@ CClumpModelInfo::SetClump(RpClump *clump)
|
|||||||
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if(strcmp(GetName(), "playerh") == 0){
|
if(strcmp(GetModelName(), "playerh") == 0){
|
||||||
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ CModelInfo::GetModelInfo(const char *name, int *id)
|
|||||||
CBaseModelInfo *modelinfo;
|
CBaseModelInfo *modelinfo;
|
||||||
for(int i = 0; i < MODELINFOSIZE; i++){
|
for(int i = 0; i < MODELINFOSIZE; i++){
|
||||||
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
modelinfo = CModelInfo::ms_modelInfoPtrs[i];
|
||||||
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetName(), name)){
|
if(modelinfo && !CGeneral::faststricmp(modelinfo->GetModelName(), name)){
|
||||||
if(id)
|
if(id)
|
||||||
*id = i;
|
*id = i;
|
||||||
return modelinfo;
|
return modelinfo;
|
||||||
|
@ -97,7 +97,7 @@ CPedModelInfo::SetClump(RpClump *clump)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef PED_SKIN
|
#ifdef PED_SKIN
|
||||||
// CB has to be set here before atomics are detached from clump
|
// 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);
|
RpClumpForAllAtomics(clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||||
if(IsClumpSkinned(clump)){
|
if(IsClumpSkinned(clump)){
|
||||||
LimbCBarg limbs = { this, clump, { 0, 0, 0 } };
|
LimbCBarg limbs = { this, clump, { 0, 0, 0 } };
|
||||||
@ -108,7 +108,7 @@ CPedModelInfo::SetClump(RpClump *clump)
|
|||||||
if(m_hitColModel == nil && !IsClumpSkinned(clump))
|
if(m_hitColModel == nil && !IsClumpSkinned(clump))
|
||||||
CreateHitColModel();
|
CreateHitColModel();
|
||||||
// And again because CClumpModelInfo resets it
|
// And again because CClumpModelInfo resets it
|
||||||
if(strcmp(GetName(), "player") == 0)
|
if(strcmp(GetModelName(), "player") == 0)
|
||||||
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||||
else if(IsClumpSkinned(clump))
|
else if(IsClumpSkinned(clump))
|
||||||
// skinned peds have no low detail version, so they don't have the right render Cb
|
// 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);
|
SetFrameIds(m_pPedIds);
|
||||||
if(m_hitColModel == nil)
|
if(m_hitColModel == nil)
|
||||||
CreateHitColModel();
|
CreateHitColModel();
|
||||||
if(strcmp(GetName(), "player") == 0)
|
if(strcmp(GetModelName(), "player") == 0)
|
||||||
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ CSimpleModelInfo::FindRelatedModel(void)
|
|||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
for(i = 0; i < MODELINFOSIZE; i++){
|
||||||
mi = CModelInfo::GetModelInfo(i);
|
mi = CModelInfo::GetModelInfo(i);
|
||||||
if(mi && mi != this &&
|
if(mi && mi != this &&
|
||||||
!CGeneral::faststrcmp(GetName()+3, mi->GetName()+3)){
|
!CGeneral::faststrcmp(GetModelName()+3, mi->GetModelName()+3)){
|
||||||
assert(mi->IsSimple());
|
assert(mi->IsSimple());
|
||||||
this->SetRelatedModel((CSimpleModelInfo*)mi);
|
this->SetRelatedModel((CSimpleModelInfo*)mi);
|
||||||
return;
|
return;
|
||||||
|
@ -11,7 +11,7 @@ CTimeModelInfo::FindOtherTimeModel(void)
|
|||||||
char *p;
|
char *p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
strcpy(name, GetName());
|
strcpy(name, GetModelName());
|
||||||
// change _nt to _dy
|
// change _nt to _dy
|
||||||
if(p = strstr(name, "_nt"))
|
if(p = strstr(name, "_nt"))
|
||||||
strncpy(p, "_dy", 4);
|
strncpy(p, "_dy", 4);
|
||||||
@ -24,7 +24,7 @@ CTimeModelInfo::FindOtherTimeModel(void)
|
|||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
for(i = 0; i < MODELINFOSIZE; i++){
|
||||||
CBaseModelInfo *mi = CModelInfo::GetModelInfo(i);
|
CBaseModelInfo *mi = CModelInfo::GetModelInfo(i);
|
||||||
if (mi && mi->GetModelType() == MITYPE_TIME &&
|
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;
|
m_otherTimeModelID = i;
|
||||||
return (CTimeModelInfo*)mi;
|
return (CTimeModelInfo*)mi;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ CPed::ServiceTalking(void)
|
|||||||
if (bBodyPartJustCameOff && m_bodyPartBleeding == PED_HEAD)
|
if (bBodyPartJustCameOff && m_bodyPartBleeding == PED_HEAD)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!CGeneral::faststricmp(CModelInfo::GetModelInfo(GetModelIndex())->GetName(), "bomber"))
|
if (!CGeneral::faststricmp(CModelInfo::GetModelInfo(GetModelIndex())->GetModelName(), "bomber"))
|
||||||
m_queuedSound = SOUND_PED_BOMBER;
|
m_queuedSound = SOUND_PED_BOMBER;
|
||||||
else if (m_nPedState == PED_ON_FIRE)
|
else if (m_nPedState == PED_ON_FIRE)
|
||||||
m_queuedSound = SOUND_PED_BURNING;
|
m_queuedSound = SOUND_PED_BURNING;
|
||||||
|
@ -4582,7 +4582,7 @@ CAutomobile::SetBumperDamage(int32 component, ePanels panel, bool noFlyingCompon
|
|||||||
int status = Damage.GetPanelStatus(panel);
|
int status = Damage.GetPanelStatus(panel);
|
||||||
if(m_aCarNodes[component] == nil){
|
if(m_aCarNodes[component] == nil){
|
||||||
printf("Trying to damage component %d of %s\n",
|
printf("Trying to damage component %d of %s\n",
|
||||||
component, CModelInfo::GetModelInfo(GetModelIndex())->GetName());
|
component, CModelInfo::GetModelInfo(GetModelIndex())->GetModelName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(status == PANEL_STATUS_SMASHED1){
|
if(status == PANEL_STATUS_SMASHED1){
|
||||||
@ -4602,7 +4602,7 @@ CAutomobile::SetDoorDamage(int32 component, eDoors door, bool noFlyingComponents
|
|||||||
int status = Damage.GetDoorStatus(door);
|
int status = Damage.GetDoorStatus(door);
|
||||||
if(m_aCarNodes[component] == nil){
|
if(m_aCarNodes[component] == nil){
|
||||||
printf("Trying to damage component %d of %s\n",
|
printf("Trying to damage component %d of %s\n",
|
||||||
component, CModelInfo::GetModelInfo(GetModelIndex())->GetName());
|
component, CModelInfo::GetModelInfo(GetModelIndex())->GetModelName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user