diff options
author | Stijn Buys <ingar@osirion.org> | 2009-01-28 21:05:04 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-01-28 21:05:04 +0000 |
commit | 97746cd48fcc68df3c427ab3a0e18b939eb7906f (patch) | |
tree | 16b6e100d96366a459ee1e9f65ed84e10dc26feb /src/client | |
parent | 757a712813a0815fc570784ca15676b90a36326a (diff) |
seed random generator on startup,
show loader frame on r_restart,
initial collision detection hooks
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/client.cc | 9 | ||||
-rw-r--r-- | src/client/entitymenu.cc | 1 |
2 files changed, 9 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 ---------------------------------------------------- */ diff --git a/src/client/entitymenu.cc b/src/client/entitymenu.cc index c7df7ab..f727ff3 100644 --- a/src/client/entitymenu.cc +++ b/src/client/entitymenu.cc @@ -17,6 +17,7 @@ EntityMenu::EntityMenu(ui::Widget *parent, const char * label) : ui::Window(pare set_border(false); set_background(false); set_label(label); + set_label("entitymenu"); menu_container = new ui::Container(this); hide(); |