Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DestructibleBuildingComponent Class Reference
Inheritance diagram for SCR_DestructibleBuildingComponent:

Protected Member Functions

SCR_BuildingDestructionData GetData ()
 Returns centrally stored data from building destruction manager.
void FreeData ()
 Frees the data stored in building destruction manager.
void DestroyChildDestructibles (notnull IEntity owner)
float GetSpeedGradualMultiplier ()
 Returns prefab data stored speed gradual multiplier.
float GetRotationTimeRandomizer ()
float GetRotationSpeed ()
float GetRotationTime ()
int GetMaxRotations ()
float GetSpeed ()
 Returns prefab data stored speed.
vector GetSinkVector ()
float GetDelay ()
 Returns prefab data stored delay.
ref array< ref SCR_InteriorBoundingBoxGetInteriorBoundingBoxes ()
bool GetAllowRotationX ()
bool GetAllowRotationY ()
bool GetAllowRotationZ ()
Curve GetCameraShakeCurve ()
array< ref SCR_TimedEffect > GetEffects ()
 Returns pointer to prefab data stored array of effects, do not modify the array!
SCR_AudioSourceConfiguration GetSlowDownAudioSourceConfiguration ()
void SetAudioSource (SCR_AudioSource audioSource)
SCR_AudioSource GetAudioSource ()
void SetSeed (int seed)
override void OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP)
 Called when damage state is changed.
void RPC_GoToDestroyedState (int seed)
 Used to do runtime synchronization of state.
void DestroyInteriorInit (bool immediate)
 Handles destruction of interior by gathering objects using AABB (will probably use OBB) and deleting them according to their type.
void DestroyInterior (bool immediate)
void DeleteBuilding ()
 Handles the destruction of building itself after interior is handled.
void FinishDestruction ()
 Last method to be called after destruction happens, data is cleared.
bool PerformTrace (notnull TraceParam param, vector start, vector direction, notnull BaseWorld world, float lengthMultiplier=1)
bool IsInside (notnull IEntity entity)
 Checks whether or not an entity is inside of the building, using a trace in each world axis.
bool TraceFilter (notnull IEntity e, vector start="0 0 0", vector dir="0 0 0")
 Filters out unwanted entities.
bool HasPhysicalChildren (notnull IEntity e)
bool QueryFilterCallback (notnull IEntity entity)
 Used to filter out entities that are not meant to be handled in AddEntityCallback.
bool AddEntityCallback (notnull IEntity e)
 Used by Query in DestroyInterior.
void DamageOccupantsDelayed (IEntity targetEntity)
void HandleVehicle (IEntity targetEntity)
void HandleConnectedPowerlines ()
bool ProcessFoundPowerline (notnull IEntity e)
void GoToDestroyedStateLoad (bool spawnEffects=true)
void CalculateAndStoreVolume ()
void GoToDestroyedState (bool immediate, bool spawnEffects=true)
void SpawnEffects (float percentDone, IEntity owner, bool immediateDestruction)
void FinishLerp (IEntity owner, bool immediate, bool updateEntity, bool spawnEffects=true)
void RegenerateNavmesh ()
 Regenerates navmesh using previously stored data.
void StoreNavmeshData ()
 Stores navmesh data to regenerate navmesh later.
void ClampVector (inout vector currentOrigin, vector startOrigin, vector endOrigin)
void LerpRotation (IEntity owner, float timeSlice)
void PlaySlowDownSound ()
void OnSlowDown ()
vector LerpAngles (vector start, vector current, vector target, float rotationSpeed, float timeSlice, notnull SCR_BuildingDestructionData data)
void LerpPosition (IEntity owner, float timeSlice)
override bool HijackDamageHandling (notnull BaseDamageContext damageContext)
override bool HasDataToReplicate ()
override event bool OnRplSave (ScriptBitWriter writer)
 Serializes state over network.
override event bool OnRplLoad (ScriptBitReader reader)
 Loads serialized state on client.
override void OnFilteredContact (IEntity owner, IEntity other, Contact contact)
 Contact to deal damage.
override void OnFrame (IEntity owner, float timeSlice)
 Handles per-frame operations, only enabled while the building is sinking.
override void OnPostInit (IEntity owner)
bool IsProxy ()
 Returns true if local instance is proxy (not the authority).
