1
0
forked from 0ad/0ad
Commit Graph

17343 Commits

Author SHA1 Message Date
2ee5eb0893 Fix observermode GUI for 1024x768.
Display the follow-player label only if it fits entirely (i.e. >=
1280x1024), otherwise display the checkbox only.
Increase the size of the player dropdown for resolutions >= 1280x1024.

Differential Revision: https://code.wildfiregames.com/D689
Patch By: temple
Refs:
  Issues introduced by #3743 and 20e7d2224a
  This is affected by D692 D694

This was SVN commit r19843.
2017-06-29 17:25:24 +00:00
ca2390d70e JS lobby cleanup, fixes and lobby bot performance improvements:
Do not send a wasteful rating request if the same player is selected
again when someone joined the lobby, when changing the sorting order or
when clicking on the same user again
by moving the player-selection change test from updatePlayerList to
onPlayerListSelection.

That test should have been done here in 8f4daa9dd0 already and fixes
#3840 well enough.

This change also fixes an unintentional behavior of the code, where the
game the currently selected player is playing in would be selected if
someone else joined the lobby, even if a different game was selected
manually.
Furthermore it allows simplification of the code of 655ce95468 by
removing selectGameFromPlayername which did almost the same as
selectGameFromPlayername.

To still select the game the current player is playing in if the
selected player didn't change, subscribe to the (new) event that is
called when clicking on an item.

Differential Revision: https://code.wildfiregames.com/D688
Reviewed By: ffffffff (fpre)
This was SVN commit r19841.
2017-06-29 02:58:04 +00:00
00173a6e13 Group starting positions of players by team on the new random map sripts in Alpha 20 and 21, making them much more playable.
Use stronghold starting position style with 33% instead of 50%
probability.

Differential Revision: https://code.wildfiregames.com/D664
Reviewed but not accepted by: bb (everything) and fatherbushido (Heaps
permutations)
Catch: This must become more efficient if the playercount will be
greater than 8, refs #4004.

This was SVN commit r19840.
2017-06-28 17:09:21 +00:00
7c50093470 Use PlacementType instead of Category in BuildRestriction for the hardcoded dock special constraint. AI patch by mimo. Reviewed by leper and s0600204. Final review by mimo.
Fix #4290.
Differential Revision: https://code.wildfiregames.com/D387
This was SVN commit r19839.
2017-06-28 07:30:22 +00:00
67ae3481ed Autocomplete playernames before everything else, as that is the most expected use case.
Differential Revision: https://code.wildfiregames.com/D678
Refs D322.
Reviewed By: Vladislav
This was SVN commit r19837.
2017-06-27 21:25:16 +00:00
6b80ca0c68 Prevent a tribute exploit (gaining infinite resources by sending a tribute of NaN resources to a player).
Differential Revision: https://code.wildfiregames.com/D677
Refs #4459

This was SVN commit r19836.
2017-06-27 21:17:33 +00:00
4241cf441d Petra: use moveToRange() instead of move() in some cases
Patch by Sandarac

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D676
This was SVN commit r19834.
2017-06-26 18:25:18 +00:00
be2b2faa77 Properly apply texture to the last quad of an overlay textured line. Reviewed by vladislavbelov.
Fix #4617.
Differential Revision: https://code.wildfiregames.com/D663
This was SVN commit r19833.
2017-06-26 13:04:21 +00:00
26e6f901f1 Remove a useless value cap in Foundation code. Reviewed by wraitii.
Differential Revision: https://code.wildfiregames.com/D550
This was SVN commit r19832.
2017-06-26 12:48:00 +00:00
8ba425d89f Limit the bartered amount in the simulation. Advices from mimo. Reviewed by elexis.
Refs #4655.
Differential Revision: https://code.wildfiregames.com/D381
This was SVN commit r19831.
2017-06-26 11:56:31 +00:00
1fe9532680 Allow lobby players to rejoin games, even if the rating changed meanwhile or if the lobby bot didn't provide the most recent rating.
Refs #3686
Differential Revision: https://code.wildfiregames.com/D670
Reviewed By: Imarok
This was SVN commit r19828.
2017-06-25 20:56:03 +00:00
e948d5f37f JS Lobby cleanup.
Don't return 1200 in splitRatingFromNick if the player has no rating
yet, so that it can be reused for playername construction.

Refs https://code.wildfiregames.com/D670
Reviewed By: Imarok
This was SVN commit r19827.
2017-06-25 18:00:54 +00:00
2e3ac4cf20 Prevent players from gaining unlimited resources by setting the batch-train-modifier to a non numeric value.
Differential Revision: https://code.wildfiregames.com/D66
Refs #4459
Reviewed By: fatherbushido (wraitii, leper)
This was SVN commit r19826.
2017-06-25 16:05:06 +00:00
d7c4c20aa8 Update OSX zlib version to the most recent and now only one hosted.
Fixes #4639
Refs #4362
Differential Revision: https://code.wildfiregames.com/D644
Tested By: Tobbi
This was SVN commit r19825.
2017-06-25 14:58:51 +00:00
e7ab22286e Fix the replay menu for people with non-latin characters in their username.
Use OsPath instead of CStr and CStrW where possible,
wstring_from_utf8(OsPath.string8()) to pass printable strings to the
JSAPI,
OsString when opening a filestream and
off_t instead of int for filesizes.

Fixes #4320
Differential Revision: https://code.wildfiregames.com/D518
Reviewed By: Imarok
Tested By: Imarok on Windows, wraitii on OSX
Special thanks to Philip for advice and the lib/path.h fix in
47cc447322.

This was SVN commit r19824.
2017-06-25 14:54:00 +00:00
47cc447322 Fix OsPath string8 function on Unix to account for characters that aren't covered by ISO-8859-1,
thus allow proper printing of such paths.

Fixes #4647
Refs #4320 D518
Patch By: Philip
Tested By: Imarok on Windows, wraitii on OSX
This was SVN commit r19823.
2017-06-25 14:30:26 +00:00
e1b43137fe Fix incompatible value for WaterUgly warning on opening the options screen.
Reviewed by: vladislavbelov, Imarok. Patch by echotangoecho. Fixes:
#4230.
Differential Revision: https://code.wildfiregames.com/D89
This was SVN commit r19822.
2017-06-25 11:13:17 +00:00
3faf65c232 petra: fix a case when ptol or sele have their cc destroyed while they already had a colony, they would no more try to build a cc
Differential Revision: https://code.wildfiregames.com/D660
This was SVN commit r19820.
2017-06-22 22:13:13 +00:00
c67da6a93e Improve minimap colors
Patch by niektb and Grugnas. Reviewed by elexis. Fixes #763.

This was SVN commit r19819.
2017-06-22 21:18:09 +00:00
495d219d99 Don't always reset the Capture The Relic victory timer upon diplomacy change following 35377c51a7.
Only reset it if any of the original allies changes the diplomatic
relation to one of the other original allies.

Differential Revision: https://code.wildfiregames.com/D305
Fixes #4529
Patch By: Sandarac
This was SVN commit r19818.
2017-06-22 11:00:10 +00:00
c4975452f0 Buff sentry tower damage.
Differential Revision: https://code.wildfiregames.com/D646
Patch By: Grugnas
Reviewed By: causative
This was SVN commit r19816.
2017-06-21 23:56:27 +00:00
26159c3f80 Tutorial still not translated. Hopefully done now!
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D669
This was SVN commit r19815.
2017-06-21 17:31:55 +00:00
abe5d9205a Remove useless file entry in replays list
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D668
This was SVN commit r19814.
2017-06-21 15:43:57 +00:00
ea250b3d25 Don't crash if there is a replay subdirectory without commands.txt following 80635665f7 / D39.
Differential Revision: https://code.wildfiregames.com/D667
Reviewed By: Imarok
This was SVN commit r19813.
2017-06-21 14:44:26 +00:00
487078e07c Slightly buff pikeman walk speed (less than alpha 17 13b229d503, more than alpha 18 72ff88880c).
Differential Revision: https://code.wildfiregames.com/D633
Patch By: Grugnas
This was SVN commit r19811.
2017-06-20 18:53:38 +00:00
9ac13bf3d4 Download .po files for the Tutorials translation resource, and put them under version control.
Fix alphabetical order in the transifex client config.

