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

◆ ActionCondition()

override bool ActionAnimateMotorbikeSeat::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

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

15 {
16 if(!target)
17 return false;
18
19 MotorbikeScript bike;
20 if (Class.CastTo(bike, target.GetObject()))
21 {
22 if (bike.CrewMember(DayZPlayerConstants.VEHICLESEAT_DRIVER))
23 return false;
24
25 TStringArray selections = new TStringArray();
26 bike.GetActionComponentNameList(target.GetComponentIndex(), selections, LOD.NAME_VIEW);
27
28 vector playerPosition = player.GetPosition();
29 foreach (string selection : selections)
30 {
31 if (bike.CanReachSeatFromDoors(selection, playerPosition, 1.0))
32 {
33 m_AnimSource = bike.GetAnimSourceFromSelection(selection);
34 if (m_AnimSource != "" && m_AnimSource == "SeatDriver")
35 return true;
36 }
37 }
38 }
39
40 return false;
41 }
void MotorbikeScript()
Определения MotorbikeScript.c:105
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
class array< Class T > TStringArray

Перекрестные ссылки ActionTarget(), Class::CastTo(), ActionAnimateCarSelection::m_AnimSource, MotorbikeScript(), LOD::NAME_VIEW и TStringArray.