1
0
forked from 0ad/0ad
Commit Graph

5957 Commits

Author SHA1 Message Date
f5348c6dd6 Introduce less rounding errors in the falloff to allow a more precise territory calculation. Fixes #3334. Based on code by elexis.
This was SVN commit r17122.
2015-10-11 09:01:50 +00:00
40acf66ba9 Fixes hotkey bugs introduced in a07add11c6, patch by elexis. Fixes #3495
This was SVN commit r17116.
2015-10-10 07:22:07 +00:00
02628b8902 Removes unused pathfinder consts, patch by stanislas69. Fixes #3500
This was SVN commit r17115.
2015-10-10 06:48:42 +00:00
e0093c8ecc Remove an unused function (it was used by the old pathfinder).
This was SVN commit r17103.
2015-10-04 18:02:16 +00:00
2505a2ec70 Remove a preprocessor ambiguity, fixes #3480.
This was SVN commit r17101.
2015-10-04 17:21:36 +00:00
cfe4a2e568 Fix a cause of serialization problems. Fixes #3450.
This was SVN commit r17097.
2015-10-03 11:02:12 +00:00
bb997f6cae Fix previous commit.
This was SVN commit r17096.
2015-10-03 10:32:30 +00:00
d60940ac59 Code improvements and style fixes.
This was SVN commit r17095.
2015-10-03 08:27:19 +00:00
dc69aed954 Remove some old and unused code.
This was SVN commit r17094.
2015-10-02 18:27:10 +00:00
102358a5cb Fix build for recent versions of miniupnpc.
This was SVN commit r17091.
2015-09-30 21:32:54 +00:00
061c7f6058 Const ref.
This was SVN commit r17090.
2015-09-30 20:28:23 +00:00
2132f868b8 Replace the rectangle rasterization algorithm by the original version from Philip's branch.
The current version is flawed (it doesn't handle the partially
obstructed cells as it should).

Refs #3410.

This was SVN commit r17084.
2015-09-27 16:46:26 +00:00
a7e0dc1534 update attack and heal range queries, patch by leper, fixes #3080
This was SVN commit r17082.
2015-09-27 12:23:40 +00:00
dcf8e66aca Update the goal serialization for 03d2c5e40b. Fixes #3425.
This was SVN commit r17068.
2015-09-24 17:13:39 +00:00
b830233498 Fix previous commit, some new files didn't pass through.
This was SVN commit r17055.
2015-09-21 17:14:26 +00:00
d64b95b28c An awesome Visual Replay menu, made by elexis. Fixes #3258.
This was SVN commit r17054.
2015-09-21 17:00:21 +00:00
3317e6c68b rename autostart visualreplay, refs #3258, patch by elexis
This was SVN commit r17050.
2015-09-20 12:29:59 +00:00
b77ad821c2 Reenable formations and fix/improve the communication between UnitAI and UnitMotion. With the new pathfinder some path requests can be completed instantaneously, so UnitAI has to handle MoveStarted messages even in the IDLE state.
Please note that this commit makes #3410 really visible. Formation
members might pass through buildings.

Refs #3410, #3337.

This was SVN commit r17028.
2015-09-17 16:31:23 +00:00
21619a4705 Move the victory conditions to the new simulation settings system. Patch by elexis. Refs #3355,#3001
This was SVN commit r17026.
2015-09-16 09:22:36 +00:00
7eefcbe8c5 Do not use non-static data member initializer.
GCC 4.6 does not support those and initializing it in the ctor is a lot
clearer in this case.

This was SVN commit r17022.
2015-09-15 00:55:03 +00:00
a65a8472f9 Mark some const functions as such.
This was SVN commit r17021.
2015-09-13 20:59:10 +00:00
ae3aad704d fix previous commit
This was SVN commit r17018.
2015-09-13 19:06:14 +00:00
9816e7c92d Rename some variables to point out that they are only used in visual replay. Add script function IsVisualReplay. Refs #9 #3355, patch by elexis
This was SVN commit r17017.
2015-09-13 19:03:33 +00:00
ae6475fcc0 Fix a typo, patch by godlikeldh.
This typo didn't have any influence since dirty unit shapes are usually
discarded during the rasterization (they don't block long-range
pathfinding). Switching the order of a check in RasterizeHelper prevents
performance problems to a really small extent.

