1
0
forked from mirrors/0ad
Commit Graph

20090 Commits

Author SHA1 Message Date
elexis 688a2a00a8 Move researched tech progress overlay to a separate file, use class notation, refs #5387.
Improves performance if no techs are researched from 200 to 50
microseconds per turn (from 500 to 300 microseconds for one tech etc).

Differential Revision: https://code.wildfiregames.com/D2386
This was SVN commit r23088.
2019-10-21 23:05:04 +00:00
elexis ba993d4610 Refactor session lobby bot client code to use object orientation, refs #5387.
Adapt rating score for exploration score and add comment to keep
calculateExplorationScore and calculateScoreTotal in sync following
be881dc420 (following the formula in a4f27dc3e0 and bffe917914 being
otherwise in sync with the summary screen measures), refs #686.
Adapt rating score for captured entities and add comment to keep
calculateMilitaryScore in sync following f60befe098, refs #3216,
ad27deeb9d.
Adapt rating score for trade and vegetarian food and add comment to keep
calculateEconomyScore in sync following 202e567492/D494 and
215a102c27/D1052, refs #3948.
Remove ceasefire sending from the client from d21c0026ec since the bot
doesn't record it and since ceasefire time is expected to be 0 after a
1v1 was decided, refs #2749.
Resolve column value computation fragmentation and remove unneeded
intermediary object encoding following 1d3ac14d35, refs #686.
Remove hardcoding/duplication of unit and structure classes and send
domesticUnitsTrained too, refs c7a04e219b/D2384.
Move session code including the two globals to a separate folder so as
to maximize separation of and ease distribution without lobby code.
Migrate useless ugly trailing commas from bffe917914, to be removed in a
patch modifying the bot code.

Differential Revision: https://code.wildfiregames.com/D2385
This was SVN commit r23087.
2019-10-21 15:00:59 +00:00
elexis c7a04e219b Remove hardcoding and quadruplication of the StatisticsTracker unit and building classes following 1d3ac14d35, refs #686.
Amongst other issues encountered in the lobby ranking session statistics
reporting, refs #5387, D2385, bffe917914.
Correct test case from 59e7320a49/D1305.

Differential Revision: https://code.wildfiregames.com/D2384
Comments By: Freagarach
This was SVN commit r23086.
2019-10-21 08:48:17 +00:00
Stan 3791748a32 New Elm trees.
Art by: @BigTiger
Reviewed and adapted by: @Stan
This was SVN commit r23085.
2019-10-21 06:36:16 +00:00
Stan cf64aa4304 New lavender actors.
Thread:
https://wildfiregames.com/forum/index.php?/topic/25431-task-trees/page/13/