bool IsMaster ()

Protected Attributes

const int NO_COLLISION_RESPONSE_INDEX = 11
const int MAX_CHECKS_PER_FRAME = 20
const float BUILDING_SIZE = 5000
const vector TRACE_DIRECTIONS [3] = {vector.Right, vector.Up, vector.Forward}
bool m_bDestroyed = false
ref array< vectorm_aPowerPolePositions = {}

Detailed Description

Definition at line 525 of file SCR_DestructibleBuildingComponent.c.

Member Function Documentation

◆ AddEntityCallback()

bool SCR_DestructibleBuildingComponent::AddEntityCallback ( notnull IEntity e)
inlineprotected

Used by Query in DestroyInterior.

Definition at line 1093 of file SCR_DestructibleBuildingComponent.c.

◆ CalculateAndStoreVolume()

void SCR_DestructibleBuildingComponent::CalculateAndStoreVolume ( )
inlineprotected

Definition at line 1299 of file SCR_DestructibleBuildingComponent.c.

◆ ClampVector()

void SCR_DestructibleBuildingComponent::ClampVector ( inout vector currentOrigin,
vector startOrigin,
vector endOrigin )
inlineprotected

Definition at line 1515 of file SCR_DestructibleBuildingComponent.c.

◆ DamageOccupantsDelayed()

void SCR_DestructibleBuildingComponent::DamageOccupantsDelayed ( IEntity targetEntity)
inlineprotected

Definition at line 1241 of file SCR_DestructibleBuildingComponent.c.

◆ DeleteBuilding()

void SCR_DestructibleBuildingComponent::DeleteBuilding ( )
inlineprotected

Handles the destruction of building itself after interior is handled.

Definition at line 986 of file SCR_DestructibleBuildingComponent.c.

◆ DestroyChildDestructibles()

void SCR_DestructibleBuildingComponent::DestroyChildDestructibles ( notnull IEntity owner)
inlineprotected

Destroys all direct child entities that have SCR_DestructibleBuildingComponent Each child will handle its own sub-children during its destruction process

Parameters
[in]ownerThe parent entity whose children should be checked and destroyed

Definition at line 572 of file SCR_DestructibleBuildingComponent.c.

◆ DestroyInterior()

void SCR_DestructibleBuildingComponent::DestroyInterior ( bool immediate)
inlineprotected

Definition at line 882 of file SCR_DestructibleBuildingComponent.c.

◆ DestroyInteriorInit()

void SCR_DestructibleBuildingComponent::DestroyInteriorInit ( bool immediate)
inlineprotected

Handles destruction of interior by gathering objects using AABB (will probably use OBB) and deleting them according to their type.

Definition at line 796 of file SCR_DestructibleBuildingComponent.c.

◆ FinishDestruction()

void SCR_DestructibleBuildingComponent::FinishDestruction ( )
inlineprotected

Last method to be called after destruction happens, data is cleared.

Definition at line 994 of file SCR_DestructibleBuildingComponent.c.

◆ FinishLerp()

void SCR_DestructibleBuildingComponent::FinishLerp ( IEntity owner,
bool immediate,
bool updateEntity,
bool spawnEffects = true )
inlineprotected

Handles the end of building position lerp Disables frame, deactivates the entity Hides the mesh Plays final effects

Definition at line 1448 of file SCR_DestructibleBuildingComponent.c.

◆ FreeData()

void SCR_DestructibleBuildingComponent::FreeData ( )
inlineprotected

Frees the data stored in building destruction manager.

Definition at line 555 of file SCR_DestructibleBuildingComponent.c.

◆ GetAllowRotationX()

bool SCR_DestructibleBuildingComponent::GetAllowRotationX ( )
inlineprotected

Definition at line 682 of file SCR_DestructibleBuildingComponent.c.

◆ GetAllowRotationY()

bool SCR_DestructibleBuildingComponent::GetAllowRotationY ( )
inlineprotected

Definition at line 688 of file SCR_DestructibleBuildingComponent.c.

◆ GetAllowRotationZ()

bool SCR_DestructibleBuildingComponent::GetAllowRotationZ ( )
inlineprotected

Definition at line 694 of file SCR_DestructibleBuildingComponent.c.

◆ GetAudioSource()

