Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DestructionUtility Class Reference

Static Protected Member Functions

static float CalculateMomentum (notnull Contact contact, float ownerMass, float otherMass)
static void SpawnDestroyObjects (notnull IEntity owner, notnull array< ref SCR_BaseSpawnable > spawnList, notnull SCR_DestructionHitInfo destructionHitInfo)
 Spawns objects that are meant to be created when the object is destroyed (particles, debris, etc).
static void PlaySound (notnull IEntity owner, SCR_EMaterialSoundTypeBreak materialSoundType, int numDamagePhases, int damagePhaseIndex)
static void SetModel (notnull IEntity owner, ResourceName modelName)
static void SetModel (notnull IEntity owner, ResourceName modelName, string remap)
static void SetModel (notnull IEntity owner, notnull VObject model)
static void SetModel (notnull IEntity owner, notnull VObject model, string remap)
static VObject GetModel (ResourceName modelName, out Resource resource)
static float GetDestructibleSize (notnull IEntity owner)
static void UpdateResponseIndex (notnull Physics physics, float health, float maxHealth)
static void RegenerateNavmeshDelayed (notnull IEntity owner)
static void SetDamagePhaseSignal (notnull IEntity owner, int damagePhaseIndex=0)
static string SanitizeRemapString (string originalRemap, string newRemap)

Static Protected Attributes

static const float SIMULATION_IMPRECISION_MULTIPLIER = 1.1
static const int MIN_MOMENTUM_RESPONSE_INDEX = 1
static const int MAX_MOMENTUM_RESPONSE_INDEX = 5
static const int MIN_DESTRUCTION_RESPONSE_INDEX = 6
static const int MAX_DESTRUCTION_RESPONSE_INDEX = 10
static const string DAMAGE_PHASE_SIGNAL_NAME = "DamagePhase"

Detailed Description

This class serves to unify commonly used methods in both SCR_DestructibleEntity and SCR_DestructionMultiPhaseComponent. Since one is a component and the other is an entity, inheritance cannot be used to reuse code so all shared methods will be accessed here.

Definition at line 5 of file SCR_DestructionUtility.c.

Member Function Documentation

◆ CalculateMomentum()

float SCR_DestructionUtility::CalculateMomentum ( notnull Contact contact,
float ownerMass,
float otherMass )
inlinestaticprotected
Parameters
[in]contact
[in]ownerMass
[in]otherMass
Returns

Definition at line 20 of file SCR_DestructionUtility.c.

◆ GetDestructibleSize()

float SCR_DestructionUtility::GetDestructibleSize ( notnull IEntity owner)
inlinestaticprotected
Parameters
[in]owner
Returns

Definition at line 177 of file SCR_DestructionUtility.c.

◆ GetModel()

VObject SCR_DestructionUtility::GetModel ( ResourceName modelName,
out Resource resource )
inlinestaticprotected
Parameters
[in]modelName
[out]resourcepointer that you have to hold on to until the moment the model is set
Returns

Definition at line 160 of file SCR_DestructionUtility.c.

◆ PlaySound()

void SCR_DestructionUtility::PlaySound ( notnull IEntity owner,
SCR_EMaterialSoundTypeBreak materialSoundType,
int numDamagePhases,
int damagePhaseIndex )
inlinestaticprotected
Parameters
[in]owner
[in]materialSoundType
[in]numDamagePhases
[in]damagePhaseIndex

Definition at line 54 of file SCR_DestructionUtility.c.

◆ RegenerateNavmeshDelayed()

void SCR_DestructionUtility::RegenerateNavmeshDelayed ( notnull IEntity owner)
inlinestaticprotected
Parameters
[in]owner

Definition at line 208 of file SCR_DestructionUtility.c.

◆ SanitizeRemapString()

string SCR_DestructionUtility::SanitizeRemapString ( string originalRemap,
string newRemap )
inlinestaticprotected

Takes two material remap strings and returns a sanitized version containing only valid entries that exist in the original remap

