Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SeizingComponent.c
Go to the documentation of this file.
2{
3 [Attribute("{59A6F1EBC6C64F79}Prefabs/Logic/SeizingTrigger.et", UIWidgets.ResourceNamePicker, "", "et")]
6 //------------------------------------------------------------------------------------------------
9 {
10 return m_sTriggerPrefab;
11 }
12}
13
14void OnTimerChangeFn(WorldTimestamp newStart, WorldTimestamp newEnd);
16typedef ScriptInvokerBase<OnTimerChangeFn> OnTimerChangeInvoker;
17
18class SCR_SeizingComponent : SCR_MilitaryBaseLogicComponent
19{
20 [Attribute("100")]
21 protected int m_iRadius;
22
23 [Attribute("7", desc: "Units in a vehicle (most probably aircraft) above this altitude will be ignored.")]
24 protected int m_iMaximumAltitude;
25
26 [Attribute("10")]
27 protected float m_fMaximumSeizingTime;
28
29 [Attribute("6")]
30 protected float m_fMinimumSeizingTime;
31
32 [Attribute("5", "How many characters need to be seizing at once to achieve the minimum seizing time.")]
34
35 [Attribute("0", desc: "How long after respawn is player able to start seizing or defending.")]
36 protected float m_fRespawnCooldownPeriod;
37
38 [Attribute("0", desc: "When checked, the seizing timer will decrease gradually when the seizing is interrupted.")]
39 protected bool m_bGradualTimerReset;
40
41 [Attribute("0", desc: "Allow seizing for playable factions only.")]
43
44 [Attribute("0", desc: "Allow defending for playable factions only.")]
46
47 [Attribute("0", desc: "If enabled, at least one player has to be present in the capture area to progress.")]
49
50 [Attribute("1")]
51 protected bool m_bShowNotifications;
52
53 [Attribute(ENotification.AREA_SEIZING_DONE_FRIENDLIES.ToString(), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ENotification))]
55
56 [Attribute(ENotification.AREA_SEIZING_DONE_ENEMIES.ToString(), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ENotification))]
58
59 [RplProp(onRplName: "OnSeizingTimestampChanged")]
61
62 [RplProp(onRplName: "OnSeizingTimestampChanged")]
64
65 protected static const float TRIGGER_CHECK_PERIOD_IDLE = 3;
66 protected static const float TRIGGER_CHECK_PERIOD_ACTIVE = 1;
67
72
74 protected float m_fCurrentSeizingTime;
78 protected BaseGameTriggerEntity m_Trigger;
79 protected bool m_bQueryFinished = true;
80 protected bool m_bEnabled = true;
81 protected RplComponent m_RplComponent;
82 protected bool m_bCharacterPresent;
84 protected int m_iSeizingCharacters;
86 protected bool m_bDeleteDisabledAIs = false;
87
88 //------------------------------------------------------------------------------------------------
89 protected bool IsProxy()
90 {
91 return (m_RplComponent && m_RplComponent.IsProxy());
92 }
93
94 //------------------------------------------------------------------------------------------------
97 {
98 return m_iRadius;
99 }
100
101 //------------------------------------------------------------------------------------------------
103 {
104 return m_iMaximumAltitude;
105 }
106
107 //------------------------------------------------------------------------------------------------
110 void AllowNotifications(bool allow)
111 {
112 m_bShowNotifications = allow;
113 }
114
115 //------------------------------------------------------------------------------------------------
119 {
121 }
122
123 //------------------------------------------------------------------------------------------------
132
133 //------------------------------------------------------------------------------------------------
142
143 //------------------------------------------------------------------------------------------------
152
153 //------------------------------------------------------------------------------------------------
162
163 //------------------------------------------------------------------------------------------------
165 {
166 float delay;
167
168 // Switch to idle mode when nobody is in the area
169 // Evaluation for all bases should not be done at once, randomize the timer a bit
172 else
174
175 GetGame().GetCallqueue().CallLater(EvaluatePrevailingFaction, delay * 1000);
176
177 if (!m_bQueryFinished)
178 return;
179
180 m_Trigger.GetOnQueryFinished().Insert(OnQueryFinished);
181 m_Trigger.QueryEntitiesInside();
182 m_bQueryFinished = false;
183 }
184
185 //------------------------------------------------------------------------------------------------
186 protected void OnQueryFinished(BaseGameTriggerEntity trigger)
187 {
188 m_bQueryFinished = true;
189
190 array<IEntity> presentEntities = {};
191 int presentEntitiesCount = m_Trigger.GetEntitiesInside(presentEntities);
192 m_bCharacterPresent = presentEntitiesCount != 0;
193
194 // Nobody is here, no need to evaluate
196 {
198 {
200 m_PrevailingFaction = null;
202 }
203
204 return;
205 }
206
207 map<SCR_Faction, int> factionsPresence = new map<SCR_Faction, int>();
208 map<SCR_Faction, bool> factionsPlayerPresence = new map<SCR_Faction, bool>();
209 SCR_Faction evaluatedEntityFaction;
210 int factionCount;
211 PlayerManager playerManager = GetGame().GetPlayerManager();
212
213 // Go through all entities and check their factions
214 for (int i = 0; i < presentEntitiesCount; i++)
215 {
216 IEntity entity = presentEntities[i];
217
218 if (m_bDeleteDisabledAIs && IsDisabledAI(entity))
219 {
220 RplComponent.DeleteRplEntity(entity, false);
221 continue;
222 }
223
224 evaluatedEntityFaction = EvaluateEntityFaction(presentEntities[i]);
225
226 if (!evaluatedEntityFaction)
227 continue;
228
229 factionCount = factionsPresence.Get(evaluatedEntityFaction);
230
231 // If faction is not yet registered, do it now - otherwise just increase its presence counter
232 if (factionCount == 0)
233 factionsPresence.Insert(evaluatedEntityFaction, 1);
234 else
235 factionsPresence.Set(evaluatedEntityFaction, factionCount + 1);
236
237 // Check if there are some players present in case they are required
238 if (m_bCapturingRequiresPlayer && playerManager.GetPlayerIdFromControlledEntity(entity) != 0)
239 factionsPlayerPresence.Set(evaluatedEntityFaction, true);
240 }
241
242 m_bDeleteDisabledAIs = false;
243 SCR_Faction prevailingFaction;
244 int highestAttackingPresence;
245 int highestDefendingPresence;
246 int curSeizingCharacters;
247
248 // Evaluate the highest attacking presence
249 foreach (SCR_Faction faction, int presence : factionsPresence)
250 {
251 // Non-playable attackers are not allowed
253 continue;
254
255 // In case players are required but are not present, ignore this faction for attacking
256 if (m_bCapturingRequiresPlayer && !factionsPlayerPresence.Get(faction))
257 continue;
258
259 if (presence > highestAttackingPresence)
260 {
261 highestAttackingPresence = presence;
262 prevailingFaction = faction;
263 }
264 else if (presence == highestAttackingPresence) // When 2 or more factions have the same presence, none should prevail
265 {
266 prevailingFaction = null;
267 }
268 }
269
270 // Evaluate the highest defending presence
271 if (prevailingFaction)
272 {
273 foreach (SCR_Faction faction, int presence : factionsPresence)
274 {
275 // Non-playable defenders are not allowed
277 continue;
278
279 // This faction is already considered attacking
280 if (faction == prevailingFaction)
281 continue;
282
283 highestDefendingPresence = Math.Max(presence, highestDefendingPresence);
284 }
285
286 // Get net amount of players effectively seizing (clamp for max attackers attribute)
287 if (prevailingFaction && highestAttackingPresence > highestDefendingPresence)
288 {
289 curSeizingCharacters = Math.Min(highestAttackingPresence - highestDefendingPresence, m_iMaximumSeizingCharacters);
290 }
291 else
292 {
293 prevailingFaction = null;
294 curSeizingCharacters = 0;
295 }
296 }
297
298 if (prevailingFaction != m_PrevailingFaction)
299 {
300 m_iSeizingCharacters = curSeizingCharacters;
302 m_PrevailingFaction = prevailingFaction;
304 }
305 else if (prevailingFaction && curSeizingCharacters != m_iSeizingCharacters)
306 {
307 m_iSeizingCharacters = curSeizingCharacters;
309 }
310 }
311
312 //------------------------------------------------------------------------------------------------
314 {
315 SCR_ChimeraCharacter char = SCR_ChimeraCharacter.Cast(ent);
316 if (!char)
317 return null;
318
319 if (char.IsInVehicle() && SCR_TerrainHelper.GetHeightAboveTerrain(char.GetOrigin()) > m_iMaximumAltitude)
320 return null;
321
322 CharacterControllerComponent charControl = char.GetCharacterController();
323
324 if (charControl && charControl.GetLifeState() != ECharacterLifeState.ALIVE)
325 return null;
326
327 int playerId = GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(ent);
328 if (!playerId && charControl)
329 {
330 AIControlComponent ctrComp = charControl.GetAIControlComponent();
331 if (ctrComp)
332 {
333 AIAgent ai = ctrComp.GetAIAgent();
334 if (ai && ai.GetLOD() == AIAgent.GetMaxLOD())
335 {
336 return null;
337 }
338 }
339 }
340
341 // Handle after-respawn cooldown
343 {
344
345 if (playerId != 0 && m_mSpawnTimers.Contains(playerId))
346 {
347 ChimeraWorld world = GetOwner().GetWorld();
348 if (m_mSpawnTimers.Get(playerId).Greater(world.GetServerTimestamp()))
349 return null;
350 else
351 m_mSpawnTimers.Remove(playerId)
352 }
353 }
354
355 SCR_Faction entityFaction = SCR_Faction.Cast(char.GetFaction());
356
357 return entityFaction;
358 }
359
360 //------------------------------------------------------------------------------------------------
362 {
363 if (!m_PrevailingFaction || m_FactionControl.GetAffiliatedFaction() == m_PrevailingFaction)
364 {
365 if (m_fSeizingEndTimestamp != 0)
366 {
367 ChimeraWorld world = GetOwner().GetWorld();
368 m_fInterruptedCaptureTimestamp = world.GetServerTimestamp();
372 int factionIndex = GetGame().GetFactionManager().GetFactionIndex(m_PrevailingFactionPrevious);
373 Rpc(RpcDo_OnCaptureInterrupt, factionIndex);
374 RpcDo_OnCaptureInterrupt(factionIndex);
375 }
376 }
377 else
378 {
379 ChimeraWorld world = GetOwner().GetWorld();
380 m_fSeizingStartTimestamp = world.GetServerTimestamp();
382 int factionIndex = GetGame().GetFactionManager().GetFactionIndex(m_PrevailingFaction);
383 Rpc(RpcDo_OnCaptureStart, factionIndex);
384 RpcDo_OnCaptureStart(factionIndex);
385 }
386
388 Replication.BumpMe();
389 }
390
391 //------------------------------------------------------------------------------------------------
393 {
394 if (m_OnTimerChange)
396
397 if (IsProxy())
398 return;
399
400 // Run EOnFrame only if timer is actually ticking
402 ClearEventMask(GetOwner(), EntityEvent.FRAME);
403 else
404 SetEventMask(GetOwner(), EntityEvent.FRAME);
405 }
406
407 //------------------------------------------------------------------------------------------------
410 {
411 float seizingTimeVar = m_fMaximumSeizingTime - m_fMinimumSeizingTime;
412 float deduct;
413
414 if (m_iMaximumSeizingCharacters > 1) // Avoid division by 0
415 {
416 float deductPerPlayer = seizingTimeVar / (m_iMaximumSeizingCharacters - 1);
417 deduct = deductPerPlayer * (m_iSeizingCharacters - 1);
418 }
419
421
424
425 Replication.BumpMe();
427 }
428
429 //------------------------------------------------------------------------------------------------
431 protected void HandleGradualReset()
432 {
433 float timeSinceInterrupt = m_fSeizingStartTimestamp.DiffMilliseconds(m_fInterruptedCaptureTimestamp);
434
435 if (timeSinceInterrupt < m_fInterruptedCaptureDuration)
436 {
437 float diff = m_fInterruptedCaptureDuration - timeSinceInterrupt;
438 m_fSeizingStartTimestamp = m_fSeizingStartTimestamp.PlusMilliseconds(-diff);
439 m_fSeizingEndTimestamp = m_fSeizingEndTimestamp.PlusMilliseconds(-diff);
440 }
441
444 }
445
446 //------------------------------------------------------------------------------------------------
452
453 //------------------------------------------------------------------------------------------------
459
460 //------------------------------------------------------------------------------------------------
461 [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
462 protected void RpcDo_OnCaptureStart(int factionIndex)
463 {
464 FactionManager factionManager = GetGame().GetFactionManager();
465
466 if (!factionManager)
467 return;
468
469 SCR_Faction faction = SCR_Faction.Cast(factionManager.GetFactionByIndex(factionIndex));
470
471 if (!faction)
472 return;
473
475 m_OnCaptureStart.Invoke(faction, this);
476 }
477
478 //------------------------------------------------------------------------------------------------
479 [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
480 protected void RpcDo_OnCaptureInterrupt(int factionIndex)
481 {
482 FactionManager factionManager = GetGame().GetFactionManager();
483
484 if (!factionManager)
485 return;
486
487 SCR_Faction faction = SCR_Faction.Cast(factionManager.GetFactionByIndex(factionIndex));
488
489 if (!faction)
490 return;
491
493 m_OnCaptureInterrupt.Invoke(faction, this);
494 }
495
496 //------------------------------------------------------------------------------------------------
497 [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
498 protected void RpcDo_OnCaptureFinish(int factionIndex)
499 {
501 FactionManager factionManager = GetGame().GetFactionManager();
502
503 if (!factionManager)
504 return;
505
506 SCR_Faction faction = SCR_Faction.Cast(factionManager.GetFactionByIndex(factionIndex));
507
508 if (!faction)
509 return;
510
512 m_OnCaptureFinish.Invoke(faction, this);
513
514 UpdateFlagsInHierarchy(faction);
515
517 NotifyPlayerInRadius(faction);
518
519 if (!IsProxy())
520 {
521 if (m_FactionControl.GetAffiliatedFaction() != faction)
522 m_FactionControl.SetAffiliatedFaction(faction);
523 }
524 }
525
526 //------------------------------------------------------------------------------------------------
527 protected void OnPlayerSpawned(int playerId, IEntity controlledEntity)
528 {
529 if (!controlledEntity)
530 return;
531
532 // Player did not spawn in the area, ignore them
533 if (vector.DistanceSqXZ(controlledEntity.GetOrigin(), GetOwner().GetOrigin()) > (m_iRadius * m_iRadius))
534 return;
535
536 ChimeraWorld world = GetOwner().GetWorld();
537 m_mSpawnTimers.Set(playerId, world.GetServerTimestamp().PlusSeconds(m_fRespawnCooldownPeriod));
538 }
539
540 //------------------------------------------------------------------------------------------------
541 protected void UpdateFlagsInHierarchy(notnull SCR_Faction faction)
542 {
543 array<IEntity> queue = {GetOwner()};
544 SCR_FlagComponent flag;
545 IEntity processedEntity;
546 IEntity nextInHierarchy;
547
548 while (!queue.IsEmpty())
549 {
550 processedEntity = queue[0];
551 queue.Remove(0);
552
553 flag = SCR_FlagComponent.Cast(processedEntity.FindComponent(SCR_FlagComponent));
554 if (flag)
555 flag.ChangeMaterial(faction.GetFactionFlagMaterial());
556
557 nextInHierarchy = processedEntity.GetChildren();
558
559 while (nextInHierarchy)
560 {
561 queue.Insert(nextInHierarchy);
562 nextInHierarchy = nextInHierarchy.GetSibling();
563 }
564 }
565 }
566
567 //------------------------------------------------------------------------------------------------
568 protected bool GetIsLocalPlayerPresent()
569 {
570 IEntity player = GetGame().GetPlayerManager().GetPlayerControlledEntity(SCR_PlayerController.GetLocalPlayerId());
571 if (!player)
572 return false;
573
574 return (vector.DistanceSqXZ(player.GetOrigin(), GetOwner().GetOrigin()) <= (m_iRadius * m_iRadius));
575 }
576
577 //------------------------------------------------------------------------------------------------
578 protected void NotifyPlayerInRadius(notnull SCR_Faction faction)
579 {
580 Faction playerFaction = SCR_FactionManager.SGetLocalPlayerFaction();
581 if (!playerFaction)
582 return;
583
585 return;
586
587 if (playerFaction == faction)
588 SCR_NotificationsComponent.SendLocal(m_eCapturedByFriendliesNotification);
589 else
590 SCR_NotificationsComponent.SendLocal(m_eCapturedByEnemiesNotification);
591 }
592
593 //------------------------------------------------------------------------------------------------
596 {
598 return m_FactionControl.GetAffiliatedFaction();
599 else
600 return null;
601 }
602
603 //------------------------------------------------------------------------------------------------
604 override void OnBaseFactionChanged(Faction faction)
605 {
606 super.OnBaseFactionChanged(faction);
607 m_PrevailingFaction = null;
608 }
609 //------------------------------------------------------------------------------------------------
611 {
612
613 SCR_ChimeraCharacter char = SCR_ChimeraCharacter.Cast(ent);
614 if (!char)
615 return false;
616
617 CharacterControllerComponent charControl = char.GetCharacterController();
618 if (!charControl)
619 return false;
620
621 if (charControl.GetLifeState() == ECharacterLifeState.DEAD)
622 return false;
623
624 int playerId = GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(ent);
625 if (playerId)
626 return false;
627
628 AIControlComponent ctrComp = charControl.GetAIControlComponent();
629 if (!ctrComp)
630 return false;
631
632 if (ctrComp.IsAIActivated())
633 return false;
634 return true;
635
636 }
637 //------------------------------------------------------------------------------------------------
639 void Disable()
640 {
641 m_bEnabled = false;
642
643 if (m_Trigger)
644 delete m_Trigger;
645
646 ClearEventMask(GetOwner(), EntityEvent.FRAME);
647
648 foreach (SCR_MilitaryBaseComponent base : m_aBases)
649 {
650 if (!base)
651 continue;
652
653 base.UnregisterLogicComponent(this);
654 }
655
657
658 if (gameMode)
659 gameMode.GetOnPlayerSpawned().Remove(OnPlayerSpawned);
660
661 GetGame().GetCallqueue().Remove(EvaluatePrevailingFaction);
662 }
663
664 //------------------------------------------------------------------------------------------------
665 override void OnPostInit(IEntity owner)
666 {
667 super.OnPostInit(owner);
668
669 m_RplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
670
671 // All functionality is server-side
672 if (IsProxy())
673 return;
674
675 if (!m_bEnabled)
676 return;
677
678 // Attributes check
679 if (m_iRadius <= 0)
680 {
681 Print("SCR_SeizingComponent: Invalid area radius (" + m_iRadius + ")! Terminating...", LogLevel.ERROR);
682 return;
683 }
684
686 {
687 Print("SCR_SeizingComponent: Invalid seizing time setting (" + m_fMinimumSeizingTime + ", " + m_fMaximumSeizingTime + ")! Terminating...", LogLevel.ERROR);
688 return;
689 }
690
692 {
693 Print("SCR_SeizingComponent: Invalid maximum seizing characters (" + m_iMaximumSeizingCharacters + ")! Terminating...", LogLevel.ERROR);
694 return;
695 }
696
697 if (!GetGame().InPlayMode())
698 return;
699
701 if (!componentData)
702 return;
703
705 if (!m_FactionControl)
706 {
707 Print("SCR_SeizingComponent: Owner is missing SCR_FactionAffiliationComponent! Terminating...", LogLevel.ERROR);
708 return;
709 }
710
711 Resource triggerResource = Resource.Load(componentData.GetTriggerPrefab());
712 if (!triggerResource)
713 {
714 Print("SCR_SeizingComponent: Trigger resource failed to load! Terminating...", LogLevel.ERROR);
715 return;
716 }
717
718 // Spawn the trigger locally on server
719 m_Trigger = BaseGameTriggerEntity.Cast(GetGame().SpawnEntityPrefabLocal(triggerResource, GetGame().GetWorld()));
720 if (!m_Trigger)
721 {
722 Print("SCR_SeizingComponent: Trigger failed to spawn! Terminating...", LogLevel.ERROR);
723 return;
724 }
725
726 m_Trigger.SetSphereRadius(m_iRadius);
727 owner.AddChild(m_Trigger, -1);
728
729 // Register after-respawn cooldown method
731 {
733
734 if (gameMode)
735 gameMode.GetOnPlayerSpawned().Insert(OnPlayerSpawned);
736 }
737
738 GetGame().GetCallqueue().CallLater(EvaluatePrevailingFaction, Math.RandomFloatInclusive(TRIGGER_CHECK_PERIOD_IDLE, TRIGGER_CHECK_PERIOD_IDLE + (TRIGGER_CHECK_PERIOD_IDLE * 0.2)) * 1000);
739 }
740
741 //------------------------------------------------------------------------------------------------
742 override void EOnFrame(IEntity owner, float timeSlice)
743 {
744 if (m_fSeizingEndTimestamp == 0)
745 return;
746
747 ChimeraWorld world = owner.GetWorld();
748 if (world.GetServerTimestamp().Less(m_fSeizingEndTimestamp))
749 return;
750
754
755 Replication.BumpMe();
756
757 if (m_FactionControl.GetAffiliatedFaction() != m_PrevailingFaction)
758 {
759 int factionIndex = GetGame().GetFactionManager().GetFactionIndex(m_PrevailingFaction);
760 Rpc(RpcDo_OnCaptureFinish, factionIndex);
761 RpcDo_OnCaptureFinish(factionIndex);
762 }
763 else
764 {
765 int factionIndex = GetGame().GetFactionManager().GetFactionIndex(m_PrevailingFactionPrevious);
766 Rpc(RpcDo_OnCaptureInterrupt, factionIndex);
767 RpcDo_OnCaptureInterrupt(factionIndex);
768 }
769 }
770
771 //------------------------------------------------------------------------------------------------
772 // destructor
774 {
775 if (m_Trigger)
776 delete m_Trigger;
777
779 if (gameMode)
780 gameMode.GetOnPlayerSpawned().Remove(OnPlayerSpawned);
781
782 GetGame().GetCallqueue().Remove(EvaluatePrevailingFaction);
783 }
784}
ENotification
ArmaReforgerScripted GetGame()
Definition game.c:1398
vector GetOrigin()
SCR_BaseGameMode GetGameMode()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
SCR_CharacterSoundComponentClass GetComponentData()
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_MilitaryBaseLogicComponentClass m_aBases
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
func OnTimerChangeFn
ScriptInvokerBase< OnTimerChangeFn > OnTimerChangeInvoker
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
proto external int AddChild(notnull IEntity child, TNodeId pivot, EAddChildFlags flags=EAddChildFlags.AUTO_TRANSFORM)
Add Entity to hierarchy. Pivot is pivot index, or -1 for center of parent.
proto external IEntity GetChildren()
proto external BaseWorld GetWorld()
proto external IEntity GetSibling()
Definition Math.c:13
Main replication API.
Definition Replication.c:14
Object holding reference to resource. In destructor release the resource.
Definition Resource.c:25
ScriptInvokerBase< SCR_BaseGameMode_PlayerIdAndEntity > GetOnPlayerSpawned()
bool IsPlayable()
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
ENotification m_eCapturedByEnemiesNotification
ref map< int, WorldTimestamp > m_mSpawnTimers
static const float TRIGGER_CHECK_PERIOD_ACTIVE
override void EOnFrame(IEntity owner, float timeSlice)
WorldTimestamp m_fInterruptedCaptureTimestamp
void HandleGradualReset()
When capture started after getting interrupted, take into account the time spent on it.
void NotifyPlayerInRadius(notnull SCR_Faction faction)
OnTimerChangeInvoker GetOnTimerChange()
WorldTimestamp GetSeizingEndTimestamp()
WorldTimestamp m_fSeizingStartTimestamp
BaseGameTriggerEntity m_Trigger
SCR_Faction m_PrevailingFactionPrevious
void OnPlayerSpawned(int playerId, IEntity controlledEntity)
SCR_FactionAffiliationComponent m_FactionControl
WorldTimestamp m_fSeizingEndTimestamp
static const float TRIGGER_CHECK_PERIOD_IDLE
void AllowNotifications(bool allow)
void RpcDo_OnCaptureInterrupt(int factionIndex)
bool IsDisabledAI(IEntity ent)
void UpdateFlagsInHierarchy(notnull SCR_Faction faction)
override void OnPostInit(IEntity owner)
void OnQueryFinished(BaseGameTriggerEntity trigger)
WorldTimestamp GetSeizingStartTimestamp()
ScriptInvoker GetOnCaptureStart()
ref ScriptInvoker m_OnCaptureInterrupt
void RpcDo_OnCaptureStart(int factionIndex)
ref OnTimerChangeInvoker m_OnTimerChange
ENotification m_eCapturedByFriendliesNotification
ref ScriptInvoker m_OnCaptureStart
void RpcDo_OnCaptureFinish(int factionIndex)
ref ScriptInvoker m_OnCaptureFinish
SCR_Faction EvaluateEntityFaction(IEntity ent)
override void OnBaseFactionChanged(Faction faction)
ScriptInvoker GetOnCaptureFinish()
ScriptInvoker GetOnCaptureInterrupt()
static float GetHeightAboveTerrain(vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
Definition Types.c:486
IEntity GetOwner()
Owner entity of the fuel tank.
ECharacterLifeState
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
Definition EntityEvent.c:14
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition EnNetwork.c:95
RplRcver
Definition RplRcver.c:59
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition RplChannel.c:14
ScriptInvokerBase< func > ScriptInvoker
Definition tools.c:134