SCR_AudioSource SCR_DestructibleBuildingComponent::GetAudioSource ( )
inlineprotected

Definition at line 740 of file SCR_DestructibleBuildingComponent.c.

◆ GetCameraShakeCurve()

Curve SCR_DestructibleBuildingComponent::GetCameraShakeCurve ( )
inlineprotected

Definition at line 700 of file SCR_DestructibleBuildingComponent.c.

◆ GetData()

SCR_BuildingDestructionData SCR_DestructibleBuildingComponent::GetData ( )
inlineprotected

Returns centrally stored data from building destruction manager.

Definition at line 541 of file SCR_DestructibleBuildingComponent.c.

◆ GetDelay()

float SCR_DestructibleBuildingComponent::GetDelay ( )
inlineprotected

Returns prefab data stored delay.

Definition at line 670 of file SCR_DestructibleBuildingComponent.c.

◆ GetEffects()

array< ref SCR_TimedEffect > SCR_DestructibleBuildingComponent::GetEffects ( )
inlineprotected

Returns pointer to prefab data stored array of effects, do not modify the array!

Definition at line 707 of file SCR_DestructibleBuildingComponent.c.

◆ GetInteriorBoundingBoxes()

ref array< ref SCR_InteriorBoundingBox > SCR_DestructibleBuildingComponent::GetInteriorBoundingBoxes ( )
inlineprotected

Definition at line 676 of file SCR_DestructibleBuildingComponent.c.

◆ GetMaxRotations()

int SCR_DestructibleBuildingComponent::GetMaxRotations ( )
inlineprotected

Definition at line 650 of file SCR_DestructibleBuildingComponent.c.

◆ GetRotationSpeed()

float SCR_DestructibleBuildingComponent::GetRotationSpeed ( )
inlineprotected

Definition at line 638 of file SCR_DestructibleBuildingComponent.c.

◆ GetRotationTime()

float SCR_DestructibleBuildingComponent::GetRotationTime ( )
inlineprotected

Definition at line 644 of file SCR_DestructibleBuildingComponent.c.

◆ GetRotationTimeRandomizer()

float SCR_DestructibleBuildingComponent::GetRotationTimeRandomizer ( )
inlineprotected

Definition at line 632 of file SCR_DestructibleBuildingComponent.c.

◆ GetSinkVector()

vector SCR_DestructibleBuildingComponent::GetSinkVector ( )
inlineprotected

Definition at line 663 of file SCR_DestructibleBuildingComponent.c.

◆ GetSlowDownAudioSourceConfiguration()

SCR_AudioSourceConfiguration SCR_DestructibleBuildingComponent::GetSlowDownAudioSourceConfiguration ( )
inlineprotected

Definition at line 713 of file SCR_DestructibleBuildingComponent.c.

◆ GetSpeed()

float SCR_DestructibleBuildingComponent::GetSpeed ( )
inlineprotected

Returns prefab data stored speed.

Definition at line 657 of file SCR_DestructibleBuildingComponent.c.

◆ GetSpeedGradualMultiplier()

float SCR_DestructibleBuildingComponent::GetSpeedGradualMultiplier ( )
inlineprotected

Returns prefab data stored speed gradual multiplier.

Definition at line 626 of file SCR_DestructibleBuildingComponent.c.

◆ GoToDestroyedState()

void SCR_DestructibleBuildingComponent::GoToDestroyedState ( bool immediate,
bool spawnEffects = true )
inlineprotected

Destroys interior Starts position lerping (Enables frame, activates the entity) Or moves the building to target position immediately if it's JIP

Definition at line 1323 of file SCR_DestructibleBuildingComponent.c.

◆ GoToDestroyedStateLoad()

void SCR_DestructibleBuildingComponent::GoToDestroyedStateLoad ( bool spawnEffects = true)
inlineprotected

Definition at line 1292 of file SCR_DestructibleBuildingComponent.c.

◆ HandleConnectedPowerlines()

void SCR_DestructibleBuildingComponent::HandleConnectedPowerlines ( )
inlineprotected

Definition at line 1271 of file SCR_DestructibleBuildingComponent.c.

◆ HandleVehicle()

void SCR_DestructibleBuildingComponent::HandleVehicle ( IEntity targetEntity)
inlineprotected

Definition at line 1257 of file SCR_DestructibleBuildingComponent.c.

