DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetBonePosition()

vector DustEffectCeilingHandlerBase::GetBonePosition ( string boneName)
inlineprotected

См. определение в файле DustEffectCeilingHandler.c строка 43

44 {
45 DayZCreature creature;
46 DayZPlayerImplement player;
47
48 vector ownerPos = m_Owner.GetPosition();
49 if (boneName == "")
50 return ownerPos;
51
52 int boneIdx = -1;
53 if (Class.CastTo(creature, m_Owner))
54 boneIdx = creature.GetBoneIndexByName(boneName);
55 if (Class.CastTo(player, m_Owner))
56 boneIdx = player.GetBoneIndexByName(boneName);
57
58 if (boneIdx == -1)
59 return ownerPos;
60
61 vector bonePos = m_Owner.GetBonePositionWS(boneIdx);
62 bonePos[1] = ownerPos[1]; //equalize Y to allow for consistent height adjustment later
63 return bonePos;
64 }

Перекрестные ссылки Class::CastTo() и m_Owner.

Используется в OnStepUpdate().