1
0
forked from 0ad/0ad
Commit Graph

5649 Commits

Author SHA1 Message Date
f0d7346b8f Happy New Year! :D
This was SVN commit r16103.
2015-01-02 14:22:23 +00:00
8441a3f8d6 Fix compilation failure with GCC and C++98/03.
Local types shall not be used as a template argument. So move it
to a higher scope. This restriction was lifted in C++11, so we
might want to change this back when we switch to that.

This was SVN commit r16101.
2015-01-01 23:57:04 +00:00
a472944689 Clean up LoadPlayerSettings.
Include gaia to make iteration easier.
Add TemplateExists() to the TemplateLoader. Refs #2877.

This was SVN commit r16099.
2015-01-01 23:10:24 +00:00
8e30410109 Improve PickEntitiesAtPoint
First, do a ray intersection test with the bounding-sphere for all
entities on the map and then check the more detailed selection shape for
the remaining candidates. Do checks that require component lookups after
the ray intersection tests because these are relatively expensive.
The old method for figuring out which entities are below the mouse
cursor was incorrect because it does a 2D check to filter out the first
candidates which can lead to incorrect results with lower camera angles
and high buildings or buildings with a large footprint. Such problems
were avoided with quite a large radius for this 2D test and resulted in
a large number of candiate entities after this first test (200-500).
Also rename PickEntitiesAtPoint to PickEntityAtPoint and make it return
only one (the closest) match.

I've tested performance with the tracelogger by starting a map and then
moving the mouse in circles for one minute. The results were relatively
stable. I've compared the total time percentage of input.js:836, which
spends nearly all of the time in PickEntityAtPoint.
Ardennes Forest - Normal size:       Original: 41.46%    Patched: 31.6%
Ardennes Forest - Giant size:        Original: 40.59%    Patched: 51.55%

As we see, it's faster on normal map sizes but slower on giant maps with
a lot of entities.
This approach can be further improved with some kind of spatial
subdivision for the culling (like an octree), which would help the unit
renderer too. This way it should be possible to make it faster (and
still correct) on all map sizes and with a large total numbers of
entities.

This was SVN commit r16098.
2015-01-01 23:05:26 +00:00
9329506e0d add support for civ specific player template, see #2877
This was SVN commit r16092.
2014-12-31 09:31:41 +00:00
913674a202 Remove useless call.
This was SVN commit r16090.
2014-12-31 00:21:41 +00:00
2c20936ce3 Save map settings. Patch by @aBothe. Fixes #2963.
This was SVN commit r16089.
2014-12-31 00:21:24 +00:00
8f387e0044 Remove code duplication and some cleanup.
This was SVN commit r16088.
2014-12-30 18:21:02 +00:00
992169c3ab Fix indentation in daaddaf433.
This was SVN commit r16087.
2014-12-30 17:27:18 +00:00
daaddaf433 Stop music in Atlas when reloading a map, patch by trompetin17, fixes #1712.
This was SVN commit r16084.
2014-12-29 21:01:54 +00:00
354bd8b088 Only delete/create players until the needed number is reached. Patch by trompetin17. Fixes #1953.
Previously we removed all players and created them anew. This caused
issues in Atlas,
as some components were recreated, but did not get informed about
already existing
entities (eg cmpTechnologyManager). By only creating/deleting players
until we obtain
the new number of players we do not have this issue.

This was SVN commit r16080.
2014-12-29 17:33:39 +00:00
d68a057153 Fix warning.
This was SVN commit r16077.
2014-12-28 16:45:06 +00:00
4c12440868 Give access to the templates to the GUI. This will be useful for eventually displaying factions specificities in main menus.
This was SVN commit r16075.
2014-12-28 16:21:07 +00:00
2ef3c0c42e Compute the actual percentage of map explored by the team in the summary screen.
Fixes #2587.

This was SVN commit r16071.
2014-12-26 19:13:40 +00:00
1e17cbe33c Use the range manager to pick entities when drawing a selection box during a game. This allows for a significant performance improvement.
Fixes #2961, patch by @aBothe.

This was SVN commit r16068.
2014-12-26 13:07:49 +00:00
49187dd990 Drop support for AIs that are not using modules.
This was SVN commit r16061.
2014-12-23 01:20:50 +00:00
d21cf8f3aa Clarify some comments.
This was SVN commit r16060.
2014-12-23 00:46:00 +00:00
ce0c1e4302 Report names of components or interfaces in case of error when registering those.
This was SVN commit r16059.
2014-12-23 00:29:14 +00:00
efce88b97b Call setlocale(3) on BSDs so that we can log unicode strings. Patch by Teiresias. Fixes #1142.
This was SVN commit r16058.
2014-12-22 00:23:07 +00:00
71ba68e3a3 Fix performance problem with unnecessary global message subscription
On my ESR31 branch, I've made two measurements with different replays
(both around 15000 turns).
In the first, I got around 3% performance improvement and in the second
about 7.5%. It mainly depends on how often aura changes related to the
female citizen aura happen.

