fireplacelight.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. class FireplaceLight extends PointLightBase
  2. {
  3. static float m_FireplaceRadius = 25;
  4. static float m_FireplaceBrightness = 4.75;
  5. void FireplaceLight()
  6. {
  7. SetVisibleDuringDaylight(false);
  8. SetRadiusTo( m_FireplaceRadius );
  9. SetBrightnessTo(m_FireplaceBrightness);
  10. SetCastShadow(true);
  11. SetFadeOutTime(5);
  12. SetDiffuseColor(1.3, 0.35, 0.15);
  13. SetAmbientColor(1.3, 0.35, 0.15);
  14. SetFlareVisible(false);
  15. SetFlickerAmplitude(0.3);
  16. SetFlickerSpeed(0.9);
  17. SetExteriorMode();
  18. EnableHeatHaze(true);
  19. SetHeatHazeRadius(0.23);
  20. SetHeatHazePower(0.010);
  21. }
  22. // Use this mode when the light is in tight space like barrel, chimney or improvsed oven
  23. void SetInteriorMode()
  24. {
  25. SetDancingShadowsMovementSpeed(0.05);
  26. SetDancingShadowsAmplitude(0.05);
  27. }
  28. // Use this mode when fireplace is on the ground with plenty of space for the light to wiggle around
  29. void SetExteriorMode()
  30. {
  31. SetDancingShadowsMovementSpeed(0.25);
  32. SetDancingShadowsAmplitude(0.10);
  33. }
  34. /*override void OnFrameLightSource(IEntity other, float timeSlice)
  35. {
  36. }*/
  37. }