mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-16 06:34:04 +00:00
TransformToNode crash fix?
This commit is contained in:
parent
7bd6c70318
commit
96151ec0f0
1 changed files with 13 additions and 0 deletions
|
@ -2677,6 +2677,7 @@ CPed::SetPedStats(ePedStats pedStat)
|
||||||
m_pedStats = CPedStats::ms_apPedStats[pedStat];
|
m_pedStats = CPedStats::ms_apPedStats[pedStat];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
void
|
void
|
||||||
CPed::SetModelIndex(uint32 mi)
|
CPed::SetModelIndex(uint32 mi)
|
||||||
{
|
{
|
||||||
|
@ -2689,12 +2690,24 @@ CPed::SetModelIndex(uint32 mi)
|
||||||
m_animGroup = (AssocGroupId) modelInfo->m_animGroup;
|
m_animGroup = (AssocGroupId) modelInfo->m_animGroup;
|
||||||
CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE);
|
CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE);
|
||||||
|
|
||||||
|
// TODO(Miami): This is something inlined for sure
|
||||||
|
bool canUseMyBody = false;
|
||||||
|
if (m_nPedState != PED_DRIVING && m_nPedState != PED_DRAG_FROM_CAR && !bIsDucking) {
|
||||||
|
if (m_animGroup != ASSOCGRP_SEXYWOMAN && m_animGroup != ASSOCGRP_WOMAN)
|
||||||
|
canUseMyBody = true;
|
||||||
|
}
|
||||||
|
if (!canUseMyBody)
|
||||||
|
m_pedIK.m_flags |= CPedIK::LOOKAROUND_HEAD_ONLY;
|
||||||
|
|
||||||
// This is a mistake by R*, velocity is CVector, whereas m_vecAnimMoveDelta is CVector2D.
|
// This is a mistake by R*, velocity is CVector, whereas m_vecAnimMoveDelta is CVector2D.
|
||||||
(*RPANIMBLENDCLUMPDATA(m_rwObject))->velocity = (CVector*) &m_vecAnimMoveDelta;
|
(*RPANIMBLENDCLUMPDATA(m_rwObject))->velocity = (CVector*) &m_vecAnimMoveDelta;
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
#ifdef PED_SKIN
|
||||||
if(modelInfo->GetHitColModel() == nil)
|
if(modelInfo->GetHitColModel() == nil)
|
||||||
modelInfo->CreateHitColModelSkinned(GetClump());
|
modelInfo->CreateHitColModelSkinned(GetClump());
|
||||||
|
|
||||||
|
if (IsClumpSkinned(GetClump())) // condition isn't there in VC
|
||||||
|
UpdateRpHAnim();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue