From 5bec10de6c9dfe7869d0f95f94b2657f51758e62 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Thu, 18 Feb 2010 07:34:36 +0000 Subject: [PATCH] FS#153 - Fix the initial seed of sf::Randomizer which is always the same on some configurations git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1412 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/System/Randomizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SFML/System/Randomizer.cpp b/src/SFML/System/Randomizer.cpp index 93500bce..18bbe9c5 100644 --- a/src/SFML/System/Randomizer.cpp +++ b/src/SFML/System/Randomizer.cpp @@ -26,8 +26,8 @@ // Headers //////////////////////////////////////////////////////////// #include -#include -#include +#include +#include namespace @@ -35,7 +35,7 @@ namespace // Set the random numbers sequence seed with the current system time, so that it is always different unsigned int SetRandomSeed() { - unsigned int Seed = static_cast(sf::priv::Platform::GetSystemTime() * 1000); + unsigned int Seed = static_cast(time(NULL)); srand(Seed); return Seed; }