Commit Graph

15005 Commits

Author SHA1 Message Date
8a8a3b8377 Revert a wrong piece of code from 63e42fbd31. Refs #3293
This was SVN commit r16965.
2015-08-30 20:32:22 +00:00
1a15131d2d Lobby bot optimizations.
This was SVN commit r16964.
2015-08-30 17:50:16 +00:00
63e42fbd31 Display which player(s) are OOS when it happens. Also fix some encoding issues with file paths.
Patch by elexis, fixes #3293.

This was SVN commit r16963.
2015-08-30 17:47:18 +00:00
f47cb2c711 Fix the OOS reported by elexis in #3335, and clean some whitespace and style.
The list of modified entities was thrown out on global visibility
updates (those happen on rejoin) but only in-world entities were
actually updated then, causing problems with garrisoning.

Now the list of modified entities can happen to be large, so replace the
hacky check for infinite loops by a real check.

This was SVN commit r16962.
2015-08-30 17:42:10 +00:00
45a39e7dfd Fix 3171 by moving some logic to C++. These changes do not optimize the presence buffer and only fix the state bug.
This was SVN commit r16961.
2015-08-30 12:56:48 +00:00
2aef62d65f Handle backrefs properly for maps and sets. Fixes #3374.
Allocate the tag for the backreference before deserializing the content,
to match the order of serializing.

