1
0
forked from 0ad/0ad
Commit Graph

21393 Commits

Author SHA1 Message Date
06c570bf7b Fix game speed button being unusable in min resolution
Reviewed by: ffffffff
Fixes: #5926
Differential Revision: https://code.wildfiregames.com/D3389
This was SVN commit r24735.
2021-01-20 20:48:50 +00:00
Angen
3991dd6c38 Fix incorrect user identifier used in 0342f01580
iq uses lowercased version of user name, but patch was saving raw one.
Found by: @Freagarach
This was SVN commit r24733.
2021-01-20 19:54:16 +00:00
9df127f9d1 Removes shader code duplication to calculate LOS.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3428
This was SVN commit r24732.
2021-01-20 18:46:32 +00:00
Angen
71eaeb853c Fix not applying modifiers on upgrades in structure tree
When one hovers over gate in structure tree (e.g. gauls), it shows
unmodified hp.
As soon as one opens template viewer, one can see correct values.

Reason is that when getting values of upgrades, civ modifiers are not
applied.

Differential revision: D3427
Reviewed by: @wraitii, @s0600204
This was SVN commit r24730.
2021-01-20 18:42:40 +00:00
3d4d617079 [gameplay] Tweak Maurya worker elephant
Maurya players had little incentive to build further support elephants.
This reduces their cost to make it more interesting for players.
It also reduces their Resistance, which was un-naturally high for a
support unit.

Patch by: FeldFeld
Accepted by: borg-
Differential Revision: https://code.wildfiregames.com/D2852
This was SVN commit r24729.
2021-01-20 18:34:09 +00:00
Angen
1a8de6d2b8 Hide ip and port from users until they want to join, add optional password
Current issue with the lobby, is that we make ips of hosts public for
anyone to read. This patch consists of 3 parts.
1.) Removing ips and ports from lobby javascript
2.) Removing need of script on the server to attach public ips to game
stanza by asking the host using xmppclient as proxy.
3.) Implementing password protected matches, to deny this information to
not trusted players.

Further description:
Do not send ports and stunip to the bots.

Removed from stanza.
Do not send ip to the lobby.

Removed from mapping gamelist from backend to gui (still on the backend
side, because it is done by script on 0ad server).
Get ip and ports on request when trying to connect.

On the host side, ask stun server what is host's public ip and remember
it.
On the client side, send iq through xmppclient to the hosting player and
ask for ip, port and if Stun is used, then if answer is success,
continue
   with connecting, else fail.
Add optional password for matches.

Add password required identifier to the stanza.
Allow host to setup password for the match. Hash it on the host side and
store inside Netserver. If no password is given, matches will behave
as it is not required.
On the client side, if password for the match is required, show
additional window before trying to connect and ask for password, then
hash it
and send with iq request for ip, port and stun.
Server will answer with ip, port and stun only if passwords matches,
else will asnwer with error string.
Some security:
Passwords are hashed before sending, so it is not easy to guess what
users typed. (per wraitii)
Hashes are using different salt as lobby hashing and not using usernames
as salt (as that is not doable), so they are different even typing the
same password as for the lobby account.
Client remembers which user was asked for connection data and iq's id of
request. If answer doesn't match these things, it is ignored. (thnx
user1)
Every request for connection data is logged with hostname of the
requester to the mainlog file (no ips).
If user gets iq to send connection data and is not hosting the match,
will respond with error string "not_server".
If server gets iq::result with connection data, request is ignored.

Differential revision: D3184
Reviewed by: @wraitii
Comments by: @Stan, @bb, @Imarok, @vladislavbelov
Tested in lobby

This was SVN commit r24728.
2021-01-20 18:31:39 +00:00
a30c4a69f7 Commit the actual images for bbd808349f
(Cursed `arcanist`)


Differential Revision: https://code.wildfiregames.com/D3332
This was SVN commit r24727.
2021-01-20 15:17:20 +00:00
bbd808349f Add a "Catafalque Bonuses" page
Permitting easy(ish) comparison of the bonuses granted by each civ's
Catafalque unit.

Accessible from the Main Menu's "Learn to Play" submenu.