This was SVN commit r23084.
2019-10-20 20:52:34 +00:00
Gallaecio 6ca05322e0 Rephrase the tooltip of Reload Cache to avoid confusion
Summary: The action is Reload Cache, but the tooltip used to say Rebuild
instead of Reload, which caused some confusion among translators
(https://www.transifex.com/wildfire-games/0ad/translate/#sv/$/113848525),
and hence could have the same effect among users.

Test Plan: No tests, only user-visible strings are affected.

Reviewers: Imarok

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D2294
This was SVN commit r23083.
2019-10-20 11:20:44 +00:00
Gallaecio a0d6bd8e91 list heroes after champions and correct some structure tooltips
Summary: This patch lists heroes after champions in structure production
queues and corrects some structure tooltips.

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Freagarach, wraitii

Differential Revision: https://code.wildfiregames.com/D2324
This was SVN commit r23082.
2019-10-20 10:57:26 +00:00
elexis 96a6a136b6 Rewrite developer overlay to use class syntax, one class per checkbox, a class for the EntityState overlay and TimeWarp debug feature, refs #5387.
Using 22 classes instead of 1 class (refs 2bcf4f678b/D1928) leverages
more benefit of the paradigm.
In particular it means the checkboxes can own the EntityState and
TimeWarp helpers and the DeveloperOverlay itself can remain independent.
Improve performance by 200 microseconds per turn by unsubscribing from
onSimulationUpdate when the developer overlay is not opened, refs
e3f43f6352 / D2378.
Move TimeWarp from input.js from 8ddef2fee0 to independent class using
hotkey release event from 78bc56f33e, refs #3194.

Differential Revision: https://code.wildfiregames.com/D2383
This was SVN commit r23081.
2019-10-19 00:26:34 +00:00
elexis 6ec5855136 Rewrite session menu code to use object orientation, finish off menu.js, refs #5387, adf448db4d / D2240.
Add tooltips for buttons that can be triggered with hotkeys.
Unassign menu animation onTick function after the animation finished,
refs 9a00398e24.
Cleans unused openMenu following 5aae5ee55a.

Differential Revision: https://code.wildfiregames.com/D2380
This was SVN commit r23080.
2019-10-18 14:11:43 +00:00
Alexandermb 0f581e4398 Prepare some animations for the upcoming new shields "Roman Scutum".
Add a new ready variant animations.

This was SVN commit r23079.
2019-10-18 04:00:26 +00:00
Alexandermb 3899c9c7d2 Fix broken camel animations.
This was SVN commit r23078.
2019-10-17 17:40:24 +00:00
elexis fbe57d2066 Commit files missing in previous commit e3f43f6352 / D2378.
This was SVN commit r23077.
2019-10-17 15:22:18 +00:00
elexis e3f43f6352 Implement session event subscription system and rewrite TopPanel, PlayerViewControl, GameSpeed, Pausing, ObjectivesDialog to use object orientation, refs #5387.
New controller classes: PlayerViewControl, PauseControl,
GameSpeedControl
New viewer classes: ObjectivesDialog, PauseOverlay, FollowPlayer,
TopPanel (BuildLabel, CivIcon, CounterManager, CounterPopulation,
CounterResource refs 7e14a33411/D1113, GameSpeedButton,
ObjectivesDialogButton)

New events: SimulationUpdate, EntitySelectionChange, ViewedPlayerChange,
PreViewedPlayerChangeHandler, PlayerIDChange, PlayersInit,
PlayersFinished, Pause, DiplomacyColorsChange, HotkeyChange, refs #2604
Improves GUI onSimuationUpdate performance without selected entities by
allegedly 30%.

Delete misleading dead code resign command from leaveGame and rename to
endGame. The command is not sent via network (see fa85527baf) nor
processed in simulation, because the Game instance is deleted
immediately thereafter, introduced in fcedcae052, refs a3e1c68b9a,
39ffb0a6bd, 9f796068f8.
Remove explicitResume 0 value from e57c99c6f6 and 8ae67ed15f which
should have been a false if defined, and is equivalent to the default.
Restore fast forwarding option from cd571035bb/D595 for developers
changing the perspective to observer or player following 56308ec1ad.
Add pausing for the delete dialog missing following 7a7ebaa983.

Differential Revision: https://code.wildfiregames.com/D2378
This was SVN commit r23076.
2019-10-17 15:08:56 +00:00
Alexandermb ed11b3f039 Some tweak to animation in the 2nd swordsman shield attack
This was SVN commit r23075.
2019-10-17 04:22:57 +00:00
bb b69ffee9b1 Fix PanelEntButton undefined, by not trying to fill gui elements that don't exist
Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1397
fixes: #5504
refs: #3000

This was SVN commit r23074.
2019-10-15 14:24:08 +00:00
Stan b99fc1a24d Add new rubble for the gaul civic_center.
Use the the new destroyed texture for the brit rubble, and the celt_dock
rubble.

This was SVN commit r23073.
2019-10-13 17:16:52 +00:00
elexis 34325ac4e3 Refactor trade dialog and barter panel buttons to use object orientation, refs #23, #2311, #4366, #5387, 8cbab40137, 749c4d5270, 5f95bca6b0, a934dfad5f.
Differential Revision: https://code.wildfiregames.com/D2369
This was SVN commit r23072.
2019-10-13 03:43:42 +00:00
elexis f2778ea7b4 Fix atlas complaining about the diplomacy dialog following 6814a983e1/D2365, refs 966b1608da.
This was SVN commit r23071.
2019-10-13 03:04:08 +00:00
Stan 1578079f3d Fix the last remaining warnings introduced by 2a1681d5c7
Add a parent variant for the camelry gather variants
Make the camelry use those variants so that they get the custom knife.
Remove the glitching basket for camelry, as its gather_meat and they do
not use it anyway.
Remove the bow while gathering as well. If it should be displayed, it
should either be on the camel, or on the unit shoulder.

This was SVN commit r23070.
2019-10-12 16:24:13 +00:00
elexis 197ab42bd2 Remove catch of critical PSERROR_Scripting exceptions in the GUI that is obsolete for the intended case and wrong for the unintended case.
The catch had been introduced in 953fb41c82, seemingly to catch the case
PSERROR_Scripting_LoadFile_OpenFailed from 1e40ed1543 which was removed
in 4b1297b328, refs D2363.
The LoadGlobalScript and LoadGlobalScriptFile functions don't throw
these errors unless that JS code calls broken C++ code throwing that.
In that case catching the error and continuing like nothing happened
leads to subsequent segfaults and similarly severe errors caused by C++,
not XML.

Differential Revision: https://code.wildfiregames.com/D2366
Tested on: clang 9.0.0, gcc 9.2.0, Jenkins/vs2015
Accepted By: nani
This was SVN commit r23068.
2019-10-11 19:30:28 +00:00
elexis a01e68a4ea Don't leak all GUI objects on name ambiguity following 5cc814759f and remove ERROR_GROUP GUI.
Delete CGUI::UpdateObjects and don't recreate the entire object
hierarchy by recursing through the existing one each time when inserting
one GUI Object.
Change CGUI::AddObject to only insert the one relevant pointer into the
map hierarchy, return success value and delete the child upon failed
insertion in the caller instead of leaking it.
Defer GUIM_LOAD and UpdateCachedSize recursion until all XML files
linked in the page XML file were loaded.
Delete related ERROR_TYPE NameAmbiguity, ObjectNeedsName, and unrelated
JSOpenFailed and in consistency with the rest, do the LOGERROR in the
scope where the error occurs.
Delete ERROR_TYPE InvalidSetting from 90f6641c1d unused following
85a622b13a, 1a49ccb294, ERROR_TYPE OperationNeedsGUIObject from
90f6641c1d unused following d3e56f0f57, see also e1014aad3b, refs #128.

This was SVN commit r23067.
2019-10-11 16:20:50 +00:00
elexis bd914702fb Fix missing file in previous (diplomacy dialog class rewrite), refs 6814a983e1/D2365, reported by Freagarach.
This was SVN commit r23066.
2019-10-11 15:47:59 +00:00
elexis 6814a983e1 Refactor diplomacy dialog to use object orientation paradigm using the class keyword, refs #5387.
Includes dilomacy colors, tribute buttons, spy request buttons, attack
request buttons, minimap panel, idle worker button, ceasefire counter.
Differential Revision: https://code.wildfiregames.com/D2365
Use hotkey release event from 78bc56f33e to remove input.js state and
evil global nested closure hackery from cb890ad876, refs #1839, #3194.
Fixes masstribute selecitonchange issue subject of D1191.

This was SVN commit r23065.
2019-10-11 12:28:12 +00:00
Alexandermb 44b03ed823 Remove unused variant and replace rider run animation in base_spearman_shield_reverse_attack.xml
This was SVN commit r23064.
2019-10-09 23:36:18 +00:00
Alexandermb d4dffa0dbf Replace elephant_asian_armored_03.dae wrong mesh with the respective mesh.
This was SVN commit r23063.
2019-10-07 01:43:48 +00:00
elexis 47f5c27eec Rewrite session chat to use hierarchical object oriented design using class syntax, refs #5387.
Set global hotkeys in JS instead of empty XML objects from
f192d4a2fa/D2260.

Differential Revision: https://code.wildfiregames.com/D2355
This was SVN commit r23062.
2019-10-06 14:42:12 +00:00
Alexandermb b76239cbe7 Fix "Didn't find any objects in the scene" in elephant_asian_armored_03.dae
This was SVN commit r23060.
2019-10-05 15:25:07 +00:00
Alexandermb fe8f284869 Remove duplicated vertex groups and props from elephants
Mentioned by @stan in this thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/21/&tab=comments#comment-386080

This was SVN commit r23059.
2019-10-05 14:51:22 +00:00
Alexandermb dc21504b5d Fix weight on ship sails missing in the mastiff.
This was SVN commit r23058.
2019-10-05 14:20:50 +00:00
Alexandermb e61d6ac8d2 Remove unused animation and tweak levy idle ready.
This was SVN commit r23057.
2019-10-05 13:21:07 +00:00
Alexandermb a5c2cc6cd5 Replace gather meat animation on camel riders.
Fix latest issues mentioned by @stan in this thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/21/&tab=comments#comment-386055

This was SVN commit r23056.
2019-10-05 13:19:23 +00:00
Stan ae50e10339 Add missing garrisoned flag on the cart temple missing since 9a4fcd55a8
Reported by: @faction02
Thread:
https://wildfiregames.com/forum/index.php?/topic/26896-fixed-ninja-stuff-or-bug/&tab=comments#comment-386061

This was SVN commit r23055.
2019-10-05 12:27:06 +00:00
elexis 8cd9d402fe Correct button hovering following 8190293f8b / D2325, clarify difference between IsMouseOver and IsMouseHovering following 5122b0f906.
Differential Revision: https://code.wildfiregames.com/D2354
Tested on: clang 8.0.1, Jenkins/vs2015

This was SVN commit r23054.
2019-10-05 09:58:31 +00:00
Alexandermb 92f7df696d Make generic the infantry swordsman idles so it can be used by all sword infantry shield kinds.
Add base variant file for the romans/infantry_swordsman_c3.xml.

This was SVN commit r23052.
2019-10-05 02:11:58 +00:00
Alexandermb 9a95d21760 Replace run on female variant with proper running.
Reported by @stan

Change running animation speed to match the movement ingame.

Rotate spear while running for the hoplite/run_relax.dae animation.

This was SVN commit r23051.
2019-10-05 01:25:32 +00:00
Alexandermb e0e892efec Separate skirts from legs in short and long tunic meshes.
Re-export some body meshes with the proper vertex groups.

Fix rotation in hand while carrying meat in the cavalry riders.

This was SVN commit r23050.
2019-10-05 01:13:30 +00:00
Alexandermb 2a1681d5c7 Camel riders animations re-export.
This was SVN commit r23049.
2019-10-05 00:52:32 +00:00
Alexandermb 170bfed010 Mauryan trader animation re-export.
Tweaked the male walk animation.

This was SVN commit r23048.
2019-10-05 00:16:52 +00:00
Alexandermb 46de7fe751 Replace death animation on turret elephant riders.
replace variant in elephant rider capes.

This was SVN commit r23047.
2019-10-05 00:04:33 +00:00
vladislavbelov d7ea078583 Removes unused variables after 7f38bef8e1 and 75d9c6293b. Reported by elexis.
This was SVN commit r23046.
2019-10-04 22:06:52 +00:00
Alexandermb 04745e7fdf Continue the cleaning of the unused files with the recent elephant animations re-export.
This was SVN commit r23045.
2019-10-04 21:35:23 +00:00
vladislavbelov e2f0e409f0 Adds containers serialization tests, std::set serialization and movement semantics
Reviewed By: elexis
Tested By: elexis, Freagarach
Differential Revision: https://code.wildfiregames.com/D2352
This was SVN commit r23044.
2019-10-04 21:30:52 +00:00
Alexandermb 273d7949a2 Replace asian_armored variant in two heros elephants + fix a wrong face in elephant_asian_armored_04.dae model.
This was SVN commit r23043.
2019-10-04 20:13:44 +00:00
Alexandermb 893a727cd5 Fix a typo in last commmitt.
This was SVN commit r23042.
2019-10-04 19:30:22 +00:00
Alexandermb 5512fdb9ef Remove an unused elephant variant and replace african forest variant.
This was SVN commit r23041.
2019-10-04 19:29:07 +00:00
Alexandermb 40f0f3d455 Elephant re-export and animations for the riders.
This was SVN commit r23040.
2019-10-04 17:15:51 +00:00
Alexandermb ed4208c538 Reduce frame lenght on new citizen idles to keep in sync with global idle frame lenght.
This was SVN commit r23037.
2019-10-04 03:09:22 +00:00
vladislavbelov 75d9c6293b Adds projection type to CCamera to control usages of projection dependent properties.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2351
This was SVN commit r23036.
2019-10-03 18:51:40 +00:00
Alexandermb eff68a51c0 Citizen animations for the slave and siege engine operators.
Added frequency tags on variants.

12 Citizen animations.
1 tweak on hoplite static idle.

This was SVN commit r23035.
2019-10-03 17:31:17 +00:00
vladislavbelov 8d2b143cb8 Cleanup Camera related code and uses constant references where possible, fixes #5408.
Patch By: shh
Reviewed By: wraitii
Tested By: Angen
Commented By: Stan, Itms, historic_bruno
Differential Revision: https://code.wildfiregames.com/D1784
This was SVN commit r23034.
2019-10-03 13:20:56 +00:00