Deliver local sighting handoffs and preserve unsubmitted resupply attempts
This commit is contained in:
@@ -17,6 +17,10 @@ modded class ERR_GameMode
|
||||
protected bool m_ERRTestRadioNetwork;
|
||||
protected bool m_ERRTestHQResponse;
|
||||
protected bool m_ERRTestHQMemory;
|
||||
protected bool m_ERRTestLocalHandoff;
|
||||
protected ref ERR_NativeLocalHandoffProbe m_ERRLocalHandoff;
|
||||
protected ERR_PlayerLife m_ERRLocalHandoffLife;
|
||||
protected SCR_PlayerController m_ERRLocalHandoffController;
|
||||
protected bool m_ERRTestHQBody;
|
||||
protected ref ERR_NativeHQBodyProbe m_ERRHQBodyProbe;
|
||||
protected bool m_ERRTestInfantryTransfer;
|
||||
@@ -63,6 +67,7 @@ modded class ERR_GameMode
|
||||
m_ERRTestRadioNetwork = outcome == "radio-network";
|
||||
m_ERRTestHQResponse = outcome == "hq-response";
|
||||
m_ERRTestHQMemory = outcome == "hq-memory";
|
||||
m_ERRTestLocalHandoff = outcome == "hq-local-handoff";
|
||||
m_ERRTestHQBody = outcome == "hq-body";
|
||||
m_ERRTestInfantryTransfer = outcome == "infantry-transfer";
|
||||
m_ERRTestConvoy = outcome == "convoy";
|
||||
@@ -79,7 +84,9 @@ modded class ERR_GameMode
|
||||
m_ERRTestMortarTransfer = outcome == "mortar-transfer";
|
||||
m_ERRTestPatrolHQ = outcome == "patrol-hq";
|
||||
m_ERRTestPlayerDeath = outcome == "player-death" || m_ERRTestRadioNetwork || m_ERRTestHQResponse || m_ERRTestMortar || m_ERRTestHQMemory || m_ERRTestHQBody || m_ERRTestConvoy || m_ERRTestInfantryTransfer;
|
||||
if (m_ERRTestLocalHandoff) m_ERRTestPlayerDeath = true;
|
||||
m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 150000;
|
||||
if (m_ERRTestLocalHandoff) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 240000;
|
||||
if (m_ERRTestConvoy) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 540000;
|
||||
if (ERR_NativeConvoyCoverProbe.Enabled()) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 840000;
|
||||
if (m_ERRTestHQMemory) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 360000;
|
||||
@@ -517,6 +524,18 @@ modded class ERR_GameMode
|
||||
m_ERRSmokeStep = 110;
|
||||
return;
|
||||
}
|
||||
if (m_ERRTestLocalHandoff)
|
||||
{
|
||||
m_ERRLocalHandoffController = SCR_PlayerController.Cast(GetGame().GetPlayerController());
|
||||
m_ERRLocalHandoffLife = Players().CurrentActor(m_ERRSmokePlayer);
|
||||
if (!ERR_Check(m_ERRLocalHandoffController && m_ERRLocalHandoffLife && m_ERRLocalHandoffController.GetControlledEntity() == m_ERRSmokePlayer, "local handoff retains original canonical prisoner")) return;
|
||||
DamageManagerComponent protection = DamageManagerComponent.Cast(m_ERRSmokePlayer.FindComponent(DamageManagerComponent));
|
||||
if (!ERR_Check(protection != null, "local handoff original prisoner damage component exists")) return;
|
||||
protection.EnableDamageHandling(false);
|
||||
m_ERRLocalHandoff = new ERR_NativeLocalHandoffProbe(this);
|
||||
OnStop().Insert(m_ERRLocalHandoff.Stop);
|
||||
m_ERRSmokeStep = 109; return;
|
||||
}
|
||||
if (m_ERRTestInfantryTransfer)
|
||||
{
|
||||
DamageManagerComponent.Cast(m_ERRSmokePlayer.FindComponent(DamageManagerComponent)).EnableDamageHandling(false);
|
||||
@@ -718,6 +737,21 @@ modded class ERR_GameMode
|
||||
damage.Kill(Instigator.CreateInstigator(m_ERRSmokePlayer));
|
||||
m_ERRSmokeWait = now + 4000;
|
||||
}
|
||||
else if (m_ERRSmokeStep == 109)
|
||||
{
|
||||
int result = m_ERRLocalHandoff.Tick(ERR_HQ.Cast(Command()), now);
|
||||
if (result == 0) return;
|
||||
m_ERRLocalHandoff.Stop();
|
||||
if (!ERR_Check(result == 1, "arranged immutable report, actual local handoff/radio delivery and interrupted recipient radio")) return;
|
||||
if (!ERR_Check(m_ERRSmokePlayer && m_ERRLocalHandoffLife && m_ERRLocalHandoffController && m_ERRLocalHandoffController == GetGame().GetPlayerController(), "local handoff final original controller and body retained")) return;
|
||||
if (!ERR_Check(Players().CurrentActor(m_ERRSmokePlayer) == m_ERRLocalHandoffLife && m_ERRLocalHandoffController.GetControlledEntity() == m_ERRSmokePlayer, "local handoff final prisoner identity unchanged")) return;
|
||||
m_ERRSmokeStep = 9;
|
||||
SCR_CharacterDamageManagerComponent damage;
|
||||
damage = SCR_CharacterDamageManagerComponent.Cast(m_ERRSmokePlayer.FindComponent(SCR_CharacterDamageManagerComponent));
|
||||
if (!ERR_Check(damage != null, "local handoff final original prisoner damage component retained")) return;
|
||||
damage.EnableDamageHandling(true); damage.Kill(Instigator.CreateInstigator(m_ERRSmokePlayer));
|
||||
m_ERRSmokeWait = now + 4000;
|
||||
}
|
||||
else if (m_ERRSmokeStep == 108)
|
||||
{
|
||||
int result = m_ERRInfantryTransfer.Tick(ERR_HQ.Cast(Command()), now);
|
||||
|
||||
Reference in New Issue
Block a user