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

◆ OnSetup()

override void EntityPlacementCallback::OnSetup ( )
inlineprivate

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

33 {
34#ifdef DIAG_DEVELOPER
35#ifndef SERVER
36 m_DebugEnabled = DiagMenu.GetBool(DiagMenuIDs.INVENTORY_ENTITY_PLACEMENT_CALLBACK_DEBUG);
37#endif
38#endif
39
41
42 m_DirectionFunc[0] = 1.2;
43 m_DirectionFunc[1] = 0.3;
44
45 Human human;
46 if (Class.CastTo(human, m_Owner))
47 {
48 m_OwnerPosition = human.GetBonePositionWS(human.GetBoneIndexByName("Head"));
49
50 HumanInputController hic = human.GetInputController();
51 if (hic)
52 {
53 float headingAngle = hic.GetHeadingAngle() + Math.PI_HALF;
54 m_OwnerDirection[0] = Math.Cos(headingAngle);
55 m_OwnerDirection[1] = 0.0;
56 m_OwnerDirection[2] = Math.Sin(headingAngle);
57
59 }
60 else
61 {
62 m_OwnerDirection = human.GetDirection();
63 }
64 }
65 else if (m_Owner)
66 {
67 m_OwnerPosition = m_Owner.GetPosition();
68 m_OwnerDirection = m_Owner.GetDirection();
69 }
70 }
DiagMenuIDs
Определения EDiagMenuIDs.c:2
vector m_DirectionFunc
The size of the boundig box, centered.
Определения Object.c:18
enum ProcessDirectDamageFlags m_Owner
vector m_OwnerDirection
The position of the owner in world space.
Определения Object.c:13
bool m_DebugEnabled
How much should the direction be favoured.
Определения Object.c:20
vector m_OwnerPosition
The owner performing the snap callback.
Определения Object.c:12
void ClearDebugShapes()
Определения EntityPlacementCallback.c:18
proto native float GetHeadingAngle()
returns main heading angle (in radians) -PI .. PI (this is world Y angle player is actualy pointing t...
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)

Перекрестные ссылки Class::CastTo(), ClearDebugShapes(), Math::Cos(), DiagMenu::GetBool(), HumanInputController::GetHeadingAngle(), m_DebugEnabled, m_DirectionFunc, m_Owner, m_OwnerDirection, m_OwnerPosition, Math::PI_HALF и Math::Sin().