318 Commits

Author SHA1 Message Date
Gunter Labes
beb1e6bb3b properly applied patch #1100 by Broodkiller
(implements bug #11817: Allow [item]s to be visible only to specified
teams)

  * fixed overlay initialization order

  * fixed some whitespace issues

  * added a changelog entry
2008-08-31 01:02:55 +00:00
Ignacio R. Morelle
6e6a257aea Revert patch #1100 2008-08-30 23:08:54 +00:00
Lari Nieminen
aad18fe6f4 Applied patch #1100. 2008-08-30 20:35:23 +00:00
Mark de Wever
81c6a850ab MSVC 6 cleanup.
Now that MSVC 6 is no longer supported start to remove some helper code
to work around problems in that compiler. The first step is to comment
out the code and replace it with new helper code that uses the standard.
The second step is to remove the helper code and fix all callers.

Patch 2/3 for step 2: Remove minimum and maximum and fix all callers.
2008-08-24 16:12:13 +00:00
Sergey Popov
13eb07e593 Fixed off-by-one error. 2008-08-23 14:32:25 +00:00
Eric S. Raymond
69c4c81fa6 Fix bug #11175 (Strange Statistic Losses).
Statistics are now associated with side ID (team leader description)
rather than team number.
2008-08-21 23:13:07 +00:00
Eric S. Raymond
9d8d004734 Address incorrect use of carryover bonus in bug #11607. 2008-08-20 14:37:02 +00:00
Eric S. Raymond
5b30b5f85b Implement the cosmetic changes suggested in bug #11607. 2008-08-19 05:10:51 +00:00
Mark de Wever
1529f89a6e Initialize all members. 2008-08-10 13:22:16 +00:00
Ignacio R. Morelle
f2f8adc673 [[victory music and endlevel fixes]]
* Made victory music not play on 'continue' endlevel result.

* Victory music will no longer play on replay/observation, either.

* Victory music will play after the commands of the 'victory' WML
  event handler are finished.

* Added some const qualifiers around.

* Output an error message if [endlevel] is used in the 'defeat' WML
  event handler.
