Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_HideoutDeployableSpawnPointComponent.c
Go to the documentation of this file.
1[EntityEditorProps(category: "GameScripted/DeployableItems", description: "Deployable spawn point that ignores gamemode budget type override, keeping the prefab-configured budget type (e.g. SUPPLIES)")]
2class SCR_HideoutDeployableSpawnPointComponentClass : SCR_RestrictedDeployableSpawnPointComponentClass
3{
4}
5
6//------------------------------------------------------------------------------------------------
10class SCR_HideoutDeployableSpawnPointComponent : SCR_RestrictedDeployableSpawnPointComponent
11{
12 //------------------------------------------------------------------------------------------------
13 override void EOnInit(IEntity owner)
14 {
15 // Save the prefab-configured budget type before super overwrites it
16 SCR_ESpawnPointBudgetType prefabBudgetType = m_eRespawnBudgetType;
17 int prefabMaxRespawns = m_iMaxRespawns;
18
19 super.EOnInit(owner);
20
21 // Restore the prefab values that were overwritten by the gamemode
22 m_eRespawnBudgetType = prefabBudgetType;
23 m_iMaxRespawns = prefabMaxRespawns;
24 Replication.BumpMe();
25
26 // Unsubscribe from gamemode budget/ticket changes so they don't override us later
27 BaseGameMode gameMode = GetGame().GetGameMode();
28 if (!gameMode)
29 return;
30
32 if (playerSpawnPointManager)
33 {
34 playerSpawnPointManager.GetOnSpawnPointBudgetTypeChanged().Remove(OnSpawnPointBudgetTypeChanged);
35 playerSpawnPointManager.GetOnSpawnPointTicketAmountChanged().Remove(OnSpawnPointTicketAmountChanged);
36 }
37 }
38
39}
ArmaReforgerScripted GetGame()
Definition game.c:1398
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Main replication API.
Definition Replication.c:14
Deployable spawn point with configurable conditions.