Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
land_fuelstation_feed.c
Go to the documentation of this file.
1 class Land_FuelStation_Feed extends FuelStation
2 {
3  override void EEKilled(Object killer)
4  {
5  super.EEKilled(killer);
6 
7  Explode(DT_EXPLOSION, "LandFuelFeed_Ammo");
8  }
9 
10  override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
11  {
12  super.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
13  if ( !GetGame().IsDedicatedServer() )
14  {
15  vector n = surfNormal.VectorToAngles() + "0 90 0";
16  Particle p1 = ParticleManager.GetInstance().PlayInWorld(ParticleList.SMOKE_GENERIC_WRECK, pos);
17  p1.SetOrientation(n);
18 
19  Particle p2 = ParticleManager.GetInstance().PlayInWorld(ParticleList.EXPLOSION_LANDMINE, pos);
20  p2.SetOrientation(n);
21 
22  Particle p3 = ParticleManager.GetInstance().PlayInWorld(ParticleList.IMPACT_METAL_RICOCHET, pos);
23  p3.SetOrientation(n);
24 
25  Particle p4 = ParticleManager.GetInstance().PlayInWorld(ParticleList.IMPACT_GRAVEL_RICOCHET, pos);
26  p4.SetOrientation(n);
27  }
28  }
29 
31  bool HasFuelToGive()
32  {
33  return !IsRuined();
34  }
35 };
GetGame
proto native CGame GetGame()
Particle
Legacy way of using particles in the game.
Definition: particle.c:6
Explode
override void Explode(int damageType, string ammoType="")
Definition: trap_landmine.c:220
ParticleList
Definition: particlelist.c:11
vector
Definition: enconvert.c:105
Object
Definition: objecttyped.c:1
EEKilled
override void EEKilled(Object killer)
Definition: remotedetonator.c:242
FuelStation
Definition: land_fuelstation_feed.c:1
ParticleManager
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition: particlemanager.c:84
OnExplosionEffects
override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
Definition: destructioneffects.c:39