14 [
Attribute( defvalue:
"0", uiwidget: UIWidgets.EditBox,
desc:
"Provide index of related SmartActionSentinel" )]
15 protected int m_iSmartActionId;
20 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
24 array<Managed> aComponents = {};
25 pOwnerEntity.FindComponents(SCR_AISmartActionSentinelComponent, aComponents);
26 if (m_iSmartActionId > aComponents.Count() - 1)
27 Print(
"Invalid SmartAction id!",LogLevel.ERROR);
28 SCR_AISmartActionSentinelComponent smartAction = SCR_AISmartActionSentinelComponent.Cast(aComponents[m_iSmartActionId]);
32 pOwnerEntity.GetWorldTransform(mat);
33 vector desiredPos = mat[3] + smartAction.GetActionOffset().Multiply3(mat);
34 vector desiredLookPos = mat[3] + smartAction.GetLookPosition().Multiply3(mat);
35 vector actionEntityUp = mat[1];
37 Math3D.DirectionAndUpMatrix(desiredLookPos - desiredPos, actionEntityUp,
m_vActionTransform);
60 contr.StopLoitering(
false);
72 return !m_Occupant || m_Occupant == user;
78 outName = (
"#AR-UserAction_Loiter");
93 case ELeaningType.NONE:
97 case ELeaningType.LEFT:
101 case ELeaningType.RIGHT: