1
0
forked from mirrors/0ad
Commit Graph

21435 Commits

Author SHA1 Message Date
Angen 32bea42e68 Fix invalid variable used in getConnectionFailReason
Introduced in 0342f01580.
Reported by: @Stan
This was SVN commit r24783.
2021-01-24 17:59:55 +00:00
Angen 04a7d95eff Limit gather rate tooltip to 2 decimal places
Gather rates are not rounded, so after some modifiers are applied, they
appear as ugly decimal numbers.
Limiting them into 2 decimal places for readability and it looks nicer.

Differential revision: D3460
Reviewed by: @wraitii
This was SVN commit r24782.
2021-01-24 15:28:13 +00:00
Stan 5b367ac37e Fix some issues found by @GunChleoc
This was SVN commit r24780.
2021-01-24 11:36:58 +00:00
wraitii 6ebf8309e2 Increase outpost base vision to 10
Outposts have a vision range of 4. This however does not always reveal
FoW around them, which looks rather odd (see D3054).
Give them 10 vision so that it's obvious they are working, and clarify
the tooltip that garrisoning is needed to make them helpeful.

Fixes #5974

Differential Revision: https://code.wildfiregames.com/D3464
This was SVN commit r24779.
2021-01-24 11:02:00 +00:00
wraitii c640220cb2 Fix error when deserializing following f2b3c4d8ec
f2b3c4d8ec broke deserializing because it did not reset the mapsize on
Deserialize(), and thus the water renderer would not regenerate data.

Differential Revision: https://code.wildfiregames.com/D3461
This was SVN commit r24778.
2021-01-23 21:13:26 +00:00
vladislavbelov ae18a5474c Reduces shadow biases for landscape shaders.
Tested By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3457
This was SVN commit r24777.
2021-01-23 19:40:58 +00:00
wraitii 93a352ad16 Fix UnitAI range queries - allow queries to ignore sizes - partial revert of d0fc8ff67d
Units sometimes ignored targets that entered their LoS. The cause is
d0fc8ff67d: range queries returned units farther away, and those units
might actually be out of range if distance is computed center-to-center,
which both UnitAI and LOS do. This meant that code relying on range
query updates was possibly broken, and indeed units missed things (see
ticket).

This introduces a boolean to switch between pre-d0fc8ff67d behaviour
(entity-as-point, center-to-center range queries) and post-d0fc8ff67d
(entities-as-circumscribing-circle, edge-to-edge range queries).
The former is used for UnitAI (where the new behaviour bugged), auras
(where varying structure sizes made it awkward) and build
restrictions(which simply did not really need it).

Reverts 7f1ee23d88, 050c5401b1 (with the exception of the iber monument
footprint), and the template changes in d0fc8ff67d itself.

It also reduces alertRaiser ranges slightly, this was missed in the
original diff.

#3381 is not reopened as BuildingAI still uses the new range queries.

Reported by: Freagarach
Comments By: Angen
Fixes #5968

Differential Revision: https://code.wildfiregames.com/D3456
This was SVN commit r24776.
2021-01-23 18:57:46 +00:00
wraitii 4cc824d620 Net Server: Verify password in Authenticate
Follows 1a8de6d2b8.
Validate the password when a client joins a game, so even a player that
knows the connection data cannot join.

Refs #3556, Refs #5913

Differential Revision: https://code.wildfiregames.com/D3438
This was SVN commit r24775.
2021-01-23 18:04:36 +00:00
Angen 498f5eb083 Fix cheering issue entering from idle state
Introduced in e543b01077.
Units entering cheering from idle state, may not check their surrounding
for pottential targets yet, so they will react incorrectly when
attacked.
Pointed out by @Freagarach in
https://code.wildfiregames.com/D1977?id=10404#inline-52415 and turned
out to be issue.

Differential revision: D3455
Fixes: #5966
Reviewed by: @wraitii
This was SVN commit r24774.
2021-01-23 15:07:15 +00:00
wraitii 55f741e644 Fix issues with Cheering and PushOrderFront
Make sure that any pending cheering order is deleted when leaving the
Cheering state, otherwise other unitAI states can behave weirdly.

This fixes issues with units cheering at incorrect time, then not
correctly picking their next target in a fight.

Reported by: snelius
Reviewed By: Angen
Refs #5966

Differential Revision: https://code.wildfiregames.com/D3452
This was SVN commit r24773.
2021-01-23 14:08:41 +00:00
wraitii 59af6a9c46 Fix hero cavalry spearman bonus
Missed in D3256 / 61236cae5b

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3453
This was SVN commit r24772.
2021-01-23 14:01:35 +00:00
wraitii 8addf36ba8 Fix error in GATHERING when disbanding formation while members gather.
Since 59d0885d68, there is a "LeaveFormation" order to support
queued-disbanding. However, I misread the code paths and FinishOrder()
isn't always called.
This fixes that oversight.

Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3450
This was SVN commit r24771.
2021-01-23 08:07:56 +00:00
Angen 7b6ff0745a [Petra/Ai] Fix not researching free and instant technologies
When Petra encounters free technology or technology with no
researchtime, she will not start it and blocks the queue.
Also fixing seleucids.

Differential revision: D3388
Reviewed by: @wraitii
Comments by: @Freagarach, @Stan
This was SVN commit r24769.
2021-01-22 20:58:34 +00:00
vladislavbelov e7e6fe139e Allows to override GL version for SDL.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3448
This was SVN commit r24768.
2021-01-22 19:40:02 +00:00
Stan 0ce8efc286 Small icon changes, use a custom icon for the gallic plow
This was SVN commit r24767.
2021-01-22 19:28:52 +00:00
wraitii d92feab275 Fix target height computation when launching projectiles.
The Y coordinate at which to fire a projectile is currently assumed to
be the target's current Y, which is incorrect if the target is moving on
a slope.
This fixes that.

Note that this was purely visual, since projectiles still hit the target
regardless, as the height component is totally ignored, even if the
projectile is underground (in fact, the projectile's position is not
known in DelayedDamage::MissileHit, which just assumes it lands where it
said it would when fired).

As noted by bb in f737831167

Fixes #5939

Differential Revision: https://code.wildfiregames.com/D3425
This was SVN commit r24766.
2021-01-22 18:16:13 +00:00
wraitii 6b05cc9d3c Fix AI undefined error from garrisoned entities.
Introduced in 9e96bca85e.

Reported by: Freagarach
Fixes #5960

Differential Revision: https://code.wildfiregames.com/D3451
This was SVN commit r24765.
2021-01-22 17:35:45 +00:00
wraitii e76745b0b2 Revert cf6aaf37a4, causing false OOS in visual replays.
cf6aaf37a4 fixed #5546, but it seems to cause some rare OOS in visual
replays, as reported in #5909. The culprit is likely that hashes aren't
computed at quite the same moment and onDestroy changes things.

Reverting for now before A24.

Reported by: Angen
Refs #5546.
Fixes #5909

This was SVN commit r24764.
2021-01-22 17:13:12 +00:00
wraitii 3becf25fac Update bundle dist tools
- The MacOs script was not exporting the SVN revision properly.
- Rename the DMG to match the other's conventions.
- Clean up windows installer files ( Fixes #5955 )

Differential Revision: https://code.wildfiregames.com/D3370
This was SVN commit r24763.
2021-01-22 12:53:54 +00:00
wraitii ce74c41297 Fix audio leak that resulted in openAL errors after a while.
Sound items were only deleted after 'last play' when stopped, but they
could also be left in 'paused' or 'initial' states, and were then not
cleared until the game exits (effectively a memory leak). This affected
particularly music & ambient sounds, which also used the most
buffers(/memory).
On MacOS (at least), this resulted in OpenAL errors & sound failures
after a while playing the game, because MacOS has a max "in flight
buffers" of 1024.

Also clean up some control flow in CStreamItem

Reported by: Eszett
Thanks langbart for the consistent repro'.

Fixes #5265

Differential Revision: https://code.wildfiregames.com/D3445
This was SVN commit r24762.
2021-01-22 12:50:05 +00:00
Stan 9ae6f904ad Fix the non merc rhompaia having a green color
Patch by: @borg-
Differential Revision: https://code.wildfiregames.com/D3449
This was SVN commit r24761.
2021-01-22 09:19:48 +00:00
wraitii f2b3c4d8ec Fix a crash in WaterRenderer.cpp
This fixes a rare crash at map generation.
The water renderer could be left in an invalid state when exiting a
game, and would then crash on the next map generation in some cases.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3447
This was SVN commit r24759.
2021-01-22 08:14:27 +00:00
Freagarach 993ccc6034 [PetraAI] - Teach PetraAI to fear fire.
In 86ddf09640, fire damage was introduced for the Iberian fire ship (and
the Theban fire raiser), this adds that damage type to the config of
PetraAI.
Poison (a24c8419c5) is only used in Status Effects (which PetraAI
doesn't understand anyway) so is not added.

Differential revision: D3432
Reviewed by: @Angen
This was SVN commit r24758.
2021-01-22 06:32:03 +00:00
vladislavbelov 065b03a3db Removes useless transparent pass before the water for lowest settings since the water is opaque there.
This was SVN commit r24756.
2021-01-21 22:38:11 +00:00
Imarok 1a218ec4fd Fix game speed multiplier sometimes being outside overlay box and resizing in a strange way.
Reviewed by: Freagarach
Trac Tickets: #5924
Differential Revision: https://code.wildfiregames.com/D3391
This was SVN commit r24755.
2021-01-21 17:37:23 +00:00
Freagarach 9145e03bf5 Fix values of miscellaneous summary tab shifted.
Introduced in 57d0e7bd96. Caused by incomplete filtering.

Differential revision: D3340
Fixes: #5946
Reviewed by: @wraitii
Tested by: @Langbart
Comment by: @toonijn
Suggestions from: @Imarok

This was SVN commit r24754.
2021-01-21 17:12:56 +00:00
Stan 920181b838 Fix texture bleeding on sele CC.
Reported by: @gameboy
Thread:
https://wildfiregames.com/forum/topic/35564-msaa-anti-aliasing-has-no-effect/

This was SVN commit r24753.
2021-01-21 16:07:11 +00:00
wraitii 8c429b9a68 Fix unit-only Attack move.
attackmoveUnit is more specific than attackMove, so since d0a42f2f00
won't fire at the same time. However the GUI code expected that,
breaking it.

Instead, properly check for either attackmove or attackmoveUnit.

Also fix an issue with d0a42f2f00 where hotkeys would be release if
switching to a more specific combination of the same hotkey.

Reported by: snelius
Fixes #5944

Differential Revision: https://code.wildfiregames.com/D3436
This was SVN commit r24752.
2021-01-21 15:58:33 +00:00
wraitii b28e6fda42 Fix PreferredClasses following 1f2286305d
1f2286305d introduced a "Unit+!Ship" preferred class. However, Preferred
classes don't actually use MatchesClassList, and thus this resulted in
no preference whatsoever. This is fixed.

Further, Macemen & elephants have no particular preferred classes,
unlike all other land units which are either Unit+!Ship or Human (which
implies !Ship). This is fixed by setting them to !Ship, for consistency.

Reported by: snelius (and also Valirhant, I believe)
Trac Tickets: #5945

Differential Revision: https://code.wildfiregames.com/D3442
This was SVN commit r24751.
2021-01-21 14:34:08 +00:00
Stan 7a33d391cf Fix starting camera on Sicilia Nomad.
Since this map doesn't have CCs, camera would not work see
7cf83f19fd#inline-5512
Refs: 7cf83f19fd

This was SVN commit r24750.
2021-01-21 13:35:27 +00:00
wraitii 541fdd3f90 Fix string issues in edecd14b7b
(see edecd14b7b)

Reviewed By: Nescio, borg-
Differential Revision: https://code.wildfiregames.com/D3434
This was SVN commit r24749.
2021-01-21 12:17:14 +00:00
Stan 2b4ce98fee Fixes translation error in 5cc49c2326/https://code.wildfiregames.com/D1808
Noticed by: @Edwarf
This was SVN commit r24748.
2021-01-21 12:16:10 +00:00
Stan ae5ef6d898 Add back the camels to the tutorials.
Fixes: #5951
Reported by: @Freagarach
Refs: c72861b708, 4981cdedad

This was SVN commit r24747.
2021-01-21 11:53:01 +00:00
vladislavbelov d85a73fabf Fixes simple ARB water after 9df127f9d1. Completely removing losMatrix usages. Fixes #5952
This was SVN commit r24746.
2021-01-21 11:35:20 +00:00
wraitii 37729586dc Don't pause music when pausing the game / Fix victory music in SP.
Victory music doesn't work in A24 SP. That's because the modal pauses
the game, and pausing the game pauses music.
This has been the case since c9a5d5cee5.

Auto-pausing the game (structree, ...) didn't really happen in the past,
but A24 makes it relatively common, and I think pausing the music is a
bit jarring then, so this simply removes that.

Reported by: Langbart
Fixes #5941

Differential Revision: https://code.wildfiregames.com/D3433
This was SVN commit r24744.
2021-01-21 09:34:20 +00:00
wraitii 4af962618e Add Shift+Space as an alternative Pause hotkey
Mac keyboards have no "Pause" button. As an alternative, introduce
'Shift+Space' (used in Factorio).
P is already used for Patrol.

Reported by: langbart
Fixes #5943

Differential Revision: https://code.wildfiregames.com/D3435
This was SVN commit r24743.
2021-01-21 09:31:50 +00:00
wraitii 1877871be0 Fix issue with 5d2be02f68
std::string_views are created pointing to vector-owned strings, but
those strings can use Short String Optimisation (storing the data
inline, i.e. in vector memory). When the vector is resized, the strings
are moved and those string_views now point to invalid memory.

To fix it, use std::deque which does not invalidate pointers on
push_back.

Fixes 5d2be02f68.

Reviewed By: vladislavbelov
Fixes #5950

Differential Revision: https://code.wildfiregames.com/D3441
This was SVN commit r24742.
2021-01-21 08:42:05 +00:00
vladislavbelov 5d2be02f68 Optimization for include resolving in PreprocessorWrapper.
Reduces the number of copying and decreases the computational
complexity.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3439
This was SVN commit r24740.
2021-01-20 23:05:15 +00:00
vladislavbelov b7000b373a Refactors water_high shader, cleanups water changes after 9df127f9d1.
This was SVN commit r24739.
2021-01-20 22:36:11 +00:00
wraitii 6e8208aee6 [gameplay] Buff Iber champion cavalry damage
With the new 'fire' status effect, the damage against buildings was much
lower than in A23. This upgrades it from 2 to 6.

Reported by: soloooy0
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3430
This was SVN commit r24738.
2021-01-20 21:44:02 +00:00
wraitii 5db90dd8ab Upgrade ship_movement_speed / tower_health icons
Patch by: borg
Differential Revision: https://code.wildfiregames.com/D3302
This was SVN commit r24737.
2021-01-20 21:39:54 +00:00
Imarok 2daec55dcd Fix attack notification (a3eccc043d)
Reviewed by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3387
This was SVN commit r24736.
2021-01-20 21:00:40 +00:00
Imarok 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
vladislavbelov 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
wraitii 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
s0600204 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
s0600204 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