4 override bool CanBeShownScript(IEntity user)
6 ChimeraCharacter userChar = ChimeraCharacter.Cast(user);
7 ChimeraCharacter ownerChar = ChimeraCharacter.Cast(
GetOwner());
8 if (!userChar || !ownerChar)
11 if (userChar == ownerChar)
18 HitZone hz = damageMan.GetDefaultHitZone();
32 CompartmentAccessComponent userCompAccessComp = userChar.GetCompartmentAccessComponent();
33 CompartmentAccessComponent targetCompAccessComp = ownerChar.GetCompartmentAccessComponent();
34 if (!userCompAccessComp || !targetCompAccessComp)
37 IEntity userVeh = userCompAccessComp.GetVehicleIn(userChar);
38 IEntity targetVeh = targetCompAccessComp.GetVehicleIn(ownerChar);
42 return CanBePerformedScript(user);
45 if (userVeh && targetVeh && targetVeh == userVeh)
46 return CanBePerformedScript(user);
52 override bool CanBePerformedScript(IEntity user)
54 ChimeraCharacter
char = ChimeraCharacter.Cast(
GetOwner());
59 CharacterControllerComponent controller =
char.GetCharacterController();
65 array<BaseInfoDisplay> infoDisplays = {};
68 if (!playerController)
71 HUDManagerComponent hudMan = playerController.GetHUDManagerComponent();
75 hudMan.GetInfoDisplays(infoDisplays);
80 if (!casualtyInspectDisplay)
83 if (casualtyInspectDisplay.IsActive() && casualtyInspectDisplay.m_Target ==
GetOwner())
91 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
93 array<BaseInfoDisplay> infoDisplays = {};
94 GetGame().GetPlayerController().GetHUDManagerComponent().GetInfoDisplays(infoDisplays);
98 if (!casualtyInspectDisplay)
101 casualtyInspectDisplay.SetTarget(pOwnerEntity);
102 casualtyInspectDisplay.ShowInspectCasualtyWidget(pOwnerEntity);
108 override void OnActionStart(IEntity pUserEntity)
110 ChimeraCharacter
char = ChimeraCharacter.Cast(pUserEntity);
114 CharacterControllerComponent contr =
char.GetCharacterController();
118 if (contr.CanPartialLower() && !contr.IsPartiallyLowered())
119 contr.SetPartialLower(
true);
124 override bool HasLocalEffectOnlyScript()
131 override bool CanBroadcastScript()