Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignFastTravelComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/FastTravel", description: "Handles client > server communication for Fast travel in Conflict. Should be attached to PlayerController.")]
3 {
4  [Attribute("50", params: "0 inf 1")]
5  protected int m_iSupplyCost;
6 
7  [Attribute("100", desc: "Tolerance when player identifies their location in the map (meters)", params: "0 inf 1")]
8  protected int m_iPickupRadius;
9 
10  [Attribute("200", desc: "If there are enemies closer that this distance to the player, the request will fail", params: "0 inf 1")]
11  protected int m_iNoEnemyRadius;
12 
13  //------------------------------------------------------------------------------------------------
15  int GetSupplyCost()
16  {
17  return m_iSupplyCost;
18  }
19 
20  //------------------------------------------------------------------------------------------------
22  int GetPickupRadius()
23  {
24  return m_iPickupRadius;
25  }
26 
27  //------------------------------------------------------------------------------------------------
29  int GetNoEnemyRadius()
30  {
31  return m_iNoEnemyRadius;
32  }
33 }
34 
35 class SCR_CampaignFastTravelComponent : SCR_FastTravelComponent
36 {
37  protected bool m_bSelectionInProgress;
38  protected bool m_bEnemiesNearby;
39 
41 
43 
45 
46  protected ref map<SCR_SelectionMenuEntry, SCR_DeployableSpawnPoint> m_mMenuEntries = new map<SCR_SelectionMenuEntry, SCR_DeployableSpawnPoint>();
47 
48  //------------------------------------------------------------------------------------------------
49  override protected bool ServerSanityCheck(notnull IEntity target)
50  {
51  if (!super.ServerSanityCheck(target))
52  return false;
53 
54  SCR_ChimeraCharacter player = SCR_ChimeraCharacter.Cast(m_PlayerController.GetControlledEntity());
55 
56  if (!player)
57  return false;
58 
59  if (!m_PlayerFaction)
60  m_PlayerFaction = SCR_CampaignFaction.Cast(player.GetFaction());
61 
63 
64  if (!componentData)
65  return false;
66 
67  m_bEnemiesNearby = false;
68  GetGame().GetWorld().QueryEntitiesBySphere(player.GetOrigin(), componentData.GetNoEnemyRadius(), ProcessEntity, FilterEntity, EQueryEntitiesFlags.DYNAMIC | EQueryEntitiesFlags.WITH_OBJECT);
69 
70  if (m_bEnemiesNearby)
71  SCR_NotificationsComponent.SendToPlayer(m_PlayerController.GetPlayerId(), ENotification.FASTTRAVEL_ENEMIES_NEARBY);
72 
73  return !m_bEnemiesNearby;
74  }
75 
76  //------------------------------------------------------------------------------------------------
77  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
78  override protected void RpcAsk_FastTravel(RplId destinationId)
79  {
80  super.RpcAsk_FastTravel(destinationId);
81 
82  SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
83 
84  if (!campaign)
85  return;
86 
87  SCR_CampaignClientData clientData = campaign.GetClientData(m_PlayerController.GetPlayerId());
88 
89  if (!clientData)
90  return;
91 
92  clientData.SetNextFastTravelTimestamp(m_fNextTravelAvailableAt);
93  }
94 
95  //------------------------------------------------------------------------------------------------
96  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
97  protected void RpcAsk_CheckSpawnpointAvailability(RplId spawnpointId)
98  {
100 
101  if (!spawnpoint)
102  return;
103 
104  if (spawnpoint.GetRespawnCount() >= spawnpoint.GetMaxRespawns())
105  return;
106 
107  Rpc(RpcDo_EnableDestination, spawnpointId);
108  }
109 
110  //------------------------------------------------------------------------------------------------
111  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
112  protected void RpcDo_EnableDestination(RplId spawnpointId)
113  {
115 
116  if (!spawnpoint)
117  return;
118 
119  SCR_SelectionMenuEntry entry = m_mMenuEntries.GetKeyByValue(spawnpoint);
120 
121  if (!entry)
122  return;
123 
124  entry.SetName("#AR-MapMarker_DeployedRadio");
125  entry.Enable(true);
126  }
127 
128  //------------------------------------------------------------------------------------------------
130  override protected int GetCooldown()
131  {
132  SCR_CampaignFactionManager fManager = SCR_CampaignFactionManager.Cast(GetGame().GetFactionManager());
133 
134  if (!fManager)
135  return m_iCooldown;
136 
137  IEntity player = m_PlayerController.GetControlledEntity();
138 
139  if (!player)
140  return m_iCooldown;
141 
142  return fManager.GetRankFastTravelCooldown(SCR_CharacterRankComponent.GetCharacterRank(player));
143  }
144 
145  //------------------------------------------------------------------------------------------------
146  protected bool FilterEntity(IEntity ent)
147  {
148  return SCR_ChimeraCharacter.Cast(ent) != null;
149  }
150 
151  //------------------------------------------------------------------------------------------------
152  protected bool ProcessEntity(IEntity ent)
153  {
154  SCR_ChimeraCharacter char = SCR_ChimeraCharacter.Cast(ent);
155  Faction entityFaction = char.GetFaction();
156 
157  if (!entityFaction.IsFactionEnemy(m_PlayerFaction))
158  return true;
159 
160  if (char.GetCharacterController().IsDead())
161  return true;
162 
163  m_bEnemiesNearby = true;
164  return false;
165  }
166 
167  //------------------------------------------------------------------------------------------------
169  void OnMapOpen(MapConfiguration config)
170  {
171  if (!m_MapContextualMenu)
172  m_MapContextualMenu = SCR_MapRadialUI.GetInstance();
173 
174  if (!m_MapContextualMenu)
175  return;
176 
177  m_MapContextualMenu.GetOnMenuInitInvoker().Insert(SetupMapRadialMenuEntries);
178  m_MapContextualMenu.GetOnEntryPerformedInvoker().Insert(OnMapFastTravelRequested);
179  m_MapContextualMenu.GetOnEntrySelectedInvoker().Insert(CenterMapOnDestination);
180 
181  SCR_MapEntity.GetOnMapClose().Insert(OnMapClose);
182  }
183 
184  //------------------------------------------------------------------------------------------------
186  void OnMapClose(MapConfiguration config)
187  {
188  SCR_SpawnPoint.Event_SpawnPointAdded.Remove(OnSpawnpointAdded);
189  SCR_SpawnPoint.Event_SpawnPointRemoved.Remove(OnSpawnpointRemoved);
190 
191  SCR_MapEntity.GetOnSelection().Remove(SendPlayerCoords);
192  SCR_MapEntity.GetOnMapClose().Remove(OnMapClose);
193 
194  GetGame().GetCallqueue().Remove(RefreshShownCooldown);
195 
196  SCR_HintManagerComponent.HideHint();
197 
199  SCR_NotificationsComponent.SendLocal(ENotification.FASTTRAVEL_PLAYER_LOCATION_CANCELLED);
200 
202 
203  if (!m_MapContextualMenu)
204  return;
205 
206  m_MapContextualMenu.GetOnMenuInitInvoker().Remove(SetupMapRadialMenuEntries);
207  m_MapContextualMenu.GetOnEntryPerformedInvoker().Remove(OnMapFastTravelRequested);
208  m_MapContextualMenu.GetOnEntrySelectedInvoker().Remove(CenterMapOnDestination);
209  }
210 
211  //------------------------------------------------------------------------------------------------
212  protected void OnMapFastTravelRequested(SCR_SelectionMenuEntry element, float[] worldPos)
213  {
214  SCR_DeployableSpawnPoint spawnpoint = m_mMenuEntries.Get(element);
215 
216  if (!spawnpoint)
217  return;
218 
219  SCR_CampaignFeedbackComponent feedbackComp = SCR_CampaignFeedbackComponent.GetInstance();
220 
221  if (feedbackComp)
222  feedbackComp.ShowHint(EHint.CONFLICT_TRANSPORT_PICKUP, true, true);
223 
225  SetDestination(FindDestinationId(spawnpoint), string.Empty);
226 
227  SCR_MapEntity.GetOnSelection().Remove(SendPlayerCoords);
228  SCR_MapEntity.GetOnSelection().Insert(SendPlayerCoords);
229  }
230 
231  //------------------------------------------------------------------------------------------------
232  protected void SendPlayerCoords(vector coords)
233  {
234  SCR_MapEntity.GetOnSelection().Remove(SendPlayerCoords);
235  SCR_HintManagerComponent.HideHint();
236 
238 
239  if (!m_PlayerController)
240  return;
241 
242  IEntity player = m_PlayerController.GetControlledEntity();
243 
244  if (!player)
245  return;
246 
247  SCR_MapEntity mapEntity = SCR_MapEntity.GetMapInstance();
248 
249  if (!mapEntity)
250  return;
251 
253 
254  if (!componentData)
255  return;
256 
257  if (player && mapEntity.IsOpen())
258  {
259  SCR_GadgetManagerComponent comp = SCR_GadgetManagerComponent.GetGadgetManager(player);
260 
261  if (comp)
262  comp.RemoveHeldGadget();
263  }
264 
265  float x, y;
266  mapEntity.ScreenToWorld(coords[0], coords[2], x, y);
267  coords[0] = x;
268  coords[2] = y;
269 
270  if (vector.DistanceXZ(player.GetOrigin(), coords) > componentData.GetPickupRadius())
271  {
272  SCR_UISoundEntity.SoundEvent(SCR_SoundEvent.ACTION_FAILED);
273  SCR_NotificationsComponent.SendLocal(ENotification.FASTTRAVEL_PLAYER_LOCATION_WRONG);
274  return;
275  }
276 
277  SCR_UISoundEntity.SoundEvent(SCR_SoundEvent.SOUND_MAP_CLICK_POINT_ON);
278  FastTravel();
279  }
280 
281  //------------------------------------------------------------------------------------------------
282  protected void SetupMapRadialMenuEntries()
283  {
284  m_mMenuEntries.Clear();
285 
287  return;
288 
289  // Parent for fast travel radial menu entries
290  m_MainEntry = m_MapContextualMenu.AddRadialCategory("#AR-Tasks_TitleTransport");
291  m_MainEntry.SetIconFromDeafaultImageSet("terrainIcon");
293  bool available = RefreshMainEntry();
294 
295  if (!available)
296  return;
297 
298  SCR_SpawnPoint.Event_SpawnPointAdded.Insert(OnSpawnpointAdded);
299  SCR_SpawnPoint.Event_SpawnPointRemoved.Insert(OnSpawnpointRemoved);
300 
301  if (m_mMenuEntries.IsEmpty())
302  {
303  m_MainEntry.Enable(false);
304  return;
305  }
306 
308  }
309 
310  //------------------------------------------------------------------------------------------------
311  protected bool RefreshMainEntry()
312  {
313  ChimeraWorld world = GetGame().GetWorld();
314  WorldTimestamp timestamp = world.GetServerTimestamp();
315 
316  // Disable fast travel entry if its cooldown is still in progress
317  bool cooldownDone = !m_fNextTravelAvailableAt || timestamp.GreaterEqual(m_fNextTravelAvailableAt);
318  m_MainEntry.SetName("#AR-Tasks_TitleTransport");
319  m_MainEntry.Enable(cooldownDone);
320 
321  SCR_ChimeraCharacter player = SCR_ChimeraCharacter.Cast(m_PlayerController.GetControlledEntity());
322 
323  if (!player)
324  return false;
325 
326  SCR_CampaignFactionManager fManager = SCR_CampaignFactionManager.Cast(GetGame().GetFactionManager());
327  SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
328 
329  if (player.IsInVehicle())
330  {
331  m_MainEntry.Enable(false);
332  m_MainEntry.SetName(string.Empty);
333  return false;
334  }
335 
336  // Disable fast travel entry if player is renegade
337  if (fManager && fManager.IsRankRenegade(SCR_CharacterRankComponent.GetCharacterRank(player)))
338  {
339  m_MainEntry.Enable(false);
340  m_MainEntry.SetName("#AR-Rank_Renegade");
341  return false;
342  }
343 
344  // Disable fast travel entry if player is carrying a radio backpack
345  EquipedLoadoutStorageComponent loadoutStorage = EquipedLoadoutStorageComponent.Cast(player.FindComponent(EquipedLoadoutStorageComponent));
346 
347  if (loadoutStorage)
348  {
349  IEntity backpack = loadoutStorage.GetClothFromArea(LoadoutBackpackArea);
350 
351  if (backpack && BaseRadioComponent.Cast(backpack.FindComponent(BaseRadioComponent)))
352  {
353  m_MainEntry.Enable(false);
354  m_MainEntry.SetName("#AR-ArsenalItemType_RadioBackpack_Name");
355  return false;
356  }
357  }
358 
359  SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.FindResourceComponent(player);
360 
361  if (resourceComponent)
362  {
363  SCR_ResourceConsumer consumer = resourceComponent.GetConsumer(EResourceGeneratorID.SELF, EResourceType.SUPPLIES);
364 
365  if (consumer)
366  {
367  //Print(consumer.GetAggregatedResourceValue());
368  }
369  }
370 
371  if (campaign && !campaign.GetBaseManager().IsEntityInFactionRadioSignal(player, player.GetFaction()))
372  {
373  m_MainEntry.Enable(false);
374  m_MainEntry.SetName("#AR-Campaign_NoRadioSignal");
375  return false;
376  }
377 
378  if (!cooldownDone)
379  GetGame().GetCallqueue().CallLater(RefreshShownCooldown, SCR_GameModeCampaign.UI_UPDATE_DELAY, true);
380 
381  return cooldownDone;
382  }
383 
384  //------------------------------------------------------------------------------------------------
385  protected void CenterMapOnDestination(SCR_SelectionMenuEntry entry, int id)
386  {
387  if (!entry)
388  return;
389 
390  SCR_DeployableSpawnPoint spawnpoint = m_mMenuEntries.Get(entry);
391 
392  if (!spawnpoint)
393  return;
394 
395  SCR_MapEntity mapEntity = SCR_MapEntity.GetMapInstance();
396 
397  if (!mapEntity || !mapEntity.IsOpen())
398  return;
399 
400  vector spawnpointPos = spawnpoint.GetOrigin();
401  float x, y;
402  mapEntity.WorldToScreen(spawnpointPos[0], spawnpointPos[2], x, y);
403  mapEntity.PanSmooth(x, y);
404  }
405 
406  //------------------------------------------------------------------------------------------------
407  protected void ComposeDestinationList()
408  {
409  array<SCR_SpawnPoint> spawnpoints = SCR_SpawnPoint.GetSpawnPoints();
410  SCR_RestrictedDeployableSpawnPoint radioSpawnpoint;
411  int playerId = m_PlayerController.GetPlayerId();
412 
413  foreach (SCR_SpawnPoint spawnpoint : spawnpoints)
414  {
415  radioSpawnpoint = SCR_RestrictedDeployableSpawnPoint.Cast(spawnpoint);
416 
417  if (!radioSpawnpoint || !radioSpawnpoint.IsSpawnPointVisibleForPlayer(playerId))
418  continue;
419 
420  SCR_SelectionMenuEntry newEntry = m_MapContextualMenu.AddRadialEntry("#AR-DeployableSpawnPoints_MapIconName", m_MainEntry);
421  m_mMenuEntries.Set(newEntry, radioSpawnpoint);
422  newEntry.SetIconFromDeafaultImageSet("VON_radio");
423  newEntry.SetName("#AR-DeployMenu_DisabledSpawnPointReason_OutOfRespawns");
424  newEntry.Enable(false);
425  }
426  }
427 
428  //------------------------------------------------------------------------------------------------
429  protected void RefreshDestinationList()
430  {
431  SCR_DeployableSpawnPoint radioSpawnpoint;
432 
433  for (int i = 0, count = m_mMenuEntries.Count(); i < count; i++)
434  {
435  radioSpawnpoint = m_mMenuEntries.GetElement(i);
436 
437  if (!radioSpawnpoint)
438  continue;
439 
441  }
442  }
443 
444  //------------------------------------------------------------------------------------------------
445  protected void RefreshShownCooldown()
446  {
447  ChimeraWorld world = GetGame().GetWorld();
448  WorldTimestamp timestamp = world.GetServerTimestamp();
449  Widget radialRoot = m_MapContextualMenu.GetRadialDisplay().GetRootWidget();
450  SCR_SelectionMenuEntry currentEntry = m_MapContextualMenu.GetRadialController().GetRadialMenu().GetSelectionEntry();
451 
452  if (!m_fNextTravelAvailableAt || timestamp.GreaterEqual(m_fNextTravelAvailableAt))
453  {
454  // Cooldown finished, re-enable fast travel
455  GetGame().GetCallqueue().Remove(RefreshShownCooldown);
458  }
459  else
460  {
461  // Update timer
462  m_MainEntry.Enable(false);
463  m_MainEntry.SetName(SCR_FormatHelper.GetTimeFormatting(m_fNextTravelAvailableAt.DiffMilliseconds(timestamp) * 0.001, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS));
464 
465  if (currentEntry == m_MainEntry)
466  m_MainEntry.SetNameTo(TextWidget.Cast(radialRoot.FindAnyWidget("InfoName")));
467  }
468  }
469 
470  //------------------------------------------------------------------------------------------------
471  protected void OnSpawnpointRemoved(SCR_SpawnPoint spawnpoint)
472  {
473  }
474 
475  //------------------------------------------------------------------------------------------------
476  protected void OnSpawnpointAdded(SCR_SpawnPoint spawnpoint)
477  {
478  }
479 
480  //------------------------------------------------------------------------------------------------
481  protected void ToggleDestinationSelection(bool enable)
482  {
483  bool updateCursor = (m_bSelectionInProgress != enable);
484  m_bSelectionInProgress = enable;
485 
486  if (!updateCursor)
487  return;
488 
489  SCR_MapEntity mapEntity = SCR_MapEntity.GetMapInstance();
490 
491  if (!mapEntity)
492  return;
493 
494  SCR_MapCursorModule module = SCR_MapCursorModule.Cast(mapEntity.GetMapModule(SCR_MapCursorModule));
495 
496  if (!module)
497  return;
498 
499  module.ToggleFastTravelDestinationSelection(enable);
500  }
501 
502  //------------------------------------------------------------------------------------------------
505  bool IsDestinationReachable(RplId id)
506  {
507  IEntity destination = GetEntityByDestinationId(id);
508 
509  if (!destination)
510  return false;
511 
512  return !ChimeraWorldUtils.TryGetWaterSurfaceSimple(GetGame().GetWorld(), CalculateDestinationVector(destination));
513  }
514 
515  //------------------------------------------------------------------------------------------------
518  bool IsDestinationReachable(vector destination)
519  {
520  if (destination == vector.Zero)
521  return false;
522 
523  return !ChimeraWorldUtils.TryGetWaterSurfaceSimple(GetGame().GetWorld(), CalculateDestinationVector(destination));
524  }
525 
526  //------------------------------------------------------------------------------------------------
527  override void EOnInit(IEntity owner)
528  {
529  super.EOnInit(owner);
530 
531  if (m_PlayerController.GetPlayerId() != SCR_PlayerController.GetLocalPlayerId())
532  return;
533 
534  SCR_MapEntity.GetOnMapOpen().Insert(OnMapOpen);
535  }
536 }
FastTravel
void FastTravel()
Definition: SCR_FastTravelComponent.c:168
ChimeraWorld
Definition: ChimeraWorld.c:12
GetCharacterController
protected SCR_CharacterControllerComponent GetCharacterController(IEntity from)
Definition: SCR_ItemPlacementComponent.c:50
SCR_PlayerController
Definition: SCR_PlayerController.c:31
m_iSupplyCost
protected int m_iSupplyCost
Definition: SCR_ArsenalItem.c:9
SCR_CampaignFastTravelComponentClass
Definition: SCR_CampaignFastTravelComponent.c:2
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
SCR_SelectionMenuCategoryEntry
Definition: SCR_SelectionMenuCategory.c:6
m_MapContextualMenu
protected SCR_MapRadialUI m_MapContextualMenu
Definition: SCR_CampaignFastTravelComponent.c:40
CenterMapOnDestination
protected void CenterMapOnDestination(SCR_SelectionMenuEntry entry, int id)
Definition: SCR_CampaignFastTravelComponent.c:385
SCR_FormatHelper
Definition: SCR_FormatHelper.c:1
m_fNextTravelAvailableAt
protected WorldTimestamp m_fNextTravelAvailableAt
Definition: SCR_FastTravelComponent.c:29
SetupMapRadialMenuEntries
protected void SetupMapRadialMenuEntries()
Definition: SCR_CampaignFastTravelComponent.c:282
SendPlayerCoords
protected void SendPlayerCoords(vector coords)
Definition: SCR_CampaignFastTravelComponent.c:232
SCR_UISoundEntity
Definition: SCR_UISoundEntity.c:7
SCR_CampaignClientData
Used for storing client data to be reapplied for reconnecting clients.
Definition: SCR_CampaignClientData.c:3
SCR_MapRadialUI
2D map radial menu UI
Definition: SCR_MapRadialUI.c:13
OnSpawnpointRemoved
protected void OnSpawnpointRemoved(SCR_SpawnPoint spawnpoint)
Definition: SCR_CampaignFastTravelComponent.c:471
m_mMenuEntries
protected ref map< SCR_SelectionMenuEntry, SCR_DeployableSpawnPoint > m_mMenuEntries
Definition: SCR_CampaignFastTravelComponent.c:46
ToggleDestinationSelection
protected void ToggleDestinationSelection(bool enable)
Definition: SCR_CampaignFastTravelComponent.c:481
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
ServerSanityCheck
override protected bool ServerSanityCheck(notnull IEntity target)
Definition: SCR_CampaignFastTravelComponent.c:49
GetCooldown
override protected int GetCooldown()
Reads the cooldown value from player's rank.
Definition: SCR_CampaignFastTravelComponent.c:130
m_PlayerFaction
protected SCR_CampaignFaction m_PlayerFaction
Definition: SCR_CampaignFastTravelComponent.c:44
SCR_GadgetManagerComponent
Definition: SCR_GadgetManagerComponent.c:138
ComposeDestinationList
protected void ComposeDestinationList()
Definition: SCR_CampaignFastTravelComponent.c:407
SCR_SoundEvent
Definition: SCR_SoundEvent.c:1
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
SCR_SpawnPoint
Spawn point entity defines positions on which players can possibly spawn.
Definition: SCR_SpawnPoint.c:27
SCR_CharacterRankComponent
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_CharacterRankComponent.c:209
RefreshDestinationList
protected void RefreshDestinationList()
Definition: SCR_CampaignFastTravelComponent.c:429
SCR_MapCursorModule
Map cursor behavior and mode setup.
Definition: SCR_MapCursorModule.c:39
SCR_GameModeCampaign
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
Definition: SCR_GameModeCampaign.c:1927
RefreshShownCooldown
protected void RefreshShownCooldown()
Definition: SCR_CampaignFastTravelComponent.c:445
ENotification
ENotification
Definition: ENotification.c:4
Attribute
typedef Attribute
Post-process effect of scripted camera.
ETimeFormatParam
ETimeFormatParam
Definition: ETimeFormatParam.c:4
LoadoutBackpackArea
Definition: LoadoutBackpackArea.c:12
EResourceType
EResourceType
Definition: SCR_ResourceContainer.c:1
SCR_RestrictedDeployableSpawnPoint
Basically SCR_SpawnPoint with the ability to limit respawn amount.
Definition: SCR_RestrictedDeployableSpawnPoint.c:8
CalculateDestinationVector
protected vector CalculateDestinationVector(notnull IEntity destination)
Definition: SCR_FastTravelComponent.c:285
FindDestinationId
RplId FindDestinationId(IEntity entity)
Definition: SCR_FastTravelComponent.c:151
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
m_MainEntry
protected SCR_SelectionMenuCategoryEntry m_MainEntry
Definition: SCR_CampaignFastTravelComponent.c:42
EOnInit
override void EOnInit(IEntity owner)
Definition: SCR_CampaignFastTravelComponent.c:527
Faction
Definition: Faction.c:12
FilterEntity
protected bool FilterEntity(IEntity ent)
Definition: SCR_CampaignFastTravelComponent.c:146
IsDestinationReachable
bool IsDestinationReachable(RplId id)
Definition: SCR_CampaignFastTravelComponent.c:505
GetEntityByDestinationId
IEntity GetEntityByDestinationId(RplId id)
Definition: SCR_FastTravelComponent.c:206
m_bEnemiesNearby
protected bool m_bEnemiesNearby
Definition: SCR_CampaignFastTravelComponent.c:38
OnSpawnpointAdded
protected void OnSpawnpointAdded(SCR_SpawnPoint spawnpoint)
Definition: SCR_CampaignFastTravelComponent.c:476
m_PlayerController
SCR_CampaignNetworkComponentClass m_PlayerController
Takes care of Campaign-specific server <> client communication and requests.
SCR_CampaignFaction
Definition: SCR_CampaignFaction.c:2
m_iCooldown
protected int m_iCooldown
Definition: SCR_FastTravelComponent.c:19
IsDead
proto external bool IsDead()
OnMapOpen
void OnMapOpen(MapConfiguration config)
Definition: SCR_CampaignFastTravelComponent.c:169
RefreshMainEntry
protected bool RefreshMainEntry()
Definition: SCR_CampaignFastTravelComponent.c:311
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_SelectionMenuEntry
Definition: SCR_SelectionMenuEntry.c:7
OnMapFastTravelRequested
protected void OnMapFastTravelRequested(SCR_SelectionMenuEntry element, float[] worldPos)
Definition: SCR_CampaignFastTravelComponent.c:212
ProcessEntity
protected bool ProcessEntity(IEntity ent)
Definition: SCR_CampaignFastTravelComponent.c:152
SetDestination
void SetDestination(RplId id, string name)
Destination must be a replicated item with valid RplId.
Definition: SCR_FastTravelComponent.c:51
SCR_FastTravelComponentClass
Definition: SCR_FastTravelComponent.c:2
EHint
EHint
Definition: EHint.c:10
RpcAsk_CheckSpawnpointAvailability
protected void RpcAsk_CheckSpawnpointAvailability(RplId spawnpointId)
Definition: SCR_CampaignFastTravelComponent.c:97
RpcDo_EnableDestination
protected void RpcDo_EnableDestination(RplId spawnpointId)
Definition: SCR_CampaignFastTravelComponent.c:112
OnMapClose
void OnMapClose(MapConfiguration config)
Definition: SCR_CampaignFastTravelComponent.c:186
ChimeraWorldUtils
Definition: ChimeraWorldUtils.c:7
RpcAsk_FastTravel
override protected void RpcAsk_FastTravel(RplId destinationId)
Definition: SCR_CampaignFastTravelComponent.c:78
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
EResourceGeneratorID
EResourceGeneratorID
Definition: SCR_ResourceGenerator.c:1
m_bSelectionInProgress
SCR_CampaignFastTravelComponentClass m_bSelectionInProgress
SCR_DeployableSpawnPoint
Definition: SCR_DeployableSpawnPoint.c:11