From 2906a2d0071440c0ee37bf50fa50015f7fbed9f6 Mon Sep 17 00:00:00 2001 From: Christian Schmitt Date: Fri, 14 Sep 2012 10:14:31 +0200 Subject: [PATCH] pt_lights: add some randomness to the blinking interval of the hold short lights --- simgear/scene/tgdb/pt_lights.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/scene/tgdb/pt_lights.cxx b/simgear/scene/tgdb/pt_lights.cxx index 925d3e20..c6dd87c6 100644 --- a/simgear/scene/tgdb/pt_lights.cxx +++ b/simgear/scene/tgdb/pt_lights.cxx @@ -548,7 +548,8 @@ SGLightFactory::getHoldShort(const SGDirectionalLightBin& lights) if (lights.getNumLights() < 2) return 0; - float flashTime = 2; + sg_srandom(unsigned(lights.getLight(0).position[0])); + float flashTime = 2 + 0.1 * sg_random(); osg::Sequence* sequence = new osg::Sequence; sequence->setDefaultTime(flashTime); Effect* effect = getLightEffect(6, osg::Vec3(1, 0.001, 0.000002), -- 2.39.5