1
0
forked from mirrors/0ad
Commit Graph

21488 Commits

Author SHA1 Message Date
wraitii c009eae0a5 Lobbybots: update readme to reflect mod_ipstamp being optional
Following #5913, mod_ipstamp is no longer required to enable STUN
hosting (it can only be useful to enable non-STUN hosting).
This updates the readme to reflect that, and fixes some markdown issues.

Differential Revision: https://code.wildfiregames.com/D3473
This was SVN commit r24857.
2021-02-08 14:22:01 +00:00
Stan f222dd2d3e Make pages relying on hotkeys more resilient
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D3541
This was SVN commit r24856.
2021-02-08 13:56:40 +00:00
wraitii a4c698ac48 Fix units restarting orders when tasked to attack/gather/repair/heal same unit.
FSM states would be left/re-entered, resetting the timer, which did not
happen pre a16e7c0a56 and is undesirable in general.
This explicitly checks for a few cases where timers are relevant.

Essentially a Patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3531
This was SVN commit r24855.
2021-02-08 10:20:34 +00:00
wraitii 831e4a183f Fix a crash in the mod selector when using the mod downloadder.
When closing the mod downloader, the list of enabled mod is reset, which
can lead to an out-of-index assertion failing in the engine if an
enabled mod was selected before.

Reported by: Vas
Fixes #6001

Differential Revision: https://code.wildfiregames.com/D3537
This was SVN commit r24854.
2021-02-08 10:13:06 +00:00
wraitii 612515a163 Debounce gamesetup network messages & slider changes to avoid lag.
Gamesetup Net synchronisation messages are sent on any change, which
includes slider changes. They can be quite slow for clients to process,
so it makes sense to introduce some 'debounce' here. I picked 400ms
somewhat arbitrarily.

Sliders also call UpdateGameAttributes, which can also lag, so run it
only once per 50ms at most.

Reported by: nani
Differential Revision: https://code.wildfiregames.com/D3536
This was SVN commit r24852.
2021-02-07 18:00:57 +00:00
wraitii 65195211a8 [gameplay] Reduce iberian fireship attack
86ddf09640 had buffed them by giving them Fire damage, which ships have
no resistance against. This made the too strong.

Patch By: Feldfeld
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3538
This was SVN commit r24851.
2021-02-07 15:59:54 +00:00
Angen ab2fb3e6b0 [gameplay-a24] Tweak elephant stable building time
As pointed out by Edwarf in the forum post, the elephant stable is
rather expensive compared to the arsenal (both are city-phase
structures).
This patch keeps the elephant stable's resource costs unchanged (it is
visually larger than the other three military structures), but lowers
the building time from 240 s to 180 s.

Differential revision: D3515
Reviewed by: @borg-
Patch by: @Nescio
This was SVN commit r24850.
2021-02-07 12:56:59 +00:00
Angen 819db85ab6 [gameplay-a24] Make unlock_spies technology cheaper
As pointed out by Edwarf in this forum post, the espionage technology is
rather expensive. This patch removes the wood and stone costs and
reduces the research time.

Differential revision: D3516
Reviewed by: @borg-
Patch by: @Nescio
This was SVN commit r24849.
2021-02-07 12:53:23 +00:00
Angen 8135928ff4 Fix wrong selecting of the match when updating list introduced in 1a8de6d2b8
hostUsername is member of stanza
stanza does not have gameName but name

Reviewed by: @wraitii
Differential revision: D3524
This was SVN commit r24848.
2021-02-07 12:50:42 +00:00
wraitii 53100974d9 Fix blurry textures in Bundle by bundling with mod mod in CI
The "public" archive needs to be built with the mod mod active, to load
textures.xml files. This saves a few MBs as a side effect.

Fixes #6000

Differential Revision: https://code.wildfiregames.com/D3534
This was SVN commit r24847.
2021-02-07 11:36:34 +00:00
wraitii d88db989a0 Reduce interline space for lobby/gamesetup chats.
Post f78d3ddf71, chat uses a list, which has natively a larger interline
space.
This introduces a new style to revert to A23-like interline, making chat
denser and better looking.