This was SVN commit r16959.
2015-08-30 04:51:16 +00:00
acf7b7aefb Some gamesetup and in-game messages code convention related cleanup. Based on patch by elexis.
This was SVN commit r16958.
2015-08-30 03:34:07 +00:00
870237cce4 Do not create range queries in case we aren't at war with anyone. Fixes #3382.
This was SVN commit r16957.
2015-08-30 02:49:49 +00:00
8befb23db3 In-game chat code cleanup. Based on patches by elexis.
This was SVN commit r16956.
2015-08-30 02:21:17 +00:00
57f340f906 Fix player rejoins. Refs #3242.
This was SVN commit r16955.
2015-08-30 02:03:50 +00:00
c9893b3dd0 Test serialization of nested maps. Refs #3164, #3374.
This was SVN commit r16954.
2015-08-30 00:06:39 +00:00
90a99a1589 Prevent observers from using most chat commands. Refs #2879.
Chat prefixed with /all could circumvent the check. Fix this by only
allowing /me.
(Note that this is not a full solution, see #3270.)

Refactors the cheat and chat input code based on changes in some of
elexis' patches.

This was SVN commit r16953.
2015-08-29 23:30:41 +00:00
a67b3b8942 UnitAI cleanup. Setup*RangeQuery. Refs #3080.
Do not create range queries when being destructed.
rangeMan -> cmpRangeManager.

This was SVN commit r16952.
2015-08-29 22:49:52 +00:00
8217fa1a0e Warn about range queries that can never return any results.
This was SVN commit r16951.
2015-08-29 22:49:49 +00:00
6f0850f6bc Improve UnitAI's FindNearby* functions.
Stop them from starting a range query in case we have no ownership (or
-1).
Make use of Array.find() to make them a bit nicer.

This was SVN commit r16950.
2015-08-29 22:49:46 +00:00
31113cb8c3 UnitAI cleanup.
Use Array.{some,every,forEach,find} to simplify existing code.
Also make use of some fat arrow functions.
Some code style fixes.
Let FindNewHealTargets call RespondToHealableEntities to remove code
duplication.

This was SVN commit r16949.
2015-08-29 22:49:44 +00:00
5a7b4e380a Rename some occurences of *Man to cmp*Manager.
This was SVN commit r16948.
2015-08-29 22:49:42 +00:00
2b1c128b66 Change the attack hotkey to Ctrl.
This is both easier to press, and also does not introduce any hotkey
conflict.

This was SVN commit r16947.
2015-08-29 22:49:38 +00:00
39343a8c84 Fix test failure.
This was SVN commit r16946.
2015-08-29 22:49:32 +00:00
e56dddbefb Optionally allow observers to rejoin a game when they weren't here during the game setup.
Patch by elexis, fixes #3242.

This was SVN commit r16945.
2015-08-28 20:20:10 +00:00
8e70140ec2 Handle properly static shapes that overlap the edge of the map (likely to happen with square maps).
This should fix #3364.

This was SVN commit r16944.
2015-08-28 11:38:14 +00:00
d31ebaa47a add a new Repairable component defining a ratio of repairTime/buildTime for repairable entities. Fixes #633
This was SVN commit r16943.
2015-08-27 20:31:10 +00:00
34555ad70c Enhance i18n extractor to support a single context for a json file. Patch by elexis. Refs #3355.
This was SVN commit r16942.
2015-08-27 19:07:36 +00:00
d129ae3cd8 Fix a special situation where map control percentage wasn't computed properly.
Also improve the code and fix a typo.

Based on patch by s0600204, fixes #3378.

This was SVN commit r16941.
2015-08-27 16:26:32 +00:00
e3208c8784 fix rallyPoint on foundation, (it worked only by chance because all structures are repairable)
This was SVN commit r16940.
2015-08-25 15:39:11 +00:00
b9ab8f5855 Explicitly include public's mod.json in Windows packages.
Also clean up some unused options in the dist script.

This was SVN commit r16939.
2015-08-25 12:55:05 +00:00
217a478ac7 Improved materials for wooden towers (spec maps, AO maps, parallax). Patch and AO map by stanislas69, fixes #3352.
This was SVN commit r16938.
2015-08-24 07:09:05 +00:00
8923768bff Fix spelling of "Feminization" in the summary screen and in associated code.
This was SVN commit r16935.
2015-08-23 18:00:17 +00:00
47bca54228 Fixes the computation of team values for some of the summary counters, and reorder columns. Refs #3311
This was SVN commit r16934.
2015-08-23 17:57:51 +00:00
a63b7a0126 Add ability to query the map control percentage, and use this value in the summary screen. Patch by s0600204, fixes #3321
This was SVN commit r16933.
2015-08-23 17:44:37 +00:00
b694ab41d9 Show the number of trade carts and looted resources in the summary screen. Patch by bb, fixes #3311
This was SVN commit r16932.
2015-08-22 17:57:41 +00:00
74c420f658 GUI code cleanup. Fixes #3354.
Lots of code style fixes:
 * type [*&]varname -> type[*&] varname
 * else
   if (...)
   ->
   else if (...)
 * Spaces around some ops.
 * i++ -> ++i.
 * switch-case style fixes.
 * Indentation fixes.
 * Removing some commented out code.
 * include header sorting
 * Changed multiple pointer var declarations to be one per line.
 * Removed strange spaces in some places.
 * Changed some include header guards to be consistent with the rest of
the codebase.
 * Use UNUSED() instead of UNUSED2().

Some small code fixes:
 * Using .find() instead of .count() == 0.
 * !.empty() instead of .size() == 0.
 * Range-based for loops.
 * Making some member functions const by small changes.
   * Adds GetScrollBarPos(idx) const for this.
 * Using early returns/continues in some places.
 * Uses size_t for some loops in CList and COList.
 * Removes unused heading element (not attribute) from COList.
 * Use ENSURE in one case where some custom code did something similar.
 * Made some parameters const ptrs/refs.
 * Change removal loop in GUItext.cpp to erase-unique.
 * Made some static things const.
 * Allow iterating over children of IGUIObject with range-based for
loops by
   exposing begin() and end() (rename from ChildrenIt{Begin,End}()) and
use it.

Comments:
 * Comment COList.
 * Update a few comments.
 * Remove useless or duplicated comments.

This was SVN commit r16931.
2015-08-21 17:08:41 +00:00
d821601978 Revert changes when clicking "Cancel" in the options page.
Patch by Stefan, fixes #3324

This was SVN commit r16930.
2015-08-21 07:54:21 +00:00
c7edc09f51 Revert 7cc2d65ec7.
The problem caused by nested Maps is actually #3374.
Cloning the data object saved by the !AuraManager fixes #3188.
Also, using Map fixes a serialization problem, refs #3375.

On top of those changes, some reordering of add/multiply to avoid any
ordering mistake.

Fixes #3164, Refs #3374

This was SVN commit r16929.
2015-08-21 07:29:08 +00:00
a63e9c521d Optionally limit the framerate in menus to 50 FPS, to save power. Patch by elexis, fixes #2882
This was SVN commit r16927.
2015-08-20 13:22:44 +00:00
ba82743777 Some range-based for loops.
This was SVN commit r16926.
2015-08-20 12:58:41 +00:00
b2e8a241d2 Properly check loaded scripts in the second simulation instance of a serialization test. Fixes #3238
This was SVN commit r16925.
2015-08-20 12:52:29 +00:00
1ab3a4a02d Fix 6506bc20cb, refs #3238
This was SVN commit r16924.
2015-08-20 12:49:43 +00:00
558d43bac5 Replace some functor structs with lambdas, closures or range-based fors.
This was SVN commit r16923.
2015-08-19 03:33:04 +00:00
36c6b50944 Revert emplace for associative containers. Fixes #3366.
GCC < 4.8.0 does not support emplace for those.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436.

This was SVN commit r16922.
2015-08-19 03:32:47 +00:00
674f49f1a8 Remove generated test files during clean-workspaces.sh. Patch by otero. Fixes #3275.
Also remove two generated and disabled test files.

This was SVN commit r16921.
2015-08-19 01:30:09 +00:00
bd8f9b7824 Fix enemy corpses visible in the fog of war. Fixes #3179.
This was SVN commit r16919.
2015-08-16 09:29:34 +00:00
1c9ea56800 Fix the CheckLineMovement algorithm. Added some comments and a test to avoid problems.
This addresses some "stuck units" cases.

This was SVN commit r16918.
2015-08-13 16:21:39 +00:00
01de76f4be Code improvements for the hierarchical pathfinder: cache hits and variable initialization.
This was SVN commit r16917.
2015-08-11 15:21:11 +00:00
28ef270571 Enhance the MakeGoalReachable algorithm to handle better non-point goals.
Fixes #3363, #3297.

This was SVN commit r16915.
2015-08-11 09:47:08 +00:00
f7a7b687fc Don't send TerrainChanged messages when painting the terrain, as terrain texture doesn't influence passability.
This was SVN commit r16914.
2015-08-10 11:55:43 +00:00
e263c8f1de Remove EnableSSE2 for Windows builds. Fixes #3361.
Since we do not require SSE2 on *nix requiring it on Windows makes no
sense,
it also breaks the game for some users.

This was SVN commit r16912.
2015-08-03 19:57:42 +00:00
c333ae3fc2 Escape [ char in a gui caption.
This was SVN commit r16911.
2015-08-02 23:10:08 +00:00
3c8fe51712 complete b3f7b8633a for (un)packing
This was SVN commit r16910.
2015-08-02 17:24:04 +00:00
ec96c737ee Actually use vpObj instead of obj, and use it in all cases. Refs #3354.
This was SVN commit r16909.
2015-08-02 14:40:51 +00:00