Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-01-28 21:05:04 +0000
committerStijn Buys <ingar@osirion.org>2009-01-28 21:05:04 +0000
commit97746cd48fcc68df3c427ab3a0e18b939eb7906f (patch)
tree16b6e100d96366a459ee1e9f65ed84e10dc26feb /src/client/client.cc
parent757a712813a0815fc570784ca15676b90a36326a (diff)
seed random generator on startup,
show loader frame on r_restart, initial collision detection hooks
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index df56700..24059a5 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -7,8 +7,9 @@
#include <SDL/SDL.h>
#include <iostream>
-#include <cmath>
#include <iomanip>
+#include <cmath>
+#include <cstdlib>
#include "audio/audio.h"
#include "audio/sources.h"
@@ -150,6 +151,10 @@ void Client::run()
{
con_print << "^BRunning client..." << std::endl;
+ // seed random generator
+ unsigned int seed = (unsigned int) SDL_GetTicks();
+ srandom(seed);
+
// default framerate 125fps, 8 milliseconds
Uint32 client_frame_lenght = 8;
@@ -376,6 +381,8 @@ void Client::func_snd_restart(std::string const &args)
void Client::func_r_restart(std::string const &args)
{
video::restart();
+ video::set_loader_message();
+ video::frame_loader();
}
/* ---- func_ui ---------------------------------------------------- */