8 protected float m_fExtraTimePerService;
13 protected override SCR_Faction EvaluateEntityFaction(IEntity ent)
18 SCR_Faction faction = super.EvaluateEntityFaction(ent);
29 if (faction.IsPlayable() && !
m_Base.IsHQRadioTrafficPossible(cFaction))
38 if (!m_fSeizingStartTimestamp)
45 array<SCR_EServicePointType> checkedTypes = {
62 float seizingTimeVar = m_fMaximumSeizingTime - m_fMinimumSeizingTime;
65 if (m_iMaximumSeizingCharacters > 1)
67 float deductPerPlayer = seizingTimeVar / (m_iMaximumSeizingCharacters - 1);
68 deduct = deductPerPlayer * (m_iSeizingCharacters - 1);
71 float servicesMultiplier = 1;
73 if ((m_fMaximumSeizingTime - m_fMinimumSeizingTime) > 0)
74 servicesMultiplier = 1 + (servicesCount * (m_fExtraTimePerService / (m_fMaximumSeizingTime - m_fMinimumSeizingTime)));
76 m_fSeizingEndTimestamp = m_fSeizingStartTimestamp.PlusSeconds(servicesMultiplier * (m_fMaximumSeizingTime - deduct));
79 WorldTimestamp currentTime = world.GetServerTimestamp();
82 if (m_fSeizingEndTimestamp.LessEqual(currentTime))
85 if (m_bGradualTimerReset && m_fInterruptedCaptureDuration != 0)
89 OnSeizingTimestampChanged();
111 super.OnBaseRegistered(base);
118 base.UnregisterLogicComponent(
this);
121 if (!campaignBase || campaignBase.IsHQ())