DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CreateLight()

void Chemlight_ColorBase::CreateLight ( )
inlineprivate

См. определение в файле ChemLight.c строка 66

67 {
68 SetObjectMaterial( 0, GetMaterialForDamageState(true) ); // must be server side!
69
70 if ( !GetGame().IsServer() || !GetGame().IsMultiplayer() ) // client side
71 {
72 m_Light = ChemlightLight.Cast( ScriptedLightBase.CreateLight( ChemlightLight, "0 0 0") );
73 m_Light.AttachOnMemoryPoint(this, "light");
74
75 string type = GetType();
76
77 switch( type )
78 {
79 case "Chemlight_White":
80 m_Light.SetColorToWhite();
81 break;
82 case "Chemlight_Red":
83 m_Light.SetColorToRed();
84 break;
85 case "Chemlight_Green":
86 m_Light.SetColorToGreen();
87 break;
88 case "Chemlight_Blue":
89 m_Light.SetColorToBlue();
90 break;
91 case "Chemlight_Yellow":
92 m_Light.SetColorToYellow();
93 break;
94
95 default: { m_Light.SetColorToWhite(); };
96 }
97 }
98 }
eBleedingSourceType GetType()
Определения BleedingSource.c:63
string GetMaterialForDamageState(bool glowing, int healthLevel=-1)
Определения ChemLight.c:165
ChemlightLight m_Light
Определения ChemLight.c:6
proto native CGame GetGame()

Перекрестные ссылки GetGame(), GetMaterialForDamageState(), GetType() и m_Light.

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