Accepted by: @Freagarach
Comments by: @wowgetoffyourcellphone
Screenshot: https://code.wildfiregames.com/F1785729
Differential Revision: https://code.wildfiregames.com/D3332
This was SVN commit r24726.
2021-01-20 15:12:08 +00:00
b5bbed4690 [gameplay] Rework attack forge techs
Follow up to D3287/9a3da390b9.
- Remove the specialised infantry/cavalry attack technologies, in favour
of generalist melee/ranged techs to make it easier to switch army
compositions.
- Lower the costs of the technologies substantially.
- Make melee techs cost Food/Metal and Ranged techs Wood/Metal, like
resistance techs.
- City phase upgrades take 60s
- New names and descriptions for the ranged attack technologies.

Initial patch by @borg-, rebased and updated by @Nescio.

Differential Revision: https://code.wildfiregames.com/D3366
This was SVN commit r24725.
2021-01-20 14:23:16 +00:00
406ce2f5e2 Fix error emitted if an Observer opens structree/civinfo via hotkey
This was SVN commit r24724.
2021-01-20 14:11:48 +00:00
78bf609986 Correct grammar in tooltip
Whilst "merely" *is* in the thesaurus as a synonym for "only", it
doesn't work
in this context.

This was SVN commit r24723.
2021-01-20 13:50:33 +00:00
edecd14b7b [gameplay] Update siege techs.
A23 siege techs were rarely used. This:
- Lowers the cost of the attack tech slightly.
- Remove the cost techs which were not very useful or interesting.
- Rework the armor tech into a Health bonus
- Introduces a tech to pack/unpack faster.

Patch By: borg-
Accepted By: Feldfeld
Differential Revision: https://code.wildfiregames.com/D2878
This was SVN commit r24722.
2021-01-20 09:44:30 +00:00
57d0e7bd96 Add resource and population counts to the summary screen.
Patch by: @toonijn
Differential revision: D3395
Fixes: #4554
Reviewed by: @Freagarach, @wraitii
Comments by: @Angen, @Imarok, @Stan
This was SVN commit r24721.
2021-01-20 09:24:26 +00:00
cd97df87e9 Fix instacrash when saving a game & serialization fails for "no Deserialize"
9fc6c3c897 stopped supporting components with a non-null Serialize() and
a null Deserialize().
Unfortunately, these throw exceptions and it appears we have codepaths
that don't handle these exceptions (possibly all of them). Since this
error is likely, and easily fixable, and doesn't actually _crash_, I'll
issue a LogError for now.

This will possibly help modders update to A24.

Differential Revision: https://code.wildfiregames.com/D3422
This was SVN commit r24720.
2021-01-20 08:16:34 +00:00
3731886e2c [Gameplay] - Make gather technologies less effective.
Since they were deemed too powerful.

Patch by: @Nescio
Differential revision: D3404
Reviewed by: @Feldfeld, @wraitii
Reservations by: @borg-
Comments by: @Stan
This was SVN commit r24719.
2021-01-20 08:08:34 +00:00
5ee16b6d65 [Gameplay] - Remove starting hoplite from Spartans.
Deemed too overpowered.

Patch by: @Nescio
Differential revision: D3426
Reverts 214299b6c1

This was SVN commit r24718.
2021-01-20 07:15:18 +00:00
a9b1474d4c Armour -> Resistance in aura descriptions.
Refs 0f91c5ac61.

Patch by: @Nescio
Differential revision: D3403
Comment by: @wraitii
This was SVN commit r24717.
2021-01-20 07:11:00 +00:00
ccce5719cc Update <civ>.json information.
Removed false information, added information that was missing.
Removed history of stronger Spartan women in the game.

Initial patch by: @ValihrAnt
Redone by: @Nescio
Cleaned in between by: s0600204
Differential revision: D2720
Comments by: @asterix, @badosu, @borg-, @elexis, @Stan, @wraitii
This was SVN commit r24716.
2021-01-20 07:08:08 +00:00
9ffeb02b8a Fix typo in intro.txt
This was SVN commit r24713.
2021-01-20 00:02:47 +00:00
19eb21b647 Lower rolloff so that players that play from very high still hear sound.
Reported by: @ValihrAnt,  @Feldfeld
Discussed with: @Samulis
Refs: https://code.wildfiregames.com/D3108 / 876f6d5e50

This was SVN commit r24712.
2021-01-19 22:40:56 +00:00
7c3e885cef Implements binding a float array as a uniform input.
This was SVN commit r24711.
2021-01-19 19:57:31 +00:00
5cbf8f04ec Removes code duplications for binding shadows to shaders.
This was SVN commit r24710.
2021-01-19 19:19:04 +00:00
4a2cc3273e [gameplay] Tweak Ranged spreads, reduce archer spread, tweak cosmetic stats.
The major change here is that Archer spread is reduced to 2 to make them
have much better aim than before at max-range, where they often missed.
This makes their DPS more predictable over their range.

This makes ranged unit's spread proportional between citizen soldiers,
advanced/elite CS, champions and heroes.

Because of the spread reduction and because promotion more strongly
reduces spread, the 10% spread reduction from the archery tradition
technology is removed.

Gravity values are tweaked.
LaunchPoint values are raised and standardised by unit type.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D3374
This was SVN commit r24709.
2021-01-19 19:15:06 +00:00
9d82ae15af [gameplay] Fix chasing range cavalry
This fixes chasing, particularly chasing ranged cavalry.

- Standardise the range of melee cav to 4.
- Decreases the speed of ranged cavalry slightly to make melee cavalry a
better counter & reduce the ability of ranged cavalry to dominate an
area.
- Fix UnitMotion to better chase units, by increasing direct-range
distance and making "from scratch" short paths recompute better paths
(by increasing the search range).
- Gives some free rotation time for slight angles to units. Angles below
30° take no time to rotate towards. Chasing units that recomputed a lot
of paths could be slowed down substantially by minute angle differences.

Fixes #5936

Differential Revision: https://code.wildfiregames.com/D3402
This was SVN commit r24708.
2021-01-19 19:09:55 +00:00
bc7977946b Fix missing const in f737831167
This was SVN commit r24707.
2021-01-19 18:59:46 +00:00
7ec924107c Fixes RNC and RNG after merging terrain and unit ambient colors in 1cb4ee1634.
This was SVN commit r24706.
2021-01-19 18:54:07 +00:00
1311e22bb4 Add numbered icons for certain technologies.
Refs: D3404

This was SVN commit r24705.
2021-01-19 18:34:52 +00:00
078b4100c1 Fixes FreeBSD build on 12.2
- Fix compiler warning with Clang
- Fix usage of libiconv
- Fix an incorrect SSE macro in NVTT for SSE

Patch by: @madpilot and Stan
Fixes: #5255
Differential Revision: https://code.wildfiregames.com/D3421
This was SVN commit r24704.
2021-01-19 16:59:53 +00:00
e10202d64d Tweaks to the 'auto formation' feature.
- Add an option to control the 'null formation' override, so it can be
turned off/on independently of having a default formation set. It
defaults to "Walk/Patrol only".
- Make only 'walk' and 'patrol' orders use the default formation.

This makes the system more flexible, and easier to use for competitive
play.

Differential Revision: https://code.wildfiregames.com/D3413
This was SVN commit r24703.
2021-01-19 16:14:07 +00:00
f737831167 Use UnitMotion to predict target position in Attack.js to prevent 'dancing'
Attack.js can use UnitMotion to calculate the position of the unit in
the future, accounting for odd movements such
as zigzags, turnarouds and early stops (to the extent of the current
order).
This improves the resilience of units against the 'dancing' trick.

The linear interpolation is kept as a failsafe and to avoid an edge case
in the new prediction code.

Patch by: bb
Refs #5106

Differential Revision: https://code.wildfiregames.com/D3225
This was SVN commit r24701.
2021-01-19 15:59:03 +00:00
59b468a0df [Gameplay] - Increase Skiritai cost.
As pointed out by @Feldfeld, Spartan swordsmen are much better troops
than basic soldiers, yet hardly cost more. Moreover, 8e19745bba
practically doubled their gather speed (from 25% to 49%).
This raises their cost a bit, to a total of 125 resources, instead of
110. For comparison, basic infantry has a total cost of 100, champion
infantry 220.

Patch by: @Nescio
Differential revision: D3423
Reviewed by: @borg-, @wraitii
This was SVN commit r24700.
2021-01-19 13:55:47 +00:00
0ba74a5cef Minor Hotkey editor QoL: enable Save on changes only.
This enables the 'save' button only when there is (probably) something
to save. It improves the UX of using the editor since it gives feedback
that the hotkeys were indeed saved.

Refs #5867

Differential Revision: https://code.wildfiregames.com/D3419
This was SVN commit r24699.
2021-01-19 13:14:20 +00:00
876ac2fead Prevent double-click when moving the mouse.
SDL 2.0.9 introduced a 32-pixel leeway for double clicks to register,
which makes it possible to trigger "select all units of the same type"
behaviour while trying to select different units that are close by.

This effectively reverts that by setting the "hint" to 1.

Fixes #5920

Differential Revision: https://code.wildfiregames.com/D3420
This was SVN commit r24698.
2021-01-19 13:13:00 +00:00
60ac4543c1 [Gameplay] - Enable Cart apartment.
Basically a beefed up house.

Original patch by: @borg-
Redone by: @Nescio
Icon by: @Stan
Differential revision: D2917
Reviewed by: @borg-, @Palaxin,
Comments by: @Freagarach, @genava55, @wraitii
This was SVN commit r24697.
2021-01-19 11:05:12 +00:00
d42c76ceb7 Fix seleucid mercenary building the library after 04240f05a7
Fixes 04240f05a7

Reported by: Hidan
Differential Revision: https://code.wildfiregames.com/D3414
This was SVN commit r24696.
2021-01-19 08:54:07 +00:00
c777c11641 Delete obsolete ptol nubian archer
The Ptolemy have not used it since A21, and Kushites have a better
Nubian archer.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3415
This was SVN commit r24695.
2021-01-19 08:51:16 +00:00
f1de414a6d Fix sound not played when being attacked by non-capture attacks.
Wrong assumptions on reviewing 2627714c07 and 7f7a3edfae made it such
that non-capture attacks did not play a being-attacked sound anymore.
We only want a different sound when being captured.

Differential revision: D3408
Tested by: @Stan
This was SVN commit r24694.
2021-01-19 07:22:27 +00:00
214299b6c1 [Gameplay] - Let Spartans start with a Champion.
The Kushites start their games with an healer, the Mauryas with an
elephant. The Spartans were known for their superior hoplites; this
patch gives them one champion infantry at game start, to make them feel
a bit different from other factions. It won't suddenly make them win
games, although it could help a bit defending against very early raids.
Somewhat relevant forum threads:
https://wildfiregames.com/forum/topic/35419-differentiating-civs-spartans/
and
https://wildfiregames.com/forum/topic/22868-rethinking-the-meta-with-sparta-a-historical-approach/?tab=comments#comment-338125.

Patch by: @Nescio
Differential revision: D3412
Reviewed by: @Palaxin, @wraitii
Reservations by: @ValihrAnt
Comment by: @borg-
This was SVN commit r24693.
2021-01-19 07:03:36 +00:00
77dc5ef955 [Gameplay] - Merge wonder population auras.
Since wonders already have many bonuses by default.
This merges the two population auras to one that increases the
population cap after researching the technology and instead of flat +50,
it now is relative: +20%.

Patch by: @Nescio
Differential revision: D2951
Reviewed by: @Palaxin
Comments by: @badosu, @borg-,
Reservations by: @bb, @Freagarach
This was SVN commit r24692.
2021-01-19 07:00:07 +00:00
11ef6b17d0 [gameplay] Tweak market technologies
- Remove movement speed technology, which was a straight trade bonus.
- Buffed health tech from +2 armour to +50% HP, moved to town phase,
made costlier.
- Changed gain of trade techs to +15% each.

The intent is to slightly reduce the snowballing effect from trade
techs.

Patch by: Nescio
Comments by: borg-
Differential Revision: https://code.wildfiregames.com/D3357
This was SVN commit r24690.
2021-01-18 20:23:21 +00:00
279f1823df [gameplay] Cleanup to / rebalancing of animal templates
All animals have the default resistance of 1H/1P/1C. This makes macemen
able to kill them again.
Damage has been reduced on some templates.
HP has been reduced across the board.
Fix the goat cost with respect to other domestic animals after
D3301/082bd8bd44.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3397
This was SVN commit r24689.
2021-01-18 20:19:38 +00:00
c57a4d90a1 Fix segfault from a formation infinite loop.
#5932 reported a segfault. The direct cause is an infinite loop in
Order.Repair in a formation controller.
There are multiple issues at play here, but the core problem is that the
controller has been marked for destruction, but remains alive over the
turn and UnitAI timers can fire. This leads to an unexpected state that
triggers an infinite loop.

To avoid this problem, immediately switch the formation controller to a
clean state when it's being disbanded.

Fixes #5932

Differential Revision: https://code.wildfiregames.com/D3410
This was SVN commit r24688.
2021-01-18 18:29:40 +00:00
04240f05a7 [gameplay] Tweak mace, ptol, sele specific structures
- Make the library a Ptolemaic exclusive. The tech discount is 15%
unstackable.
- Enable Theater for Ptolemy & Seleucid, tweak stats.
- 'Hellenistic Metropolis' is now in the Civil Centre, and no longer
affects military colonies/crannogs.
- The Ptolemaic lighthouse no longer reveals all shores, instead simply
has a very large vision range. It's moved to City Phase.
- The Carthaginian super dock is moved to city pahse as well.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3350
This was SVN commit r24687.
2021-01-18 18:19:11 +00:00
8172dbbde0 Fix lobby gamelist issues when clients join and leave a match.
This patch will:

  - Pass `gameRegisterStanza` to `playerAssignmentsControl` constructor.
  - Remove handlers for `onClientJoin` and `onClientLeave` from
`gameRegisterStanza` class.
  - Call `gameRegisterStanza` method `sendImmediately` only once after
all handlers have run and after updating g_PlayerAssignments .
  - Remove from `gameRegisterStanza` the dependency on
`playerAssignmentsControl` since the `onClientJoin` and `onClientLeave`
handlers are removed.

Reviewers: Angen, wraitii

Accepted By: wraitii
Trac Tickets: #5929, #5933

Differential Revision: https://code.wildfiregames.com/D3406
This was SVN commit r24686.
2021-01-18 16:47:25 +00:00
d583048690 [gameplay] Make siege engines uncapturable
Siege engines are faster to destroy than to capture. As such, capture as
a default is annoying, since it's not the best tactical choice.
Unfortunately, fixing this for now means removing "Capturable" from
siege engines.

Rams/Siege towers retain 50 Pierce Armour, others get 25.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2493
This was SVN commit r24685.
2021-01-18 16:06:08 +00:00
82a07e23fb Fix MapBrowser in MP
Network settings must be synchronised when the map selection is
submitted. Fixes ae9ea5b859.

Reported by: Imarok
Differential Revision: https://code.wildfiregames.com/D3405
This was SVN commit r24684.
2021-01-18 13:22:06 +00:00
6062a95720 Fix Jebel barka's pmp file.
This was SVN commit r24683.
2021-01-18 13:02:38 +00:00
483cef87d4 Fix 3872ee43b5 and 768c84aa46
Tested by: @Langbart
Fixes: #5934

Differential Revision: https://code.wildfiregames.com/D3409
This was SVN commit r24682.
2021-01-18 12:16:27 +00:00
a5bad817a0 Fix mod selector "refresh list" button.
Object.Keys() on GUI object doesn't work following 7c04ea0211.

Reported by: Stan
Fixes #5931

Differential Revision: https://code.wildfiregames.com/D3399
This was SVN commit r24681.
2021-01-18 11:32:51 +00:00
58039b6017 [gameplay] Restore civic centre garrison healing
This was removed originally in D3264/eb1163b872.
It made early-game aggression less viable.

Approved By: FeldFeld, borg-, ValihrAnt
Differential Revision: https://code.wildfiregames.com/D3401
This was SVN commit r24680.
2021-01-18 11:21:35 +00:00