This was SVN commit r16055.
2014-12-21 01:44:00 +00:00
a9c6b7080a Fixes intermittent error messages caused by uninitialized variable
This was SVN commit r16049.
2014-12-14 17:43:40 +00:00
add113a2a1 Remove duplicated layers of unescaping which required multiple escapes in some places.
This was SVN commit r16043.
2014-12-13 01:08:29 +00:00
eb8a6c9427 Explictly use GMT when displaying a localized time that is not a date. Patch by lafferjm. Fixes #2938.
Also make some parameters const references.

This was SVN commit r16037.
2014-12-12 01:11:00 +00:00
622614de02 Allow nesting repeat tags in the GUI.
This was SVN commit r16034.
2014-12-10 20:10:02 +00:00
fd93e4ae74 Remove testing of some special templates. We need to find a good way to generate template subsets, refs #2951.
This fixes the tests fail introduced in b05879e151.

This was SVN commit r16033.
2014-12-09 23:20:31 +00:00
f80adad667 Fixes some inconsistent line endings and EOL-related SVN properties.
This was SVN commit r16024.
2014-12-06 12:11:42 +00:00
b05879e151 Move template items GetRetainInFog and AlwaysVisible from Vision to Visibility.
Refs #2913

This was SVN commit r16022.
2014-12-05 18:33:59 +00:00
7e0e566346 Fix typo in include. Refs #2086.
This was SVN commit r16018.
2014-12-03 16:43:51 +00:00
3c45599be5 fix default ai difficulty when using autostart, was easy since f90841cf78
This was SVN commit r16015.
2014-11-30 16:35:32 +00:00
1cc19e9176 Specify that my templatesanalyzer tool is distributed under the MIT license. Thanks to leper for noticing that it was currently unspecified.
This was SVN commit r16014.
2014-11-30 16:28:04 +00:00
759a6701f6 Fix test build.
The parser that extracts the methods to call does not care about
defines.

This was SVN commit r16013.
2014-11-29 21:26:01 +00:00
1430efa9d6 Properly handle auto-research promotion techs at game start.
This was SVN commit r16009.
2014-11-25 22:47:02 +00:00
87d5d37488 Some source string fixes.
This was SVN commit r16002.
2014-11-22 22:21:54 +00:00
c385a88c88 Remove unused overload of GetSavedGameData
This was SVN commit r16001.
2014-11-22 19:46:24 +00:00
504e23acb8 Make some things static.
This was SVN commit r15997.
2014-11-20 22:19:33 +00:00
335ac3d0cb Query /proc for the executable path on Linux. Patch by starslayer. Refs #2086.
Factor out unix_ExecutablePathname() which is used by BSDs and Linux (as
a fallback).

This was SVN commit r15996.
2014-11-20 22:19:21 +00:00
8a66a732c7 Add "Copy" and "Paste" entries to the Atlas "Edit" menu. Patch by stilz_, fixes #2642.
This was SVN commit r15994.
2014-11-20 20:52:32 +00:00
1abd5669c9 Replace spaces in source file paths with non-breaking spaces. Refs #2539.
This way our map file paths are not split due to word wrapping in the po
files.

This was SVN commit r15993.
2014-11-19 23:10:51 +00:00
f90841cf78 add a very-easy level for AI, addresses #2899
This was SVN commit r15990.
2014-11-18 21:21:21 +00:00
3589aa39b9 Update documentation on how to generate the entity component documentation.
This was SVN commit r15987.
2014-11-18 03:57:21 +00:00
afecbf02f3 Extend the config parser to support ini-style config files. Refs #1810.
Config settings in a section are stored as "sectionname.setting"
internally.
Do not write section headers when writing config files as we would need
to write
settings without a dot first or ignore them. This can be changed once
all settings
belong to a section.

This was SVN commit r15986.
2014-11-18 03:57:07 +00:00
73de625089 Also change GameSetup.cpp.
This was SVN commit r15985.
2014-11-18 00:24:29 +00:00
9407dbe45e Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
2014-11-17 23:29:49 +00:00
6695f1a3e8 Remove CParser. Fixes #2589.
This was SVN commit r15981.
2014-11-17 01:04:24 +00:00
b995135138 Use an FSM to parse our config files instead of using CParser. Refs #2589.
Properly write config settings with multiple values back to files. Refs
#1810.
Print error messages if we encountered an invalid setting.

This was SVN commit r15980.
2014-11-17 01:03:59 +00:00
f88ee2766e use by default a random seed for the AI to make it less repetitive
This was SVN commit r15973.
2014-11-16 19:53:29 +00:00
59676dfc84 Update tools/LICENSE.txt
This was SVN commit r15970.
2014-11-16 02:10:31 +00:00
df4c07238d Change GUI tag parsing to use a FSM instead of using CParser. Refs #2589.
Parameters now have to be quoted with ".
Supports " in parameters by escaping them with \.
Tag start characters can be included in normal text by escaping them
with \.
Better error handling and a error messages to help with fixing
invalid/malformed strings.

This was SVN commit r15969.
2014-11-16 02:10:28 +00:00
d15e2f0cf6 Check for availability of XmppClient.
Move Lobby script function registration to the lobby JS interface.

This was SVN commit r15968.
2014-11-16 02:10:24 +00:00
d58189d510 Parse terrain properties without CParser. Refs #2589.
This was SVN commit r15967.
2014-11-16 02:09:02 +00:00