Fix use of strncmp
This commit is contained in:
@@ -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(strncmp(GetName(), "player", 7) == 0)
|
||||
if(strcmp(GetName(), "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(strncmp(GetName(), "player", 7) == 0)
|
||||
if(strcmp(GetName(), "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(strncmp(GetName(), "player", 7) == 0)
|
||||
if(strcmp(GetName(), "player") == 0)
|
||||
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, (void*)CVisibilityPlugins::RenderPlayerCB);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user