◆ HasDataToReplicate()

override bool SCR_DestructibleBuildingComponent::HasDataToReplicate ( )
inlineprotected

Definition at line 1704 of file SCR_DestructibleBuildingComponent.c.

◆ HasPhysicalChildren()

bool SCR_DestructibleBuildingComponent::HasPhysicalChildren ( notnull IEntity e)
inlineprotected

Definition at line 1058 of file SCR_DestructibleBuildingComponent.c.

◆ HijackDamageHandling()

override bool SCR_DestructibleBuildingComponent::HijackDamageHandling ( notnull BaseDamageContext damageContext)
inlineprotected

Definition at line 1695 of file SCR_DestructibleBuildingComponent.c.

◆ IsInside()

bool SCR_DestructibleBuildingComponent::IsInside ( notnull IEntity entity)
inlineprotected

Checks whether or not an entity is inside of the building, using a trace in each world axis.

Definition at line 1023 of file SCR_DestructibleBuildingComponent.c.

◆ IsMaster()

bool SCR_DestructibleBuildingComponent::IsMaster ( )
inlineprotected

Definition at line 1935 of file SCR_DestructibleBuildingComponent.c.

◆ IsProxy()

bool SCR_DestructibleBuildingComponent::IsProxy ( )
inlineprotected

Returns true if local instance is proxy (not the authority).

Definition at line 1928 of file SCR_DestructibleBuildingComponent.c.

◆ LerpAngles()

vector SCR_DestructibleBuildingComponent::LerpAngles ( vector start,
vector current,
vector target,
float rotationSpeed,
float timeSlice,
notnull SCR_BuildingDestructionData data )
inlineprotected

Definition at line 1629 of file SCR_DestructibleBuildingComponent.c.

◆ LerpPosition()

void SCR_DestructibleBuildingComponent::LerpPosition ( IEntity owner,
float timeSlice )
inlineprotected

Handles position lerping Handles calling SpawnEffects, calculates percentDone parameter

Definition at line 1645 of file SCR_DestructibleBuildingComponent.c.

◆ LerpRotation()

void SCR_DestructibleBuildingComponent::LerpRotation ( IEntity owner,
float timeSlice )
inlineprotected

Definition at line 1535 of file SCR_DestructibleBuildingComponent.c.

◆ OnDamageStateChanged()

override void SCR_DestructibleBuildingComponent::OnDamageStateChanged ( EDamageState newState,
EDamageState previousDamageState,
bool isJIP )
inlineprotected

Called when damage state is changed.

Definition at line 761 of file SCR_DestructibleBuildingComponent.c.

◆ OnFilteredContact()

override void SCR_DestructibleBuildingComponent::OnFilteredContact ( IEntity owner,
IEntity other,
Contact contact )
inlineprotected

Contact to deal damage.

Definition at line 1743 of file SCR_DestructibleBuildingComponent.c.

◆ OnFrame()

override void SCR_DestructibleBuildingComponent::OnFrame ( IEntity owner,
float timeSlice )
inlineprotected

Handles per-frame operations, only enabled while the building is sinking.

Definition at line 1796 of file SCR_DestructibleBuildingComponent.c.

◆ OnPostInit()

override void SCR_DestructibleBuildingComponent::OnPostInit ( IEntity owner)
inlineprotected

Definition at line 1803 of file SCR_DestructibleBuildingComponent.c.

◆ OnRplLoad()

override event bool SCR_DestructibleBuildingComponent::OnRplLoad ( ScriptBitReader reader)
inlineprotected

Loads serialized state on client.

Definition at line 1725 of file SCR_DestructibleBuildingComponent.c.

◆ OnRplSave()

override event bool SCR_DestructibleBuildingComponent::OnRplSave ( ScriptBitWriter writer)
inlineprotected

Serializes state over network.

Definition at line 1714 of file SCR_DestructibleBuildingComponent.c.

◆ OnSlowDown()

void SCR_DestructibleBuildingComponent::OnSlowDown ( )
inlineprotected

Definition at line 1623 of file SCR_DestructibleBuildingComponent.c.

◆ PerformTrace()

bool SCR_DestructibleBuildingComponent::PerformTrace ( notnull TraceParam param,
vector start,
vector direction,
notnull BaseWorld world,
float lengthMultiplier = 1 )
inlineprotected