Based on patch by elexis, fixes #4637.

This was SVN commit r19810.
2017-06-20 18:05:14 +00:00
8b8f6187ea Fix an oversight in structure min distances.
As civil centre and colony are civil centre, the current distance test
of colonies should be versus civil centre

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D661
This was SVN commit r19809.
2017-06-20 17:17:42 +00:00
eee5cbd845 Prevent height based forests to grow into player start locations.
Differential Revision: https://code.wildfiregames.com/D662
Reviewed By: elexis
This was SVN commit r19808.
2017-06-20 00:15:55 +00:00
d597b5866a Move duplicate rmgen functions from caledonian meadows and wild lake to the rmgen libraries.
Differential Revision: https://code.wildfiregames.com/D659
Reviewed By: FeXoR
This was SVN commit r19807.
2017-06-19 21:43:27 +00:00
499b4a4b1d Remove unused player starting position angle from rmgen2 which is meaningless in every case but the radial placement.
This was SVN commit r19806.
2017-06-19 13:05:19 +00:00
47f7da6201 Fix caledonian meadows thumbnail scaling.
Differential Revision: https://code.wildfiregames.com/D658
Reviewed By: FeXoR
This was SVN commit r19805.
2017-06-19 12:06:56 +00:00
fe4ffa3558 JS Date cleanup.
Use Date.now() to get the current timestamp instead of doing arithmetic
with Date objects and avoid needless object instantiation.

Differential Revision: https://code.wildfiregames.com/D554
Eyeballed By: causative
This was SVN commit r19802.
2017-06-18 19:11:24 +00:00
6141c5c4fa Correct lobby chat timestamps.
Only historic messages were timestamped in C++ prior.
Other messages showed the timestamp when they were displayed in JS,
which is wrong in case of returning to the lobby from a game.

Differential Revision: https://code.wildfiregames.com/D514
Fixes #3832.
Reverts the revert of 1f34a004e5 in 572847ddd4.
Patch By: Josh
Tested By: Itms
This was SVN commit r19801.
2017-06-18 18:48:18 +00:00
d5caf97185 Fix Valgrind complaints in CRenderer by properly intializing some members values introduced in ab30e0d4fb. Refs #3922, #4492. Patch by Sandarac. Reviewed by vladislavbelov.
Differential Revision: https://code.wildfiregames.com/D536
This was SVN commit r19800.
2017-06-18 14:52:54 +00:00
cfd08bbf28 Cinema Path GUI hiding and silhouettes fixes.
Let the JS GUI take care of hiding the GUI and silhouettes and remove
the according hardcoding in the engine following 89aef0b6eb.
Thereby fix some bugs (like not having hid the GUI if there was a
message box or different page shown while playing a path) and
fix these two hotkeys broken by 5d49e6c456.

