4 [
Attribute(
"{40318DDE45FF4CC3}Particles/Enviroment/Lamp_fire_normal.ptc", UIWidgets.ResourceNamePicker,
"Prefab of fire particle used for a fire action.",
"ptc")]
5 protected ResourceName m_sParticle;
7 [
Attribute(
"0 0.1 0", UIWidgets.EditBox,
"Particle offset in local space from the origin of the entity")]
8 protected vector m_vParticleOffset;
12 ResourceName GetParticle()
19 vector GetParticleOffset()
21 return m_vParticleOffset;
25 class SCR_LampComponent : SCR_BaseInteractiveLightComponent
31 override void ToggleLight(
bool turnOn,
bool skipTransition =
false,
bool playSound =
true)
36 super.ToggleLight(turnOn, skipTransition, playSound);
39 if (System.IsConsoleApp())
59 ParticleEffectEntitySpawnParams spawnParams =
new ParticleEffectEntitySpawnParams();
60 spawnParams.TargetWorld =
GetOwner().GetWorld();
62 Math3D.MatrixIdentity4(spawnParams.Transform);
63 spawnParams.Transform[3] = componentData.GetParticleOffset();
65 m_pFireParticle = ParticleEffectEntity.SpawnParticleEffect(componentData.GetParticle(), spawnParams);
85 override bool RplLoad(ScriptBitReader reader)
89 reader.ReadBool(isOn);
98 super.OnDelete(owner);