DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл UnderObjectDecalSpawnComponent.c

См. исходные тексты.

Структуры данных

class  UnderObjectDecalSpawnSettings
 

Функции

void UnderObjectDecalSpawnComponent (notnull UnderObjectDecalSpawnSettings pSettings, notnull Object pParent)
 
string GetObjectNameFromSurfaceConfig (string surfaceParamName=SURFACE_PARAM_DECAL_NAME)
 
void SpawnDecal ()
 
void RemoveDecal ()
 
void UpdateSize (float pScaleValue)
 

Переменные

class UnderObjectDecalSpawnSettings SURFACE_PARAM_DECAL_NAME = "underObjectDecal"
 
ref UnderObjectDecalSpawnSettings m_Settings
 
Object m_Parent
 
Object m_Decal
 
float m_LastScaleValue
 

Функции

◆ GetObjectNameFromSurfaceConfig()

string GetObjectNameFromSurfaceConfig ( string surfaceParamName = SURFACE_PARAM_DECAL_NAME)
private
29 {
30 string surfaceType
31 int liquidType;
32 g_Game.SurfaceUnderObjectCorrectedLiquid(m_Parent, surfaceType, liquidType);
33
35 }
DayZGame g_Game
Definition DayZGame.c:3815
Object m_Parent
Definition UnderObjectDecalSpawnComponent.c:17
Definition EntityAI.c:95
Definition Surface.c:2
static string GetParamText(string surfaceName, string paramName)
Definition Surface.c:23

Перекрестные ссылки g_Game, Surface::GetParamText() и m_Parent.

Используется в SpawnDecal().

◆ RemoveDecal()

void RemoveDecal ( )
private
64 {
65 #ifndef SERVER
66 if (m_Decal)
67 m_Decal.Delete();
68 #endif
69 }
Object m_Decal
Definition UnderObjectDecalSpawnComponent.c:18

Перекрестные ссылки m_Decal.

◆ SpawnDecal()

void SpawnDecal ( )
private
38 {
39 if (m_Decal)
40 return;
41
42 #ifndef SERVER
43 m_Decal = g_Game.CreateObjectEx(
45 m_Parent.GetPosition() + m_Settings.m_PositionOffset,
47 );
48
49 if (m_Decal)
50 {
51 if (m_Settings.m_RandomizeRotation)
52 {
53 vector v;
54 v[0] = Math.RandomFloat(-Math.PI, Math.PI);
55 m_Decal.SetOrientation(v * Math.RAD2DEG);
56 }
57
58 m_Decal.SetScale(m_Settings.m_ScaleMin);
59 }
60 #endif
61 }
const int ECE_LOCAL
Definition CentralEconomy.c:24
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
string GetObjectNameFromSurfaceConfig(string surfaceParamName=SURFACE_PARAM_DECAL_NAME)
Definition UnderObjectDecalSpawnComponent.c:28
ref UnderObjectDecalSpawnSettings m_Settings
Definition UnderObjectDecalSpawnComponent.c:15
Definition EnMath.c:7
Definition EnConvert.c:106
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static const float PI
Definition EnMath.c:12
static const float RAD2DEG
Definition EnMath.c:16

Перекрестные ссылки ECE_LOCAL, ECE_PLACE_ON_SURFACE, g_Game, GetObjectNameFromSurfaceConfig(), m_Decal, m_Parent, m_Settings, Math::PI, Math::RAD2DEG и Math::RandomFloat().

◆ UnderObjectDecalSpawnComponent()

void UnderObjectDecalSpawnComponent ( notnull UnderObjectDecalSpawnSettings pSettings,
notnull Object pParent )
private
23 {
26 }

Перекрестные ссылки m_Parent и m_Settings.

Используется в EEInit() и OnItemLocationChanged().

◆ UpdateSize()

void UpdateSize ( float pScaleValue)
private
72 {
73 #ifndef SERVER
74 if (m_Decal)
75 {
77 {
78 m_LastScaleValue = m_Decal.GetScale();
79 m_Decal.SetScale(Math.Clamp(pScaleValue, m_Settings.m_ScaleMin, m_Settings.m_ScaleMax));
80 }
81 }
82 #endif
83 }
float m_LastScaleValue
Definition UnderObjectDecalSpawnComponent.c:20
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), m_Decal, m_LastScaleValue и m_Settings.

Переменные

◆ m_Decal

Object m_Decal
protected

Используется в RemoveDecal(), SpawnDecal() и UpdateSize().

◆ m_LastScaleValue

float m_LastScaleValue
private

Используется в UpdateSize().

◆ m_Parent

Object m_Parent
protected

◆ m_Settings

◆ SURFACE_PARAM_DECAL_NAME

class UnderObjectDecalSpawnSettings SURFACE_PARAM_DECAL_NAME = "underObjectDecal"