358 Commits

Author SHA1 Message Date
Eric S. Raymond
9223460daa Remove unused headers. 2008-11-09 04:35:13 +00:00
Tomasz Śniatowski
01e504ede6 remove some map.hpp dependencies,
...also separated viewpoint and map_exception classes from map.hpp
into separate headers (no cpp files)
2008-10-17 17:53:08 +01:00
Tomasz Śniatowski
c54a538139 Refactor gamemap::location -- rename to map_location,
...move into separate cpp/hpp pair. The code under src/ was modified
mainly using a global search-and-replace. This change allows reducing
code dependencies and gets rid of inner-class confusion (parts of the
code had to use "location" when referring to gamemap::location, it is
now consistent across the codebase.)
2008-10-15 17:38:51 +01:00
Gunter Labes
20a469cfa5 allow replays to contain moves with identical source and destination 2008-09-26 15:10:25 +00:00
Pauli Nieminen
7618bbad51 Fixed unit map copying causing double free 2008-09-02 20:31:24 +00:00
Pauli Nieminen
af509f431c Fixed multiplayer replay switching to next side after victory/defeat,
...removed bogus end turn caused by linger mode (bug #9157)
2008-09-02 20:28:24 +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
41faaa4677 Initialize all members. 2008-07-23 17:30:15 +00:00
Ali El Gariani
3fb8f8649e Fix an old (1.2) but serious pathfinding bug with the replay/MP code:
It didn't use the same pathfinding solution as the local UI.

This gave visually different moves, and in worst case scenario, causes
enemy to pass through your invisible units (other player didn't really
took this path) This also activate the new smart pathfinding features
for replay moves and is much faster (~10x often more)
2008-07-07 22:21:26 +00:00
Pauli Nieminen
a1bc67cecc Fixed chatlog not to so lobby joins if set in preferences 2008-06-11 23:43:48 +00:00
Mark de Wever
af90a85235 Update doxygen comment style. 2008-05-25 18:01:50 +00:00
Patrick Parker
afbc8117f1 fix a long-standing conditional precedence error...
...that was introduced in 2007-07-03T18:33:02Z!sirhawkeye64@yahoo.com (and perpetuated by
2007-12-26T06:10:11Z!paniemin@cc.hut.fi and 2008-03-19T17:44:45Z!bruno@wolff.to).

revert 2008-05-03T04:11:52Z!patrick_x99@hotmail.com since it apparently didn't work
2008-05-03 06:30:16 +00:00
Patrick Parker
1871352d07 a potential OOS fix for [allow_undo] in meu item commands. 2008-05-03 04:11:52 +00:00
Jérémy Rosen
b6ecd22b45 commit patch 1029 by segfault (create a separate prerecall and recall event) 2008-04-04 19:09:53 +00:00
Jörg Hinrichs
7e491a85c4 Cleaning up the unit_type stuff, to provide a much better encapsulation:
- get rid of redundant functionality

- make the unit_type_data interface more easily accessible

- reduce the public interface of unit_type_data

- rename unit_type_factory to unit_type_map_wrapper

- add a whole lot of "const"
2008-04-01 21:51:29 +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
Bruno Wolff III
c20311777f Silence gcc 4.3 warning by adding parens around && clause near ||. 2008-03-19 17:44:45 +00:00
Eric S. Raymond
0481391922 Fix the recall (Alt-R was broken since 2008-03-13T07:44:33Z!esr@thyrsus.com) problem...
...by using id= everywhere, rather than description=, as the attribute
for both team and side IDs.  Note: This will almost certainly break MP
compatibility.
2008-03-18 22:16:22 +00:00
Eric S. Raymond
b2b55e5996 description= -> name in [unit]
This will cause unit names to be displayed incorrectly from savefiles made 
since 2008-03-14T01:38:17Z!esr@thyrsus.com.  It was either that or break compatibility with 1.3/1.4 
savefiles.
2008-03-15 20:30:45 +00:00
Martin Renold
ccc5edbe79 Clear the unit visiblilty cache after moves.
Fixes a glitch sometimes when ambushed, the uncovered would
not show up. (I got a savegame where it always happens.)
2008-03-01 15:45:18 +00:00
Jörg Hinrichs
07ed7c6b0f This adds some debug output i found useful when tackling bugs. 2008-02-29 23:45:56 +00:00
Pauli Nieminen
5a21c8f74f Fixed chat log viewing crash after undo 2008-02-20 12:31:21 +00:00
Mark de Wever
001af46e6e Updated all headers to 2008. 2008-02-16 08:47:16 +00:00
Martin Renold
138cedfd8f display::scroll_to_tiles() perfectionism to do better scrolling
* ONSCREEN scrolls go into 50% center region instead of perfectly into
  the center

* do the minimum possible number of scrolls if a move path does not
  fit on-screen

* make fights always have 1/2 hex visible space around them In my
  tests the number of scrolls did go down by about 5%, and the median
  scrolling distance about 30%.
2008-02-10 20:08:32 +00:00
Pauli Nieminen
90e7897691 Optimized MP chat log building (helps bug #10430) 2008-02-05 14:34:38 +00:00
Patrick Parker
9f72c5331a now allow configs to be streamed directly to an ostream
remove an iterator redefinition

remove a pointless debug calculation that was not being output anywhere
2008-02-03 21:36:06 +00:00
Martin Renold
94c680127b Highlight and paths are now updated after moves/deaths. (bug #7028)
Additionally enemy moves do no longer unhighlight the player's
selection. I'm not sure if this is a bug or a feature.  There is a
small glitch that you have to move the mouse 1px to get the update
during enemy turns. (it should call mouse_update() somewhere)
2008-01-27 19:05:36 +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
ef76f66a58 Cleaned string to number conversions in replay.cpp to use lexical_cast_default 2008-01-25 16:23:30 +00:00
Gunter Labes
dd55a73a2e remove all non-critical keys and tags from a unit...
...before calculating the checksum

Please check if all those keys/tags are really non-critical for
gameplay and whether there are more that I missed.

This commit breaks compatibility so best not to miss anything..
2008-01-24 19:30:55 +00:00
Mark de Wever
ea4a319767 Added doxygen comment 2008-01-20 09:35:42 +00:00
Pauli Nieminen
4669787259 cleaned up delaying end_level_exception
Fixed replay to delay end_level also
2008-01-12 14:21:58 +00:00
Pauli Nieminen
64a8543756 Fixed spelling mistake in do_replay
Fixed end_level_exception preventing attack::attack from giving xp
2008-01-12 11:45:15 +00:00
Pauli Nieminen
23d5834ffa Fixing OoS when advancement is caused by message options 2008-01-12 08:18:38 +00:00
Patrick Parker
30abeb44b8 Two patches by CIB
* new tag [text_input] for [message] (patch #921)

   * parser exceptions are now displayed visually (patch #914)
2008-01-12 02:55:38 +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
Gunter Labes
6c53aa08fe correct a log message 2008-01-08 10:09:47 +00:00
Gunter Labes
77b313a3a2 add the time to all chat messages...
...and only govern the display of the timestamp by the preferences

also display the timestamp everywhere not only in-game (fixes bug
#10572: Making the timestamp feature better)
2008-01-07 22:24:13 +00:00
Gunter Labes
3dedd35786 don't check for a lobby join message here...
...it's done in add_chat_message() anyway
2008-01-06 18:15:34 +00:00
Mark de Wever
880bc75c98 Renaming a unit no longer genarates an OOS error (bug #7864). 2007-12-31 19:45:21 +00:00
Jérémy Rosen
9ff5682180 quick fix for the animation glitch
(sub frames not being synchronised) proper fix to come later...
2007-12-31 12:46:49 +00:00
Gunter Labes
926db9fba4 add a clarifying comment from suokko 2007-12-28 20:03:03 +00:00
Pauli Nieminen
094f86cdd1 Fixed undo causing OOS in MP. Filters sent messanges from undo 2007-12-26 06:10:11 +00:00
Mark de Wever
e109f2486c Unclutter includes. 2007-12-22 15:04:22 +00:00
Mark de Wever
d4ad5698b8 Remove unused parameters. 2007-12-22 10:25:20 +00:00
Gunter Labes
befbdc914e also handle join message correctly when the game hasn't started yet 2007-12-20 23:29:23 +00:00
Gunter Labes
005bdf1e96 sanitize the [relationship] handling
add handling for some more different chat message sounds
2007-12-20 21:15:19 +00:00
Mark de Wever
65c891c5b4 Fixed a crash when the attacker dies while performing a desparate attack.
The crash seemed only to happen under Windows but valgrind also
complained (bug #10496)
2007-12-15 14:46:06 +00:00
Mark de Wever
69d90d53dd wassert -> assert 2007-12-12 17:05:32 +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