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

◆ InitializeParticles()

void InitializeParticles ( )
protected

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

175 {
176 if (g_Game.IsDedicatedServer())
177 return;
178
180
181 m_DrownEnginePos = m_VFXComponent.ConvertMemPointToPosition("engine");
182
183 vector exhaustPosition = m_VFXComponent.ConvertMemPointToPosition("ptcExhaust_end");
184 vector exhaustDirection;
185 if (exhaustPosition != vector.Zero)
186 {
187 vector exhaustStart = m_VFXComponent.ConvertMemPointToPosition("ptcExhaust_start");
188 vector tempOri = vector.Direction(exhaustStart, exhaustPosition);
189
190 exhaustDirection[0] = -tempOri[2];
191 exhaustDirection[1] = tempOri[1];
192 exhaustDirection[2] = tempOri[0];
193
194 exhaustDirection = exhaustDirection.Normalized().VectorToAngles();
195 }
196 else
197 exhaustDirection = "1 1 1";
198
199 m_VFXComponent.RegisterEffect(EVehicleVFXEffect.DUST_BEHIND, EffVehicleDust, new VehicleVFXDataParams(m_VFXComponent.ConvertMemPointToPosition("ptcDustPos")));
200 m_VFXComponent.RegisterEffect(EVehicleVFXEffect.ENGINE_SMOKE, EffEngineSmoke, new VehicleVFXDataParams(m_VFXComponent.ConvertMemPointToPosition("ptcEnginePos")));
201 m_VFXComponent.RegisterEffect(EVehicleVFXEffect.EXHAUST_SMOKE, EffExhaustSmoke, new VehicleVFXDataParams(exhaustPosition, exhaustDirection));
202
203 m_VFXComponent.RegisterEffectGroup(EVehicleVFXEffectGroup.WHEEL_SMOKE, EffWheelSmoke, WheelCount(), new VehicleVFXDataParams(vector.Zero, "0 1 -1", 5.0));
204 m_VFXComponent.RegisterEffectGroup(EVehicleVFXEffectGroup.WHEEL_CONTACT, EffWheelContact, WheelCount(), new VehicleVFXDataParams(vector.Zero, vector.Up, 5.0));
205 }
DayZGame g_Game
Определения DayZGame.c:4074
EVehicleVFXEffect
Identifiers of individual vehicle VFX effects.
Определения EVehicleVFXTypes.c:3
proto native int WheelCount()
How many wheel can be attached to a motorbike (hubs only)
ref VehicleVFXComponent m_VFXComponent
Определения MotorbikeScript.c:76
static vector m_DrownEnginePos
Определения MotorbikeScript.c:80
void VehicleVFXDataParams(vector position=vector.Zero, vector orientation=vector.Up, float cooldownSec=0.0)
Определения VehicleVFXComponent.c:88
Определения EngineSmoke.c:2
Определения ExhaustSmoke.c:2
Определения VehicleDust.c:2
Определения EffWheelContact.c:2
Определения WheelSmoke.c:2
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
static const vector Zero
Определения EnConvert.c:123
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
Определения EnConvert.c:254
static const vector Up
Определения EnConvert.c:120
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
Определения EnConvert.c:119

Перекрестные ссылки vector::Direction(), g_Game, m_DrownEnginePos, m_VFXComponent, vector::Normalized(), vector::Up, vector::VectorToAngles(), VehicleVFXDataParams(), WheelCount() и vector::Zero.

Используется в Car::CarScript() и MotorbikeScript().