diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-10 12:06:56 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-10 12:06:56 (GMT) |
commit | ef0a51654783f942499cfa9fca60d18c2fa6a702 (patch) | |
tree | 1fd8158f883562a3ef000b0a4d26df5b1f064dae /examples | |
parent | 53632d45ca64ad4c20d4302e0826c0234877dd69 (diff) | |
parent | 62725a02652cee576efe055d1371765945045026 (diff) | |
download | Qt-ef0a51654783f942499cfa9fca60d18c2fa6a702.zip Qt-ef0a51654783f942499cfa9fca60d18c2fa6a702.tar.gz Qt-ef0a51654783f942499cfa9fca60d18c2fa6a702.tar.bz2 |
Merge commit 'qt-mainline/master' into master-recursivepaint
Diffstat (limited to 'examples')
-rw-r--r-- | examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp b/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp index d360de9..2368608 100644 --- a/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp +++ b/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp @@ -42,13 +42,12 @@ #include "random_ai_plugin.h" #include <QState> +#include <QTime> #include <QtPlugin> -#include <time.h> - QState *RandomAiPlugin::create(QState *parentState, QObject *tank) { - qsrand(uint(time(NULL))); + qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); QState *topLevel = new QState(parentState); |