--- src/game/game_blitz.cpp | 3 +-- src/game/game_classic.cpp | 3 +-- src/map/wind.cpp | 4 +++- 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/game/game_blitz.cpp b/src/game/game_blitz.cpp index ff146b3..71a0321 100644 --- a/src/game/game_blitz.cpp +++ b/src/game/game_blitz.cpp @@ -163,8 +163,7 @@ void GameBlitz::__SetState_PLAYING() { MSG_DEBUG("game.statechange", "Playing" ); - if (Network::GetInstance()->IsTurnMaster() || Network::GetInstance()->IsLocal()) - Wind::GetRef().ChooseRandomVal(); + Wind::GetRef().ChooseRandomVal(); SetCharacterChosen(false); diff --git a/src/game/game_classic.cpp b/src/game/game_classic.cpp index 4ab92b3..913b008 100644 --- a/src/game/game_classic.cpp +++ b/src/game/game_classic.cpp @@ -150,8 +150,7 @@ void GameClassic::__SetState_PLAYING() Interface::GetInstance()->EnableDisplayTimer(true); pause_seconde = Time::GetInstance()->Read(); - if (Network::GetInstance()->IsTurnMaster() || Network::GetInstance()->IsLocal()) - Wind::GetRef().ChooseRandomVal(); + Wind::GetRef().ChooseRandomVal(); SetCharacterChosen(false); diff --git a/src/map/wind.cpp b/src/map/wind.cpp index 3e69b9c..9c518b0 100644 --- a/src/map/wind.cpp +++ b/src/map/wind.cpp @@ -27,6 +27,7 @@ #include "include/action_handler.h" #include "map/map.h" #include "map/maps_list.h" +#include "network/randomsync.h" #include <WORMUX_debug.h> #include <WORMUX_random.h> #include "tool/resource_manager.h" @@ -218,7 +219,8 @@ void Wind::Reset() void Wind::ChooseRandomVal() { - SetVal(RandomLocal().GetLong(-100, 100)); + MSG_DEBUG("random.get", "Wind::ChooseRandomVal()"); + SetVal(RandomSync().GetLong(-100, 100)); } void Wind::DrawParticles() -- 1.6.0.4 _______________________________________________ Wormux-dev mailing list Wormux-dev@gna.org https://mail.gna.org/listinfo/wormux-dev