Follows d0a42f2f00.
Because only the most specific hotkeys can be active at any time,
releasing a key may require re-activating less specific hotkeys.
There were two issues with this behaviour:
- It was buggy, as it only checked one active key, when any still active
key can trigger hotkeys.
- "HotkeyPress" and "HotkeyDown" events where sent, as if the hotkey was
pressed, which was unexpected for most code/users (it is unusual to have
a "Press" event on key release).
This fixes these issues by "silently" re-triggering the hotkeys in such
a case. It also makes it easier for JS code to use "hotkeyPress" instead
of "hotkeyDown" for non-continuous behaviour.
Accepted By: nani
Fixes#6123
Refs #6064 (fixes the problem, but not the code weirdness)
Differential Revision: https://code.wildfiregames.com/D3766
This was SVN commit r25169.
Fixes dc18d94030.
Using down/up to change the map in the map selection dropdown in the
gamesetup has a one-element lag. The reason is that on dropdown up/down,
two events are sent:
- first the current highlighted item is selected (it's usually the
selected one).
- then the new item is selected.
Because of faulty timer logic, only the first update went through.
Differential Revision: https://code.wildfiregames.com/D3774
This was SVN commit r25168.
Not all orders were checked, which would cause problems when receiving
an order that needed moving and that did not handle not being able to
move properly.
Differential revision: D3771
This was SVN commit r25164.
21e866fcf0
Crossbowmen should be able to turret (noted by @Nescio).
TurretHolders should be able to pick entities up.
Differential revision: D3744
This was SVN commit r25163.
d8ea401a95 replaced the ExploreTerritories logic, but I did not account
for the territory grid being N cells wide when the LOS is N+1.
Therefore, we could get out of bounds.
Reported by: Vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3765
This was SVN commit r25161.
This allows modifiers without "affects", or with empty "affects" lists,
to do something.
This makes it possible to force a modifier on an entity without classes
(e.g. trees) or with unknown classes.
Accepted By: asterix
Differential Revision: https://code.wildfiregames.com/D3761
This was SVN commit r25157.
Observers no longer lag the game for players. There is still some time
to serialise the game when sending it to a joining observer, and
depending on the chosen 'max lag' the game may stop while observers
sufficiently catch up, but this impact too is reduced.
- Make the NetServerTurnManager ignore players marked as 'observers' for
the purpose of ending a turn, effectively making it possible for
observers to lag without it affecting the players in any way.
- Add a config option (network.observermaxlag) that specifies how many
turns behind the live game observers are allowed to be. Default to 10
turns, or 2 seconds, to keep them 'largely live'.
- The controller is not treated as an observer.
- Implement a simple UI to show this delay & allow the game to speed up
automatically to try and catch up. This can be deactivated via
network.autocatchup.
- Move network options to the renamed 'Network / Lobby' options page.
- Do not debug_warn/crash when receiving commands from the past -
instead warn and carry on, to avoid DOS and "coop play" issues.
Refs #5903, Refs #4210
Differential Revision: https://code.wildfiregames.com/D3737
This was SVN commit r25156.
NaN values could not be serialised safely because of the multiple
possible NaN numbers.
Since NaN values are usually the result of bugs or dangerous code, it
seems simpler to refuse to serialise them.
(D3205 was a safe-serialization alternative, should the need arise).
Fixes#1879
Differential Revision: https://code.wildfiregames.com/D3729
This was SVN commit r25151.
9d82ae15af introduced logic to extend the search range of the short
pathfinder in some situations. This extension was unbounded, resulting
occasionally in search domains several hundred meters wide, and path
computation that can take several seconds.
Reported by: Vico (on the forums).
Differential Revision: https://code.wildfiregames.com/D3760
This was SVN commit r25150.
Makes for less duplicated logic, easier modding and better split
responsibilities.
Differential revision: D3638
Closes: #5884
This was SVN commit r25139.
Wall turrets/towers have more HP & are cheaper than free-standing
towers, and have no build restriction distance. Their attack, while
limited, is still high when garrisoned, and this makes them awkward to
balance and is poor design in general.
This removes their attack capability entirely, and standardizes the rest
of their statistics.
Patch by: Nescio
Accepted By: borg-, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3706
This was SVN commit r25135.
Reverts D3404 / 3731886e2c, thus making economic technologies more
effective.
The lower values led to resource shortages in the late game.
Patch by: Nescio
Accepted By: borg-, chrstgtr, wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D3703
This was SVN commit r25134.
Towers, unlike walls, palisades, and outposts, counted towards the
required Town Phase structures for City Phase. Given the requirement to
build 4 structures, this pushed players into making them.
This removes that, and lowers the requirement to 3.
Patch by: Nescio
Accepted By: ValihrAnt, borg-, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3686
This was SVN commit r25133.
This can give Iberian an edge at defensive play earlier, fitting their
civ theme.
Approved by: borg-, wowgetoffyourcellphone, berhudar
Differential Revision: https://code.wildfiregames.com/D3685
This was SVN commit r25132.
This new bonus makes the tech more predictable.
Cost has been reduced slightly.
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3671
This was SVN commit r25131.
All foundations now have a resistance of 1 Hack, 1 Crush, 10 pierce.
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3600
This was SVN commit r25130.
The early-game cavalry rush was overly nerfed in A24 with longer train
time, slower speed, and the need for stables.
This rolls that back slightly by reducing train tim from 16 to 15, and
increasing the movement speed of ranged cavalry from 15 to 16.
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3664
This was SVN commit r25129.
Was previsouly bumped to 3 in A24.
Patch by: borg-
Approved By: ValihrAnt, chrstgtr, wraitii
Differential Revision: https://code.wildfiregames.com/D3666
This was SVN commit r25128.
Fixes:
- A logic issue in the attack name tooltip.
- A missing context in the status effects tooltip
Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3745
This was SVN commit r25127.
Following bae258f9a1, all units moved, then all messages were sent. This
could result in units overlapping, which cannot be resolved without unit
pushing. Fixing this makes for a fairer comparison with the pushing
diff, so it seems worthwhile.
Differential Revision: https://code.wildfiregames.com/D3746
This was SVN commit r25126.
bae258f9a1 implemented CCmpUnitMotionManager, which handles motion for
CCmpUnitMotion (as distinct from ICmpUnitMotion, the interface).
The tight coupling between these two components was awkward at the
interface level, leaking underlying implementation details.
This diff makes CmpUnitMotionManager explicitly manage CmpUnitMotion,
instead of any implementation of ICmpUnitMotion, and moves files around
as requir
ed.
This:
- Makes it impossible to accidentally try to have the wrong
IID_UnitMotion managed by the UnitMotionManager.
- Allows devirtualising the calls from the manager to UnitMotion itself
(and inlining, as they are compiled in the same TU).
- Cleans up the manager interface - MotionState is now part of
CCmpUnitMotionManager.
- Cleans up ICmpUnitMotion interface - no need to provide a private
interface for the manager.
Differential Revision: https://code.wildfiregames.com/D3732
This was SVN commit r25125.
Since siege engines are not capturable anymore, since d583048690.
Fixes: d583048690.
Differential revision: D3742
Reviewed by: @Nescio
This was SVN commit r25124.
While they often look alike, their behaviour is totally different.
This split has some implications:
- There are now separate auras for garrisoning and turrets.
- Entities can now have both turret points and garrison slots,
independent of eachother.
In general previous behaviour is maintained as much as possible.
Differential revision: D3150
Comments by: @Nescio, @wraitii
Tested by: @v32itas
This was SVN commit r25123.
Allows for easier differentiation. No values were changed in this patch.
Differential revision: D2886
Comments by: @Angen, @borg-, @Stan, @ValihrAnt, @wraitii
This was SVN commit r25122.
- Removed some useless comments.
- Don't assume an item only has either a tech or a unit in
ProgressTimeout.
- Don't initialise boolean values (refs. #5979).
Differential revision: D3739
Comment by: @wraitii
This was SVN commit r25119.
The CPPCheck linter outputs 'char: null', which trips the
phabricator-jenkins-plugin, and fails to lint on CI.
To avoid this, filter out null values, since e.g. char is optional
anyways. We do want to fail if non-optional values are missing.
Differential Revision: https://code.wildfiregames.com/D3730
This was SVN commit r25112.
Fixes issues on Big Sur with the development 0 A.D. (bundles were
working correctly because they are Low-DPI).
Thanks to @wik for investigations on High-DPI in WxWidgets.
Differential Revision: https://code.wildfiregames.com/D3326
This was SVN commit r25111.
Previously this was only done for technologies.
The Viewer tries to determine an appropriate civcode from a passed
template,
however trainable gaia-animals have a template-assigned civ of `gaia`
(and
technologies don't have one at all).
The behaviour of the Viewer isn't changed by this commit: it will still
prefer
whatever civ is set within a template before falling back to the passed
civcode.
However, trained gaia-animals now have something to fall back to,
permitting the
appropriate build list (the list of buildings that train the animal) to
be
displayed.
This was SVN commit r25110.