Patch By: nani
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3533
This was SVN commit r24846.
2021-02-07 11:18:21 +00:00
Stan d3c593666f Only parse querystring in RL Interface if it exists.
Patch by: @irishninja
Differential Revision: https://code.wildfiregames.com/D3529
This was SVN commit r24844.
2021-02-06 23:00:45 +00:00
Imarok d17079a640 Fix Phoenician Trireme
Reviewed by: Freagarach
Fixes: #5998
Differential Revision: https://code.wildfiregames.com/D3526
This was SVN commit r24843.
2021-02-06 20:30:07 +00:00
Stan dd9e14d5d1 Move SSE.h to a better place. Rename it to simd.h after discussion with @OptimusShepard and @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3437
This was SVN commit r24840.
2021-02-05 12:40:59 +00:00
Stan e3c44f0bde Fix more issues with the RLInterface
Patch by: @Stan, @irishninja
Differential Revision: https://code.wildfiregames.com/D3385
This was SVN commit r24839.
2021-02-05 12:23:02 +00:00
Stan 321e3652f9 Fix and disable some pesky Windows warnings.
Differential Revision: https://code.wildfiregames.com/D3511
This was SVN commit r24838.
2021-02-05 12:20:06 +00:00
vladislavbelov 5eb7fba3bd Further VertexBuffer improvements after b3cbee6ba9.
Chunk merging is based on patch D2528 by @dm.

This was SVN commit r24835.
2021-02-04 23:48:30 +00:00
vladislavbelov b3cbee6ba9 Performance improvements to VertexBuffer.
Patch By: dm
Tested By: OptimusShepard, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2528
This was SVN commit r24834.
2021-02-04 23:26:37 +00:00
vladislavbelov a564892fab Removes redundant normalizations for float types.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3517
This was SVN commit r24833.
2021-02-04 20:03:03 +00:00
Freagarach 6dba34e915 Fix team population in summary graphs.
Introduced in 57d0e7bd96, missed in 9145e03bf5.

Differential revision: D3519
This was SVN commit r24832.
2021-02-04 17:40:47 +00:00
wraitii 5d96346ac5 Fix units 'waltzing' in place in formation.
Following 847f3a9995,
Units in formation can get very small movement offsets, that nonetheless
require large rotations, and thus at least 2 turns to accomplish.
However, following 847f3a9995, PossiblyAtDestination fires() only after
the first rotation, so the unit ends up 'waltzing' in place.
Before that diff, the unit never even moved since PossiblyAtDestination
fired straight away.

This is also noticeable since IDLE formation re-order their members
since 71a61d5f50.

The fix here is to ignore rotation time for very small offsets, which
lets units accomplish the movement in one turn and fixes the issue.

Reported by: wowgetoffyourcellphone
Reviewed By: Freagarach
Tested By: langbart
Differential Revision: https://code.wildfiregames.com/D3518
This was SVN commit r24831.
2021-02-04 16:58:19 +00:00
s0600204 3ea0e0c903 Use power-of-two sized image in Catafalque page
Should fix concern raised on a30c4a69f7 raised by @vladislavbelov


Differential Revision: https://code.wildfiregames.com/D3332
This was SVN commit r24829.
2021-02-04 00:38:05 +00:00
vladislavbelov f8fde587a0 Removes unused dummy shader from decals rendering.
This was SVN commit r24828.
2021-02-04 00:00:55 +00:00
vladislavbelov 333f7b4fb4 Fixes building snapping for non-square foundations. Fixes #5976
Tested By: Freagarach, Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D3510
This was SVN commit r24827.
2021-02-03 17:03:44 +00:00
vladislavbelov 30fc281a4c Significantly reduces number of OpenGL state changes for terrain rendering.
Tested By: Freagarach, Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D3512
This was SVN commit r24826.
2021-02-03 17:01:38 +00:00
wraitii 90d39107a7 Fix Z-fight in the menu
Fixes 5657c5211b

Reported by: Vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3494
This was SVN commit r24825.
2021-02-03 11:01:08 +00:00
wraitii 5c71960883 Fix map browser scrolling
When hovering over the background, the scrolling was suddenly reversed
and could loop around.

Tested By: Langbart
Fixes #5993

Differential Revision: https://code.wildfiregames.com/D3514
This was SVN commit r24824.
2021-02-03 10:14:10 +00:00
vladislavbelov 55f6eae7c5 Removes unused dummy shader from terrain rendering.
This was SVN commit r24822.
2021-02-02 15:34:52 +00:00
wraitii 1ae4f497e8 Fix noisy errors when joining hte lobby and someone is hosting a modded game.
Check for existence explicitly in the lobby GUI.
It would probably be better to not trigger errors in the cache
laoder/JSON code but instead print at the caller, depending, but that
requires changing a lot more code.

Reported by: Asger
Fixes #5988

Differential Revision: https://code.wildfiregames.com/D3506
This was SVN commit r24821.
2021-02-02 14:55:45 +00:00
wraitii 6b2f16bbc2 [gameplay] - Reduce CS cavalry build time back to 16
Partial revert of 8df9d8dcc3. Following some testing, this build time
increase made early cav rushes too difficult.

Accepted by: borg-, FeldFeld, Valirhant
Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D3508
This was SVN commit r24820.
2021-02-02 09:49:42 +00:00
Angen 0c1a45259f React to Attacked message in IDLE when really idle
Issue described in #5945.
Unit finishing the order such as walking, will reach destination and if
attacked, imediately reacts to the attacker.
Hovewer, more desireble is for unit to look around since entering idle
state and pick the target if any using preference and then react to
attacker.
This issue rised up after finding of new targets have been moved from
enter to timer to avoid infinite loops after alwaysenterstate logic
removal.

