Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ ACE_Captives_SurrenderHelperCompartment : "{0D226790BE615DC7}Prefabs/Helpers/ACE
}
}
}
m_eLifeStateChangedGetOutType TELEPORT
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ ACE_Captives_TiedHelperCompartment : "{0D226790BE615DC7}Prefabs/Helpers/ACE_Anim
}
}
}
m_eLifeStateChangedGetOutType TELEPORT
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ACE_Captives_ToggleEntityContextAction : SCR_SelectedEntitiesContextAction

ACE_AnimationHelperCompartment helper = ACE_AnimationHelperCompartment.Cast(char.GetParent());
if (helper && m_eAnimationHelperID)
helper.Terminate(EGetOutType.ANIMATED);
helper.Terminate();
else
ACE_AnimationTools.AnimateWithHelperCompartment(m_eAnimationHelperID, char);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ ACE_Carrying_HelperCompartment : "{0D226790BE615DC7}Prefabs/Helpers/ACE_Animatio
}
SCR_BaseCompartmentManagerComponent "{2CD4A765A7D52986}" {
CompartmentSlots {
CargoCompartmentSlot Carried {
PassengerPositionInfo EntitySlotInfo s1 {
Offset -0.1 -0.6 0.05
CargoCompartmentSlot Performer {
OverrideEntryPositionInfo PointInfo "{670E0D3DB86D5304}" {
}
ForcedFreeLook 1
SeatType 1
OverrideEntryPositionInfo PointInfo "{61D2CA8A14132241}" {
}
OverrideExitPositionInfo PointInfo "{61D2CA8A18570AAB}" {
OverrideExitPositionInfo PointInfo "{670E0D3DB3C80C6C}" {
}
}
}
Expand All @@ -35,5 +30,5 @@ ACE_Carrying_HelperCompartment : "{0D226790BE615DC7}Prefabs/Helpers/ACE_Animatio
}
}
}
m_eID NONE
m_bForceRagdollOnTermination 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ ACE_Carrying_HelperCompartment : "{FF78613C1DAFF28F}Prefabs/Helpers/ACE_Carrying
}
}
}
m_eID CARRIED
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ ACE_Carrying_HelperCompartment : "{FF78613C1DAFF28F}Prefabs/Helpers/ACE_Carrying
}
}
}
m_eID DRAGGED
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ACE_CarriableAnimationHelperComponent : ACE_CarriableEntityComponent
charCtrl.ACE_SetCarrier(null);

if (m_bTerminateWhenReleased && !m_bHasParentTerminated)
m_pOwner.Terminate(EGetOutType.ANIMATED);
m_pOwner.Terminate();
}

//------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class ACE_AnimationTools
}

//------------------------------------------------------------------------------------------------
static void TerminateHelperCompartment(notnull IEntity performer, EGetOutType getOutType = EGetOutType.ANIMATED)
static void TerminateHelperCompartment(notnull IEntity performer)
{
ACE_AnimationHelperCompartment helper = GetHelperCompartment(performer);
if (helper)
helper.Terminate(getOutType);
helper.Terminate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class ACE_AnimationHelperCompartmentClass : GenericEntityClass
//! --- To Do: Create derived classes of this for carrying and CPR
class ACE_AnimationHelperCompartment : GenericEntity
{
[Attribute(defvalue: "ANIMATED", uiwidget: UIWidgets.SearchComboBox, desc: "Get out type when life state has changed", enums: ParamEnumArray.FromEnum(EGetOutType))]
protected EGetOutType m_eLifeStateChangedGetOutType;
[Attribute(defvalue: "false", desc: "Whether performer should always enter ragdoll when terminating the helper compartment")]
protected bool m_bForceRagdollOnTermination;

[RplProp(onRplName: "OnPerformerChanged")]
protected RplId m_iPerformerID;
Expand Down Expand Up @@ -84,11 +84,11 @@ class ACE_AnimationHelperCompartment : GenericEntity

//------------------------------------------------------------------------------------------------
//! Terminates animation
void Terminate(EGetOutType getOutType = EGetOutType.ANIMATED)
void Terminate()
{
// Reschedule termination when init is not yet done, for instance, when called before the character is moving in
if (!m_bInitDone)
GetGame().GetCallqueue().CallLater(Terminate, 100, false, getOutType);
GetGame().GetCallqueue().CallLater(Terminate, 100);

if (!m_pPerformer)
{
Expand All @@ -103,7 +103,7 @@ class ACE_AnimationHelperCompartment : GenericEntity
return;
}

if (getOutType == EGetOutType.ANIMATED)
if (!m_bForceRagdollOnTermination && m_pPerformer.GetCharacterController().GetLifeState() == ECharacterLifeState.ALIVE)
compartmentAccess.ACE_GetOutVehicle(EGetOutType.ANIMATED, -1, ECloseDoorAfterActions.INVALID, false);
else
EjectPerformer();
Expand All @@ -122,10 +122,7 @@ class ACE_AnimationHelperCompartment : GenericEntity

vector transform[4];
GetWorldTransform(transform);
vector pos;
SCR_WorldTools.FindEmptyTerrainPosition(pos, transform[3], SEARCH_POS_RADIUS_M);
transform[3] = pos;
compartmentAccess.ACE_MoveOutVehicle(transform);
compartmentAccess.ACE_MoveOutVehicle(transform, true);

// Broadcast teleport on network
RplComponent performerRpl = RplComponent.Cast(m_pPerformer.FindComponent(RplComponent));
Expand All @@ -150,7 +147,7 @@ class ACE_AnimationHelperCompartment : GenericEntity
//! Terminate when performer gets incapacitated or dies
protected void OnPerformerLifeStateChanged(ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
{
Terminate(m_eLifeStateChangedGetOutType);
Terminate();
}

//------------------------------------------------------------------------------------------------
Expand Down