This was SVN commit r17014.
2015-09-13 10:18:37 +00:00
03d2c5e40b Support inverted goals with the long-range pathfinder. This allows units to flee and should fix problems with ranged units too close to their targets. Fixes #3405, refs #3372.
Now that units flee it's necessary to fix the unit chasing: this commit
reintroduces some code from 298115f4c5 that disappeared with the
committing of the new pathfinder. Refs #1537.

Also includes some style improvements to the UnitMotion code.

This was SVN commit r17013.
2015-09-13 09:33:09 +00:00
8507a7bc27 Create commands.txt only when actually starting the game. Patch by elexis. Fixes #3408.
This was SVN commit r17004.
2015-09-11 17:44:50 +00:00
558695365d Add some documentation about system components. Fixes #3315.
This was SVN commit r17003.
2015-09-11 04:10:26 +00:00
fc051d94cc Add check for non-passable (likely water-only) maps to territory percentage calculation.
Patch by s0600204. Fixes #3407.

This was SVN commit r17002.
2015-09-11 02:16:21 +00:00
9da482ead4 Based on previous experimental changes, major update to the unit motion.
With this change, units will not check their movement against all
obstructions when moving: terrain and static obstructions are assumed to
be handled by the long-range pathfinder.
However, when static obstructions are changed, the paths have to be
invalidated. In order to minimize the performance impact, units will
check for obstructions when they move after a passability change. If
they collide with something, they will recompute a path that will take
into account the new passability map.

Also includes some code cleanup. This patch should not change
performance a lot: the lower number of checks should give a small
performance improvement while using the message broadcasting system
should hurt it a bit.

Fixes #3376, #3337, #1914.

This was SVN commit r16998.
2015-09-10 18:12:13 +00:00
8b437a0b1c Fix #3386, patch by elexis.
This was SVN commit r16997.
2015-09-10 05:30:18 +00:00
5a685b84ca Recompute the cost grid in the TerritoryManager when needed. Patch by s0600204. Fixes #3399, #3400.
This was SVN commit r16990.
2015-09-06 22:35:38 +00:00
4e3b933b11 Fixes some issues in checkrefs.pl: soundgroups have new gender and lang tags, PMP version bump, GUI XML can include directories, civ data path changed
This was SVN commit r16987.
2015-09-06 04:42:28 +00:00
448b8248cf Revert my experimental changes from the previous days. Hopefully I can design something that doesn't introduce a ton of new issues. Refs #3376
This was SVN commit r16986.
2015-09-05 18:20:08 +00:00
1d89d05956 Don't try to short-path to non-point goals, because the algorithm won't deal with connectivity. Fixes another bug reported in #3363.
This was SVN commit r16985.
2015-09-04 20:43:05 +00:00
3005637370 Make a compromise between f240374b28 and f134ac63bb by making the filtering of pathfinding-blocking shapes conditional.
Those shapes need to be taken into account when computing a short path,
but they need to be discarded when checking movements or they will
create long/short inconsistencies.

This was SVN commit r16981.
2015-09-03 20:09:25 +00:00
ad9736b5a5 Fix Arabic plural equation in tinygettext.
Patch by SafaAlfulaij taken from
https://github.com/tinygettext/tinygettext/pull/8.

This was SVN commit r16980.
2015-09-03 16:42:05 +00:00
7d6553099f Fix wrong offset when clicking too close to the header of sortable lists. Also added some code comments.
Patch by elexis, fixes #3391

This was SVN commit r16976.
2015-09-02 17:55:02 +00:00
8dde1cda94 Style cleanup, and remove a wrong TODO.
This was SVN commit r16974.
2015-09-02 17:40:31 +00:00
f134ac63bb Revert most of f240374b28 which was actually bad. It caused units to get stuck because the obstructions won't block the same paths when rasterized on the grid and when directly tested for collisions.
As a general rule, pathfinding-blocking shapes should not be tested
against for movements. Only the passability grid should be considered.
As the algorithm which tests paths on this grid was fixed in 1c9ea56800,
it can be safely used.

Fixes #3376.

This was SVN commit r16971.
2015-09-02 15:50:16 +00:00
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
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
8217fa1a0e Warn about range queries that can never return any results.
This was SVN commit r16951.
2015-08-29 22:49:49 +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