Only downside here is unit will receive few hits before reacting as we
are waiting to the timer first. This happens only if unit goes idle.

Differential revision: D3504
Reviewed by: Freagarach
Comments by: wraitii
Fixes: #5945

This was SVN commit r24818.
2021-02-01 19:58:09 +00:00
Stan 151513f48d Allow the windows CI to post comments on differentials like other pipelines.
Differential Revision: https://code.wildfiregames.com/D2946
This was SVN commit r24817.
2021-02-01 15:05:07 +00:00
wraitii 42b068d9c9 RL: Update template paths & remove debug-print.
debug-print was removed in 992d740a58, templates were changed in
b57abe806c

Patch by: irishninja
Differential Revision: https://code.wildfiregames.com/D3502
This was SVN commit r24816.
2021-02-01 14:53:40 +00:00
vladislavbelov f76f557d5c Stops parsing a shader if an include has an error.
This was SVN commit r24815.
2021-02-01 14:12:30 +00:00
vladislavbelov 02f2be9272 Adds logging of a shader name on an error after reload.
Differential Revision: https://code.wildfiregames.com/D3462
This was SVN commit r24814.
2021-02-01 13:50:07 +00:00
wraitii e4ac538c91 Change ENSURE in BinarySerializer to try and get more debug data.
I'm hoping this will give us more information on what's going wrong.

Also remove comments which were outdated since 7460d0e56e

Refs #5987

Differential Revision: https://code.wildfiregames.com/D3501
This was SVN commit r24811.
2021-01-30 09:13:13 +00:00
Freagarach 11ed0fd619 Alpha name V3.
Like the rocket. Lets get this over with.

Patch by: @Nescio
Differential revision: D3498
This was SVN commit r24808.
2021-01-29 14:38:46 +00:00
wraitii 884b55c124 Correct transliteration of A24 name
The last vowel is long.
(SF has been accidentally broken this morning).

Reported by: Nescio
This was SVN commit r24806.
2021-01-29 11:19:25 +00:00
wraitii 48f72b0e17 Fix ranged unit chasing following 847f3a9995
D3230 / 847f3a9995 introduced range checking at turn start, and removed
a hack that made units predict the position of their target too far
ahead. This worked fine when in "straight movement" mode, unfortunately
I failed to recognise that ranged units would never use that mode. This
meant that ranged-unit chasing was broken.

There is a straightforward fix however, since we can simply change
TryGoingStraightToTarget to be used by ranged units. It fixes the issue
efficiently and improves movement for ranged units in general, so it
probably should have been done from the start.

Refs #5936

Differential Revision: https://code.wildfiregames.com/D3489
This was SVN commit r24803.
2021-01-27 21:55:49 +00:00
wraitii 5701ffccf8 [gameplay] Adjust cavalry movement speed and melee attack range.
Nerf cavalry movement speed somewhat, by reducing walk speed and their
run multiplier.

Further, following 6a66fb8205, units have a chance of going through
their target when chasing them. This diff adjusts melee cavalry ranges
from 4 to 6 to reduce the probability of that happening. The speed
reduction also helps with this.

Refs #5936

Differential Revision: https://code.wildfiregames.com/D3483
This was SVN commit r24802.
2021-01-27 21:22:40 +00:00
wraitii 7b88b1a0f9 UnitMotion - Additional chasing fixes
- Because units slow down when turning, and JPS paths often begin with a
J-shape, chasers can fail to catch up to slower chasee, because the
latter don't recompute paths as often. To fix this, ignore the first
waypoint if it's close by and the next is accessible.
- Don't interpolate the target position when interpolation isn't
necessary (i.e. when not processing the MT_Update_Motion* message), as
that resulted in the "follow known bad path" hack to active
un-necessarily.
- Tweak PathingUpdateNeeded, it will return true when it has no path to
follow
- Remove the direct-range consideration in the "distance uncertainty"
calculation.

Refs #5936

Differential Revision: https://code.wildfiregames.com/D3485
This was SVN commit r24800.
2021-01-27 19:13:29 +00:00
wraitii 8df9d8dcc3 [gameplay] A24 Cavalry build time increase / speed tech cost increase
Slight debuff for cavalry: increase their build time but slightly above
10%, and increase the cost of the +10% movement speed technology.

Accepted By: FeldFeld, borg-, Nescio
Differential Revision: https://code.wildfiregames.com/D3476
This was SVN commit r24799.
2021-01-27 17:54:00 +00:00
wraitii 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
wraitii 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
wraitii 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
Stan 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
wraitii 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
Itms 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