land_fuelstation_feed.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. class Land_FuelStation_Feed extends FuelStation
  2. {
  3. override void EEKilled(Object killer)
  4. {
  5. super.EEKilled(killer);
  6. Explode(DamageType.EXPLOSION, "LandFuelFeed_Ammo");
  7. }
  8. override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
  9. {
  10. super.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
  11. if ( !GetGame().IsDedicatedServer() )
  12. {
  13. vector n = surfNormal.VectorToAngles() + "0 90 0";
  14. Particle p1 = ParticleManager.GetInstance().PlayInWorld(ParticleList.SMOKE_GENERIC_WRECK, pos);
  15. p1.SetOrientation(n);
  16. Particle p2 = ParticleManager.GetInstance().PlayInWorld(ParticleList.EXPLOSION_LANDMINE, pos);
  17. p2.SetOrientation(n);
  18. Particle p3 = ParticleManager.GetInstance().PlayInWorld(ParticleList.IMPACT_METAL_RICOCHET, pos);
  19. p3.SetOrientation(n);
  20. Particle p4 = ParticleManager.GetInstance().PlayInWorld(ParticleList.IMPACT_GRAVEL_RICOCHET, pos);
  21. p4.SetOrientation(n);
  22. }
  23. }
  24. //! Returns true if this stand is functional
  25. bool HasFuelToGive()
  26. {
  27. return !IsRuined();
  28. }
  29. override int GetLiquidSourceType()
  30. {
  31. if (HasFuelToGive())
  32. return super.GetLiquidSourceType();
  33. return LIQUID_NONE;
  34. }
  35. };
  36. class Land_FuelStation_Feed_Enoch : Land_FuelStation_Feed {};