From 5a099735d5457298b87a33884356ff29417143e6 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 23 Mar 2008 22:24:13 +0000 Subject: strobe lights --- src/render/draw.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/render') diff --git a/src/render/draw.cc b/src/render/draw.cc index 8a03e40..e904888 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -171,9 +171,11 @@ void draw_model_lights(core::Entity *entity) gl::begin(gl::Points); for (std::list::iterator lit = model->model_light.begin(); lit != model->model_light.end(); lit++) { - math::Vector3f location = (*lit)->location(); - gl::color((*lit)->color()); - gl::vertex(location); + if (!(*lit)->strobe() || (( core::application()->time() - floorf(core::application()->time()) ) < 0.5f)) { + math::Vector3f location = (*lit)->location(); + gl::color((*lit)->color()); + gl::vertex(location); + } } gl::end(); -- cgit v1.2.3