Differential Revision: https://code.wildfiregames.com/D631
Fixes #4633
Reviewed By: Vladislav
This was SVN commit r19797.
2017-06-17 14:17:30 +00:00
2cd7c62c0f 9d919f4369 was too fast
This was SVN commit r19796.
2017-06-17 10:36:55 +00:00
9d919f4369 cleanup of 0e887a686a following elexis comments
This was SVN commit r19795.
2017-06-17 10:34:15 +00:00
0e887a686a petra: revisit the serialization of functions, to fix 5403c19cf0
Differential Revision: https://code.wildfiregames.com/D617
This was SVN commit r19794.
2017-06-17 08:42:04 +00:00
00b60e2132 Petra: Fix behavior of guards when the guarded entity becomes garrisoned
Patch by Sandarac

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D640
This was SVN commit r19793.
2017-06-17 08:36:08 +00:00
3004a7a134 Fix a Damage bug. Don't try to damage the main target when it doesn't have DamageReceiver, instead of doing an early return, continue and try to damage another hit target. For the mirage case, the actual entity will be hit. Reviewed by elexis.
Differential Revision: https://code.wildfiregames.com/D605
This was SVN commit r19791.
2017-06-16 20:06:03 +00:00
e6dafe9efc Fix a map exploration OOS on rejoin when starting with territory at the map boundaries.
6aeb5c64de forgot to add a LosIsOffWorld check in ExploreTerritories
(aka UpdateTerritoriesLos) and thus marked tiles outside of the world as
explored.
f5e60157bf transformed the bug into a non-simulation desynchronization,
causing rejoined players to see a different score,
  as they excluded off-world tiles when filling the cache in
ResetDerivedData upon rejoin.
4a0673e44e transformed the bug into an actual simulation OOS by
serializing that map exploration percentage based on that cache.

Also tiles at the map border in square maps are not rendered as
expected, so this commit hides refs #4267.

Differential Revision: https://code.wildfiregames.com/D630
Fixes #4598
Proofread by: Itms
Tested By: Imarok
This was SVN commit r19790.
2017-06-16 19:39:30 +00:00
d01f908ebf Apply previous commit to scenario maps.
Differential Revision: https://code.wildfiregames.com/D649
Patch By: Phormio
Refs D647

This was SVN commit r19789.
2017-06-16 18:50:56 +00:00
98532a1600 Fix starting units on random and skirmish maps.
Always spawn that cavalry that can be trained at the civic center, not
the other one from the barracks.
Spawn 2 melee and 2 ranged infantry units for Seleucids just as for any
other civ.

Differential Revision: https://code.wildfiregames.com/D647
Reviewed By: Grugnas, fatherbushido
Refs D649

This was SVN commit r19788.
2017-06-16 16:51:30 +00:00
34f41dbe52 Style text alignment cleanup
Reviewed by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D174
This was SVN commit r19787.
2017-06-16 12:47:10 +00:00
c237b1a1c5 Prevent unintentional selection of all units following 8f36ca47a1 / D326 when doubleclicking while not in selection input mode.
Differential Revision: https://code.wildfiregames.com/D634
Fixes #4631.
Refs #4414.
Patch By: causative
This was SVN commit r19786.
2017-06-16 11:06:06 +00:00
be91dde045 Don't place muskox on mountains on arctic summer.
This was SVN commit r19783.
2017-06-16 00:34:09 +00:00
ee6a3b0094 Hide rubble in the fog of war except to the owner, so that other players don't see deleted buildings, especially civic center foundations.
Should use a special filter once the AI supports it (#4611), so that
decorative rubble can be placed by maps too.

Differential Revision: https://code.wildfiregames.com/D635
Reviewed By: fatherbushido
Refs #3601 #3910 #3179

This was SVN commit r19782.
2017-06-16 00:13:49 +00:00
bedb13ea28 Delete gui/common/functions_utility_error.js.
Move the one function in it that is globally called from the engine to
the other function that is called equally.

This was SVN commit r19781.
2017-06-15 22:44:24 +00:00
ab67d1a6f3 Delete gui/common/init.xml.
It became almost unused throughout the years and just causes confusion
when reading include lists.

Refs D619.

This was SVN commit r19780.
2017-06-15 22:11:48 +00:00
18b876bd55 Delete common/l10n.js.
It held resource strings when introduced by 0f21151c4b, but those were
moved to json files in 52f311da2b. 9b041467a2 moved two trivial
functions of this file to tooltips.js.
Remove a wrong comma from the JSdoc comment.
Alwas return a string.

Differential Revision: https://code.wildfiregames.com/D618
Confirmed by Itms in a forum PM that this doesn't break string freeze.

This was SVN commit r19779.
2017-06-15 20:42:03 +00:00