2008-08-05 21:59:10 +00:00
Ignacio R. Morelle
7e827b89f6 Engine automatically plays special music on defeat or victory;
default lists from which an option is randomly chosen at runtime are
provided as the default_victory_music and default_defeat_music
attributes in [game_config] node; this may be overriden per-scenario
using the victory_music and/or defeat_music attributes on its code -
it can also be overriden in a [endlevel] block by providing a music=
attribute with the desired list (feature request/bug #11203).
2008-07-27 17:59:46 +00:00
Mark de Wever
3818f7cf6c Initialize all members. 2008-07-22 19:34:54 +00:00
Greg Copeland
d7b2b2006c Further refinement of ai_manager.
It is now called for all AIs and the AI in turn informs the manager if
it should be managed. This decouples the manager from specific AI
implementation knowledge.
2008-07-08 23:10:17 +00:00
Greg Copeland
b0abbdae36 Fixed key-collision in ai_manager...
...which would cause an AI to be incorrectly reused by another
team. Added a method to allow the ai_manager to detect if an AI
requests management by the ai_manager. Lastly, added a hook to allow
the ai_manager to clean up AI resources prior to playsingle_controller
destruction.  Formula_ai now has method to inform ai_manager it wishes
to be managed.
2008-07-08 22:15:38 +00:00
Bartek Waresiak
f1b67e3edd Made possible to fallback from ai to human player for testing purposes 2008-07-04 21:23:40 +00:00
Pauli Nieminen
388d67f190 Changed scons build to include libwesnoth_extras
Added code to send timed fake SDL events (This still needs to be moved
to src/tests/utils/)
2008-07-03 20:57:50 +00:00
Pauli Nieminen
551251f978 Removed persistent from team configuration (bug: #10916)
Added support for multiple sides per client in MP start

Added support for reserving slots when reloading game
2008-06-28 19:13:15 +00:00
Douglas Hains
bbd43e16c9 Changed ai objects to use intrusive pointers as opposed to shared pointers 2008-06-18 01:59:16 +00:00
Douglas Hains
ba13c23261 made Formula AI object persistant
Other AI types remain unchanged, with the exception they now use a
boost::shared_ptr instead of util::scoped_ptr
2008-06-17 04:54:45 +00:00
Mark de Wever
f51424571c Update doxygen comment style. 2008-06-15 13:24:28 +00:00
Tomasz Śniatowski
7e40dab1a6 changed std::cerr to LOG_NG 2008-05-27 20:37:07 +01:00
Ali El Gariani
8a027095cf New hotkey for debugging: "Custom command" which execute a saved command.
With a new command: "custom <command>" to assign a command to this hotkey.

examples: "custom refresh" or "custom create Troll" etc...

This custom command is saved in preferences.
2008-04-30 03:52:10 +00:00
Gunter Labes
469fc378fb redo parts of 2008-02-03T21:36:06Z!patrick_x99@hotmail.com, 2008-02-16T08:47:16Z!koraq@xs4all.nl and 2008-03-01T15:45:18Z!martinxyz@gmx.ch...
...that have been reverted by the formula ai merge
2008-04-25 01:55:51 +00:00
Ali El Gariani
9fc40d39ef Continue to clean 2008-03-03T05:40:29Z!davewx7@gmail.com
This fix the revert of 2008-02-08T18:54:06Z!martinxyz@gmx.ch

playsingle_controller.cpp cleaned
2008-04-24 19:01:30 +00:00
Ali El Gariani
78ea02f7d8 replace draw()+update_display() by a draw() forcing the update
(this spare a useless screen refresh)
2008-04-21 21:55:02 +00:00
Jörg Hinrichs
95bf75315f Lazy loading for unit_types Step 2:
Rename game_data to unit_type_data and make it a singleton to prevent
passing the same instance throughout the whole code and make
subsequent optimization less painful.
2008-03-30 13:49:03 +00:00
Ignacio R. Morelle
93b26eba79 Most boolean WML attribute probes use the standard util::string_bool() now
[set_variable] accepts string_length=

[variable] accepts boolean_not_equals=

[modify_side] can set a side's AI parameters now, using the [ai]
syntax as side declarations do (patch #984)
2008-03-06 11:14:52 +00:00
David White
5c0df60c23 initial branch changes 2008-01-28 03:04:25 +00:00
Elias Pschernig
cfcd5afae6 Prevent --nogui to appear frozen. 2008-01-26 20:56:10 +00:00
Martin Renold
da45161ceb Removed two unused parameters from paths::paths().
Also remove them from functions that only had it because... etc.
2008-01-26 11:50:36 +00:00
Pauli Nieminen
4803f989b1 Fixed turn timer and end_turn commands order (bug #10849) 2008-01-22 12:57:44 +00:00
Martin Renold
8b07903f7f erase the footsteps of a many-turn move after moving them at start of turn 2008-01-20 20:19:21 +00:00
uso
c032d4dcce reset turn statistics also in replays,
reset it in one place per play controller
2008-01-17 01:26:06 +00:00
Mark de Wever
15806f7730 Make sure the team number is reset in single player linger mode
(bug #10692).
2008-01-13 07:19:35 +00:00
Mark de Wever
89ad461d00 Disable some menu items in linger mode, fixes bug #10438. 2008-01-13 06:19:00 +00:00
Mark de Wever
29e7c90487 Fixed the MP campaign gold carry over (bug #10677). 2008-01-11 20:03:00 +00:00
Mark de Wever
4cbc84c441 When a leader dies the villages,
...which no longer are owned, are properly redrawn (bug #9136).
2008-01-11 13:22:08 +00:00
uso
1a8b179a51 add damage statistics for the current turn...
...and show it in the statistics window
2008-01-11 02:31:03 +00:00
Gunter Labes
f5b3f14808 don't skip over dead sides (no units)...
...but issue an end_turn command (fixes wrong turn numbers being
displayed in the server lobby, maybe doesn't introduce new bugs..)
2008-01-09 03:19:29 +00:00
Mark de Wever
a1d37a3b14 Unclutter includes. 2007-12-22 17:48:45 +00:00
Mark de Wever
9822e57712 Unclutter includes. 2007-12-22 16:04:59 +00:00
Mark de Wever
a20027e829 Change the client to send gzipped data to the MP server now.
This works with older clients on the server as well.
New client directly with old client probably won't work (untested).
2007-12-08 19:47:43 +00:00
Mark de Wever
7b12cffb91 Updated the network code to handle gzipped data instead of binary wml.
Nobody sends it yet, but the server can receive it, once the server
has been restarted there will be another commit to make the clients
send gzipped data to the server.

There's a config variable to change the server to send gzipped data as
well. On the trunk server this switch can be set once everybody had
some time to update their clients.

Once 1.3.12 is no longer allowed on the server this can also be set on
the 1.3 server. Once it's no longer allowed there the server will be
modified to only send gzipped data and the switch removed.

(The campaign server won't be modified at this moment.)

NOTE *campaign server and server need to be included
serialization/binary_or_text.cpp*
2007-12-08 17:42:36 +00:00
uso
cd61435bf3 allow to use team labels also for 1-player-teams (bug #9747) 2007-12-03 01:07:55 +00:00
Jörg Hinrichs
29f5b458a3 This fixes bug #10354 (loading linger-mode saves loses branch choices)
...and gets rid of a couple of ugly work arounds. Adding next_scenario
to the gamestate made them obsolete.
2007-12-01 08:27:12 +00:00
Jörg Hinrichs
ba9e26a0cd fixes the gold carry-over problem with linger mode...
...and removes another bit of the savegame mess.
2007-11-29 22:05:32 +00:00
Eric S. Raymond
12d0d1929e Minor code cleanup of vicrory reporting. 2007-11-26 22:32:47 +00:00
Eric S. Raymond
93918352aa Fix some messages. 2007-11-26 10:25:46 +00:00
Eric S. Raymond
77955165ee Make sure the status line is properly updated as we enter linger mode. 2007-11-26 06:48:09 +00:00
Mark de Wever
b7c86f8088 In linger mode a new overlay is used to see the difference between
playing and lingering.

Did some minor cleanups.
2007-11-24 09:34:50 +00:00