Parameters
[in]originalRemapThe original material remap string to validate against
[in]newRemapThe new material remap string to sanitize
Returns
Sanitized remap string containing only valid entries from newRemap that exist in originalRemap

Definition at line 246 of file SCR_DestructionUtility.c.

◆ SetDamagePhaseSignal()

void SCR_DestructionUtility::SetDamagePhaseSignal ( notnull IEntity owner,
int damagePhaseIndex = 0 )
inlinestaticprotected
Parameters
[in]owner
[in]damagePhaseIndex

Definition at line 230 of file SCR_DestructionUtility.c.

◆ SetModel() [1/4]

void SCR_DestructionUtility::SetModel ( notnull IEntity owner,
notnull VObject model )
inlinestaticprotected

Sets the model of the object

Parameters
[in]owner
[in]model

Definition at line 123 of file SCR_DestructionUtility.c.

◆ SetModel() [2/4]

void SCR_DestructionUtility::SetModel ( notnull IEntity owner,
notnull VObject model,
string remap )
inlinestaticprotected

Sets the model of the object and its materials

Parameters
[in]owner
[in]model

Definition at line 141 of file SCR_DestructionUtility.c.

◆ SetModel() [3/4]

void SCR_DestructionUtility::SetModel ( notnull IEntity owner,
ResourceName modelName )
inlinestaticprotected

Sets the model of the object

Parameters
[in]owner
[in]modelName

Definition at line 94 of file SCR_DestructionUtility.c.

◆ SetModel() [4/4]

void SCR_DestructionUtility::SetModel ( notnull IEntity owner,
ResourceName modelName,
string remap )
inlinestaticprotected

Sets the model of the object & also remap the materials

Parameters
[in]owner
[in]modelName
[in]materialsOverride

Definition at line 109 of file SCR_DestructionUtility.c.

◆ SpawnDestroyObjects()

void SCR_DestructionUtility::SpawnDestroyObjects ( notnull IEntity owner,
notnull array< ref SCR_BaseSpawnable > spawnList,
notnull SCR_DestructionHitInfo destructionHitInfo )
inlinestaticprotected

Spawns objects that are meant to be created when the object is destroyed (particles, debris, etc).

Definition at line 36 of file SCR_DestructionUtility.c.

◆ UpdateResponseIndex()

void SCR_DestructionUtility::UpdateResponseIndex ( notnull Physics physics,
float health,
float maxHealth )
inlinestaticprotected
Parameters
[in]physics
[in]health
[in]maxHealth

Definition at line 189 of file SCR_DestructionUtility.c.

Member Data Documentation

◆ DAMAGE_PHASE_SIGNAL_NAME

const string SCR_DestructionUtility::DAMAGE_PHASE_SIGNAL_NAME = "DamagePhase"
staticprotected

Definition at line 12 of file SCR_DestructionUtility.c.

◆ MAX_DESTRUCTION_RESPONSE_INDEX

const int SCR_DestructionUtility::MAX_DESTRUCTION_RESPONSE_INDEX = 10
staticprotected

Definition at line 11 of file SCR_DestructionUtility.c.

◆ MAX_MOMENTUM_RESPONSE_INDEX

const int SCR_DestructionUtility::MAX_MOMENTUM_RESPONSE_INDEX = 5
staticprotected

Definition at line 9 of file SCR_DestructionUtility.c.

◆ MIN_DESTRUCTION_RESPONSE_INDEX

const int SCR_DestructionUtility::MIN_DESTRUCTION_RESPONSE_INDEX = 6
staticprotected

Definition at line 10 of file SCR_DestructionUtility.c.

◆ MIN_MOMENTUM_RESPONSE_INDEX

const int SCR_DestructionUtility::MIN_MOMENTUM_RESPONSE_INDEX = 1
staticprotected

Definition at line 8 of file SCR_DestructionUtility.c.

◆ SIMULATION_IMPRECISION_MULTIPLIER

const float SCR_DestructionUtility::SIMULATION_IMPRECISION_MULTIPLIER = 1.1
staticprotected

Definition at line 7 of file SCR_DestructionUtility.c.


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