21 Commits

Author SHA1 Message Date
Tomasz Śniatowski
6c82272234 Server side RNG, client part draft.
There are two different approaches here:

 - in the AI code, the attack is queued, sent to the server and then
   the attacking code waits for a new random seed o arrive, polling UI
   events and syncing network in a loop.

 - in the player code, the actual attak procedure is delayed until
   after a new seed arrives by means of a callback that is called when
   a seed message is received. This is potentially problematic as, for
   example, commands need to be disabled across different scopes.
2009-07-19 22:09:31 +01:00
Tomasz Śniatowski
5ae38e8898 split random.hpp into creating separate headers...
...for the rng and simple_rng class
2009-07-18 16:48:14 +01:00
Mark de Wever
973a0a7d5c Remove trailing whitespace. 2009-01-01 10:28:26 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Greg Copeland
7c36c0f0ef Minor code clean up.
Added namespace 'rand_rng' to random.[ch]pp and changed callers
accordingly. Functions declared in random.[ch]pp are left in default
namespace.

This was part of a potential RNG bug hunt which turned up empty.  The
namespace helps prevent some potential ambiguities as we have classes
declared using lower case and methods of the same name and case. The
namespace allows for non-ambiguous reference with the class.
2008-07-24 14:39:17 +00:00
Mark de Wever
878d14ae5c Update doxygen comment style. 2008-06-07 14:58:51 +00:00
Jörg Hinrichs
64ca3423ac race should not depend on game_state.
This refactoring tries to fix that. It creates an own class for the
rng part of game_state that is used within race. This still needs to
be checked (Mordante will do that soon). If this commit causes all
kinds of weird problems (i don't think so, but you never know), feel
free to revert it.
2008-04-02 22:10:35 +00:00
Mark de Wever
001af46e6e Updated all headers to 2008. 2008-02-16 08:47:16 +00:00
Gunter Labes
ae9e10f260 codeclean run
set svn:eol-style to native where missing
2007-08-31 19:09:40 +00:00
Hans Joachim Gurt
0d3b418b1e doxygen, comments 2007-08-17 13:59:59 +00:00
Mark de Wever
080eb69f60 Updated the headers to state GPL 2+ and a few changelog cleanups. 2007-08-15 13:41:56 +00:00
Mark de Wever
bb01934b85 A rather large update which updates the copyright info
* Wesnoth is distributed under the terms of the GPL version 2, made
  that more explicit

* updated the copyright range to 2007

* updated Dave's email adress
2007-07-21 07:28:04 +00:00
Patrick Parker
9f08e18ded silene's patch #708: appease some compiler warnings in GCC 2007-03-31 16:09:13 +00:00
Bruno Wolff III
7d7150ac36 Fix off by one error in the new random code. 2005-11-13 17:11:54 +00:00
Bruno Wolff III
b49fe3bc50 Fix issue in rng class...
...where get_results and set_results tried to use the next [random]
child rather than the current one.
2005-11-13 14:50:45 +00:00
Bruno Wolff III
7e38bfec91 I changed the way get_random works to not nest [random] tags,
...rather to keep them as siblings. The code is also easier to
understand now. This solves a problem with lots of get_random calls
resulting in [random] tags being nested so deeply that compressed save
files can't be made.  Also there were a couple of files that didn't
have newlines after the last line that I corrected.
2005-11-13 08:16:12 +00:00
András Salamon
8d25fb99a6 codeclean in src, mostly Dave's new email address (checked with cvs diff -b)
BY THE WAY, many of the source files have no copyright headers!
2005-07-02 21:37:20 +00:00
András Salamon
8bd9bc98a5 ran codeclean against files 2005-06-04 19:16:06 +00:00
Guillaume Melquiond
0453a7b4cc Flat random generator:
...only one [random] structure with a comma-separated list in 'value',
instead of nested structures. There is still some nesting when a
[results] structure is needed. This new scheme should reduce the size
of the replay and avoid hitting the nesting limit. It is supposed to
be backward-compatible, hence a bit of complexity.
2005-04-30 12:31:20 +00:00
Philippe Plantier
ccd9784b03 Added a checksum mechanism for checking recruited units.
As it was not really playtested, make it only log the errors, but not
throw them.
2005-04-23 12:13:10 +00:00
Yann Dirson
767e245049 split a new rng class out of replay, sanitized a bit the deps using this 2005-03-22 22:09:28 +00:00