Definition at line 1012 of file SCR_DestructibleBuildingComponent.c.

◆ PlaySlowDownSound()

void SCR_DestructibleBuildingComponent::PlaySlowDownSound ( )
inlineprotected

Definition at line 1602 of file SCR_DestructibleBuildingComponent.c.

◆ ProcessFoundPowerline()

bool SCR_DestructibleBuildingComponent::ProcessFoundPowerline ( notnull IEntity e)
inlineprotected

Definition at line 1282 of file SCR_DestructibleBuildingComponent.c.

◆ QueryFilterCallback()

bool SCR_DestructibleBuildingComponent::QueryFilterCallback ( notnull IEntity entity)
inlineprotected

Used to filter out entities that are not meant to be handled in AddEntityCallback.

Definition at line 1073 of file SCR_DestructibleBuildingComponent.c.

◆ RegenerateNavmesh()

void SCR_DestructibleBuildingComponent::RegenerateNavmesh ( )
inlineprotected

Regenerates navmesh using previously stored data.

Definition at line 1478 of file SCR_DestructibleBuildingComponent.c.

◆ RPC_GoToDestroyedState()

void SCR_DestructibleBuildingComponent::RPC_GoToDestroyedState ( int seed)
inlineprotected

Used to do runtime synchronization of state.

Definition at line 785 of file SCR_DestructibleBuildingComponent.c.

◆ SetAudioSource()

void SCR_DestructibleBuildingComponent::SetAudioSource ( SCR_AudioSource audioSource)
inlineprotected

Definition at line 719 of file SCR_DestructibleBuildingComponent.c.

◆ SetSeed()

void SCR_DestructibleBuildingComponent::SetSeed ( int seed)
inlineprotected

Definition at line 750 of file SCR_DestructibleBuildingComponent.c.

◆ SpawnEffects()

void SCR_DestructibleBuildingComponent::SpawnEffects ( float percentDone,
IEntity owner,
bool immediateDestruction )
inlineprotected

Called in Frame (while building is sinking) Spawns effects which are supposed to spawn at this time Immediate destruction = from JIP f. e., only spawn effects that remain after destruction - like ruins prefabs

Definition at line 1402 of file SCR_DestructibleBuildingComponent.c.

◆ StoreNavmeshData()

void SCR_DestructibleBuildingComponent::StoreNavmeshData ( )
inlineprotected

Stores navmesh data to regenerate navmesh later.

Definition at line 1496 of file SCR_DestructibleBuildingComponent.c.

◆ TraceFilter()

bool SCR_DestructibleBuildingComponent::TraceFilter ( notnull IEntity e,
vector start = "0 0 0",
vector dir = "0 0 0" )
inlineprotected

Filters out unwanted entities.

Definition at line 1052 of file SCR_DestructibleBuildingComponent.c.

Member Data Documentation

◆ BUILDING_SIZE

const float SCR_DestructibleBuildingComponent::BUILDING_SIZE = 5000
protected

Definition at line 530 of file SCR_DestructibleBuildingComponent.c.

◆ m_aPowerPolePositions

ref array<vector> SCR_DestructibleBuildingComponent::m_aPowerPolePositions = {}
protected

Definition at line 537 of file SCR_DestructibleBuildingComponent.c.

◆ m_bDestroyed

bool SCR_DestructibleBuildingComponent::m_bDestroyed = false
protected

Definition at line 535 of file SCR_DestructibleBuildingComponent.c.

◆ MAX_CHECKS_PER_FRAME

const int SCR_DestructibleBuildingComponent::MAX_CHECKS_PER_FRAME = 20
protected

Definition at line 529 of file SCR_DestructibleBuildingComponent.c.

◆ NO_COLLISION_RESPONSE_INDEX

const int SCR_DestructibleBuildingComponent::NO_COLLISION_RESPONSE_INDEX = 11
protected

Definition at line 528 of file SCR_DestructibleBuildingComponent.c.

◆ TRACE_DIRECTIONS

const vector SCR_DestructibleBuildingComponent::TRACE_DIRECTIONS[3] = {vector.Right, vector.Up, vector.Forward}
protected

Definition at line 531 of file SCR_DestructibleBuildingComponent.c.


The documentation for this class was generated from the following file: