Commit Graph

21446 Commits

Author SHA1 Message Date
6a66fb8205 Chasing fix - ignore the target's obstruction to avoid colliding with it.
Units movement is currently "all or nothing". This means that a chasing
entity that moves fast enough is likely to collide with its target, if
the latter is moving also. This means that it might fail to get in range
if the max range is smaller than the movement speed over a turn.
This happens to be very much the case in MP, as cavalry range is 4,
melee cav speed is ~20 and turns are 500ms.

This problem depends on which unit moves first (i.e. which unit is
lowest-ID).

To fix this, ignore the obstruction of the target, if it is moving, when
moving. This however means sometimes chasers will 'overshoot' and block
their target pathing, making the chase easier than it probably should
be.
Fleeing units don't suffer from this problem since they also ignore
their target (and their code handles it).

This new problem introduced in this diff is heavily dependent on the
exact speeds and ranges at play, and a further diff will improve the
situation to acceptable levels.

Reported by: FeldFeld
Refs #5936

Differential Revision: https://code.wildfiregames.com/D3482
This was SVN commit r24798.
2021-01-27 17:44:31 +00:00
847f3a9995 Check for movement success/failure on turn start.
Unit Motion currently checks if the unit is at destination during the
MT_Update_Motion* step, which happens late in the turn (notably, after
Timer.js) and moreover happens while entities are being moved (e.g.
entities with lower IDs have moved already, entities with higher IDs
have yet to do so).

This changes UnitMotion to instead check at turn start, which:
- benefits from in-turn path computations for more fluid movement
- ensure that distance checks aren't done against an entity that has
already moved for the turn.

The latter issue led to units failing to get in range of their target
when chasing them, in some situations.

As a side effect, this means that UnitAI move requests always take one
turn to succeed, so orders should be updated to check for range (or
they'll waste a turn). This is done for garrisoning, other orders were
already doing so.

Also includes a small tweak to avoid units rotating randomly when they
have no movement to accomplish.

Patch by: bb
Reviewed By: wraitii
Refs #5936

Differential Revision: https://code.wildfiregames.com/D3230
This was SVN commit r24797.
2021-01-27 15:11:57 +00:00
Angen
c2155e31c0 Add private and public icons to the game list
Display locked icon for matches with password, unlocked otherwise.
This should help players to avoid clicking to the locked matches, when
they do not know password.

Differential revision: D3480
Fixes: #5949
Comments by: Stan, Freagarach, wraitii, borg
This was SVN commit r24795.
2021-01-26 20:30:20 +00:00
Angen
16a91c37e9 Limit possibility of brute force attacks when guessing password
As suggested by elexis, 1a8de6d2b8 should get some protection against
brute force attacks on password.

This is supposed to prevent attackers from getting connection data by
guessing the password.

Each failed attempt increases the counter.
XmppClient on the server side checks for the users with certain number
of failed attempts, determined in CNetServer, and refuses to check the
password, answering with banned message.
So they cant guess again in given match. Effect of this block will
dissapear after new match is created.

Differential revision: D3467
Comments by: wraitii, Stan
Tested by: Stan, Freagarach
Ref: #5913

This was SVN commit r24794.
2021-01-26 20:20:48 +00:00
515d34d277 Hotkey editor fix: don't modify hotkeys in place.
The hotkey editor could modify hotkeys despite the changes being
cancelled.

Refs #2604, Fixes #5982

Differential Revision: https://code.wildfiregames.com/D3481
This was SVN commit r24793.
2021-01-26 16:44:53 +00:00
5d99cb4580 Fix some icons issues.
- Mercenaries should be green.
- Cart super dock icon used an old background
- Due to the reduced panel icon size it was easy to confuse the stables
with the barracks
- Due to the reduced panel icon size it was easy to confuse the corral
with the farmstead.png

Reported by: @wraitii @borg-
This was SVN commit r24792.
2021-01-26 11:08:01 +00:00
1edaeedfab Fix StandGround freezing units.
Units no longer stop when ordered to stand ground. Use the Stop
command/hotkey instead.

Reviewed By: Freagarach
Fixes #5975

Differential Revision: https://code.wildfiregames.com/D3463
This was SVN commit r24791.
2021-01-26 09:29:49 +00:00
44f5c6ff50 New public key for A24 mods.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3471
This was SVN commit r24788.
2021-01-25 17:31:25 +00:00
7bbd351c67 Alpha 24 name: Xšayaṛša
Per team survey & many suggestions in the forum.

Differential Revision: https://code.wildfiregames.com/D3474
This was SVN commit r24787.
2021-01-25 17:31:11 +00:00
08afe8950d Fix persian cav archer being a Chariot.
Forgotten in 5063adb30f.

Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3477
This was SVN commit r24786.
2021-01-25 16:36:35 +00:00
804332e204 Fix NOPCH builds.
Caused by cd97df87e9

Differential Revision: https://code.wildfiregames.com/D3469
This was SVN commit r24785.
2021-01-25 11:12:11 +00:00
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
5b367ac37e Fix some issues found by @GunChleoc
This was SVN commit r24780.
2021-01-24 11:36:58 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
b7000b373a Refactors water_high shader, cleanups water changes after 9df127f9d1.
This was SVN commit r24739.
2021-01-20 22:36:11 +00:00