|
From: Tapio V. <aa...@us...> - 2009-11-08 08:31:13
|
Module: performous
Branch: dance
Commit: d810cb85072925167709eb6cfd9c2403b81cc901
Author: Tapio Vierros <tap...@gm...>
Date: Sat Nov 7 16:03:47 2009 +0200
Seed the rng with time(), so that the backgrounds are randomized differently on each run.
---
game/backgrounds.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/game/backgrounds.cc b/game/backgrounds.cc
index 8450234..a854442 100644
--- a/game/backgrounds.cc
+++ b/game/backgrounds.cc
@@ -12,6 +12,7 @@
#include <sstream>
#include <stdexcept>
#include <cstdlib>
+#include <ctime>
void Backgrounds::reload() {
if (m_loading) return;
@@ -47,6 +48,7 @@ void Backgrounds::reload_internal() {
m_loading = false;
{
boost::mutex::scoped_lock l(m_mutex);
+ std::srand(time(NULL));
random_shuffle(m_bgs.begin(), m_bgs.end());
m_dirty = false;
m_bgiter = 0;
|