ParticleManager uses <list> which has recently become unincluded.
Differential Revision: https://code.wildfiregames.com/D3589
This was SVN commit r24936.
The formation is set to an empty state upon disbanding which does not
have a `MEMBER`-substate.
Caused by c57a4d90a1.
Fixes: #6052
Differential revision: D3588
Reviewed by: @wraitii
This was SVN commit r24935.
There were errors in the spanish manual, and clipping issue in the
gamesetup tips text.
Refs #6024 (partly fixed)
Fixes#6027
Differential Revision: https://code.wildfiregames.com/D3573
This was SVN commit r24930.
file="" properties were not overriden by other things defined in the
actor, which lead to weird edge cases, such as frequency="0" variants
being loaded because their names="" ended up matching their parent's
name=""
Also remove the name because it doesn't serve a purpose
Accepted by: @wraitii
Differential Revision: https://code.wildfiregames.com/D3572
This was SVN commit r24929.
- Remove not included languages from the installer.
- Add credits for other languages, even if they are not included.
Differential Revision: https://code.wildfiregames.com/D3568
This was SVN commit r24927.
caused by a79a47effe and de3ed2cd19 petra will be blocked by not being
able to train hero again as she does not do rotations.
add check for matchlimits reached for permadeaths
more propper solution to handle training with numbers greater than 1
will be needed in the future.
Differential revision: D3559
Accepted by: @Freagarach
This was SVN commit r24897.
692e236499 assumed that `this.capacities` would always exist, but that
proved incorrect, in particular if a value modification message is sent
before ownership change is processed.
Fix that by initializing them on init.
Reported by: Langbart
Fixes#6019
Differential Revision: https://code.wildfiregames.com/D3562
This was SVN commit r24896.
- e7e218a3bc contained a small mistake: this.order wasn't cleared when
clearing the orderqueue, which led to a broken codepath in
PushOrderFront.
- Since 71a61d5f50, formation orders their members to reform in IDLE.
This will automatically pack any unpacked siege.
Reported by: langbart
Tested by: langbart
Fixes#6018
Differential Revision: https://code.wildfiregames.com/D3561
This was SVN commit r24895.
Obstructions can reactivate after being destroyed, which leaves them
dangling forever. This is similar to 54f7a09a54.
This fixes this issue by setting a temporary "is destroyed" variable to
true.@
Reported by: seeh
Tested by: langbart
Reviewed By: Freagarach
Fixes#6016
Differential Revision: https://code.wildfiregames.com/D3558
This was SVN commit r24894.
Add a fallback material for the basic_trans_wind_parallax_spec.xml so it
default to a less costly one on lowest settings.
Rename basic_trans_wind_parallax_spec.xml to
basic_trans_wind_norm_spec.xml to reflect there is no parallax disabled.
Discussed with @vladislavbelov.
This was SVN commit r24889.
- Remove unused decals as the rubble takes over
- Add destruction smoke to most buildings
- Fix very small destruction smoke for gates
- Fix fortress props "popping up" when ranges and arsenals are
destroyed.
This was SVN commit r24878.
Also allows to use compressed vertex formats in future.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3553
This was SVN commit r24870.
When giving several queued formation-walk orders, then a queued
non-formation order (such as gathering), the gather order would be
silently dropped. This did not happen if only one formation-walk order
was given, which is why this issue was not noticed in 59d0885d68
To fix it, explicitly only drop pre-"leave formation" orders in the
queue for formation members.
Reported By: faction02
Differential Revision: https://code.wildfiregames.com/D3550
This was SVN commit r24869.
COMBAT.APPROACHING will fallback to WalkAndFight if the order is forced
and the movement fails (happens e.g. on target death).
That behaviour was added in 5568bd4c16 (and tweaked in d9c6879450), to
make the unit move to the general position asked by the player as a
fallback.
However, it did not allow capture, which meant units would occasionally
start attacking structures, instead of capturing (the default).
This makes that fallback allow capture in all cases, which is generally
more expected than the reverse.
Fixes#6003
Differential Revision: https://code.wildfiregames.com/D3548
This was SVN commit r24866.
5d96346ac5 proved unsufficient to fix formation 'waltzing'. This is a
better fix, which makes sure units actually try to reach their
designated offset in the first place.
Further, it removes code that recalculated offsets un-necessarily, which
led to an issue with "sloppy" formations such as open and closed orders.
Fixes#5997
Differential Revision: https://code.wildfiregames.com/D3543
This was SVN commit r24865.
When reforming manually, the case of formation template beeing the same
was ignored what resulted in creating new formation controllers.
Differential revision: D3542
This was SVN commit r24859.
Follow-up to 1a8de6d2b8. This makes it again possible to host without
STUN via the lobby.
The lobby bot will answer the host "Register" command with the external
IP. This is only sent to the host, avoiding IP leakage.
There is a small window in which a client might try to join and the
public IP isn't up, and the request goes through, but that seems rather
unlikely to be a problem in practice.
Refs #5913
Differential Revision: https://code.wildfiregames.com/D3490
This was SVN commit r24858.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 f737831167Fixes#5939
Differential Revision: https://code.wildfiregames.com/D3425
This was SVN commit r24766.
cf6aaf37a4fixed#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.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
- 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.
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
#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.
- 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.
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.
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.
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.
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.
This unique technology for heroes was not useful.
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2939
This was SVN commit r24679.
It was occluding the input field when saving, and the border in any
case.
Reported by: nifa
Differential Revision: https://code.wildfiregames.com/D3383
This was SVN commit r24677.
(setting waypoints to more than 2 markets still does not work properly,
but it also did not in A23).
Fixes#5923
Differential Revision: https://code.wildfiregames.com/D3400
This was SVN commit r24676.
12cceed3d9 broke meta-key releases. This fixes that.
Also fix a much older issue where pressing new keys would not release
less specific hotkeys.
Add tests.
Reported by: Imarok
Tested by: langbart
Fixes#5930Fixes#5927
Differential Revision: https://code.wildfiregames.com/D3396
This was SVN commit r24675.
In the case that a player started or aborted researching a phase
technology, a
blank line was being added to the chat history of the player in question
and
any mutual ally or observer, where the player, ally, or observer had
their
`gui.session.notifications.phase` setting at the default value of
"completed".
This was happening because in the above case the returned value of
`ChatMessageFormatSimulation.phase` class's `.parse()` method is `{text:
""}`.
Related a3eccc043dFixes#5921
This was SVN commit r24671.
Carry capacity changes triggered 4x recomputation of gather rates
(because modifiersManager isn't as efficient as it can be), and this was
slow enough to matter. This reduces the work sufficiently to not matter
much.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3373
This was SVN commit r24670.
Since champions have been moved to barracks, researching unlocking
technologies became the must in order to train them.
Therefore:
Specificaly research `unlock champion` technologies.
Increase priority of minor techs to 250.
Remove some duplicated checks.
Differential revision: D3380
Reviewed by: @wraitii
This was SVN commit r24669.
Some keys have multiple names that they may be identified by in config
files,
such as the Escape key which may be identified by either "Esc" or
"Escape", or
the number-pad keys which may be identified with a name in the form
"Num{xxx}"
(e.g. "NumMinus") or the alternate "Keypad {x}" (e.g. "Keypad -").
The alternate names were not being picked up and formatted correctly
when
displayed in tooltips. Now they are.
Accepted By: wraitii
Differential Revision: https://code.wildfiregames.com/D3358
This was SVN commit r24668.
There was a Z-conflict since the addition of the hotkeys button.
Patch by: ffffffff
Fixes#5928
Differential Revision: https://code.wildfiregames.com/D3393
This was SVN commit r24667.
Since it affects gameplay also in a negative way (units wandering off
farther) and that entities with already high vision range benefit much
more than those with smaller vision ranges (the area is pi times radius
square).
Patch by: @borg-
Differential revision: D3365
Reviewed by: @Nescio, @wowgetoffyourcellphone
Comments by: @Freagarach, @wraitii
This was SVN commit r24659.
Due to the new way attack ranges are calculated (d0fc8ff67d), structures
can shoot significantly further, making raiding much harder.
This patch lowers the maximum attack range of archers and structures
from 70 to 60, and of slingers from 50 to 45 (javelineers keep 30), as
requested by @Feldfeld and @ValihrAnt. It also reduces the vision range
of defensive structures and artillery accordingly.
Patch by: @Nescio
Differential revision: D3381
Reviewed by: @wraitii
Informally accepted by: @borg-
Comment by: @Angen
This was SVN commit r24658.
Having some civs able to train their champions at the barracks, others
at (not too expensive) specific structures and some only at the (still
expensive) fortress is neither consistent nor balanced.
Patch by: @Nescio
Differential revision: D3384
Reviewed by: @borg-
Idea approved by: @wraitii
This was SVN commit r24657.
Changes from Cost and Build time to Cost and Health, for that is less
complicated.
Patch by: @borg-
Differential revision: D3355
Reviewed by: @Nescio
Comments by: @Freagarach, @wraitii
This was SVN commit r24655.
D3269 / 1649a8c221 made Mercenaries unable to gather. Ptolemies
Javelineers are mercs, so thy now had a non-gatherer starter unit,
putting them at a disadvantage.
This swaps the Merc javelineer with the slinger to correct for that.
Patch by: Nescio (for Stockfish0ad)
Differential Revision: https://code.wildfiregames.com/D3378
This was SVN commit r24649.
This patch fixes a few oversights:
* When redoing D3287, a typo slipped in, spotted by @borg-: “wood”
instead of “food”.
* From the same patch, @Angen suggested to change a technology name,
from “Metal Shield” to “Metal Rim”.
* When redoing D2494, I missed that the ptol polybolos has a third less
reload time; as a consequence its damage per second is now 50% higher
than that of other bolt-shooters; this patch fixes that by adjusting its
damage.
* Likewise, D3235 adjusted archer attacks but omitted the crossbowman,
which currently has half the base damage of its champion counterpart but
three times the reload time, which means its damage per second is only
one-sixth the archer's; this patch raises its base damage sixfold to
give the crossbowman the same damage per second as the archer.
Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3375
This was SVN commit r24646.
a4852c4c01 changed hotkeys to use scancode, but didn't change g_keys to
reflect that, and this could break hotkey release.
This fixes that by explicitly using scancodes. Note that we might want a
g_keys map in the future, but it seems un-necessary at the moment.
Also remove the last remnants of 'negated' hotkeys, which were disabled
following b995135138.
Tested By: OptimusShepard
Fixes#5922
Differential Revision: https://code.wildfiregames.com/D3379
This was SVN commit r24645.
d0fc8ff67d / D2759 make buildRestriction distances take obstruction
sizes into account.
This requires AI adjustment, which wasn't done then.
Differential Revision: https://code.wildfiregames.com/D3364
This was SVN commit r24643.
Following 9fc6c3c897, the OOS debugSerializer would try to serialize AI
objects entirely. This is extremely slow (might be an infinite loop in
some cases).
Instead, it should print the result of Serialize() in those cases.
(The original idea was that it would print more debugging information,
but in practice it seems to mostly print things that show up when
diffing but aren't actually sources of OOS, so essentially garbage).
Fixes#5917
Differential Revision: https://code.wildfiregames.com/D3361
This was SVN commit r24641.
This puts them on-par with champion infantry.
Patch by: @Nescio
Differential revision: D3372
Reviewed by: @borg-
Comment by: @wraitii
This was SVN commit r24640.
Since they don't have much bonuses (structure health, stronger female
citizens) to stand up against two penalties (no stone walls and this).
This removes the population penalty; other civilisations have better
bonuses but no such penalties.
Besides, Sparta was larger than other city states in ancient Greece,
both in terms of area and army size.
Patch by: @Nescio
Differential revision: D3376
Reviewed by: @borg-
This was SVN commit r24639.
- axemen, macemen, swordsmen: 3.5 -> 3
- spearmen: 4.5 -> 4
- pikemen: 7 -> 8
In single combat or small numbers the effect of this patch is probably
negligible; however, in large groups more pikemen could hit a single
target. Given that pikemen have by far the lowest damage per second,
increasing the range differences won't hurt.
In reality pikes were two to three times as long as spears, and up to
six pikes extended in front before an opponent could touch the first
pikemen, so this improves historical realism too.
Patch by: @Nescio
Differential revision: D3080
Reviewed by: @borg-
Comment by: @wratiii
This was SVN commit r24638.
Now that rams are available to all civs, it's no longer necessary for
elephants to keep having the same amount of crush damage as rams.
This patch therefore reduces their crush damage by 20%, but raises their
hack damage by 50%, making them less effective vs structures but better
against units.
Patch by: @Nescio
Differential revision: D3371
Reviewed by: @borg-, @wraitii
This was SVN commit r24637.
A frequent complaint is that ranged troops are too effective in 0 A.D.
They're supposed to die quickly, however, they get the same resistance
increases as melee troops. This limits the advanced and elite resistance
bonus to melee only (thus also excluding healers) and reduces the
resistance of ranged champions and heroes by two levels, to stay in pace
with their elite counterparts.
As a consequence, nothing changes for basic ranged troops, but advanced
are about 11% easier to kill, and elite, champion, and heroes about 23%.
Patch by: @Nescio
Differential revision: D3369
Reviewed by: @wraitii
Comment by: @borg-
This was SVN commit r24636.
Mercenaries:
- Can't gather but can build structures.
- Cost 60% less food, neither wood nor stone, but metal.
- Less training time.
Patch by: @Nescio
Differential revision: D3269
Reviewed by: @borg-, @wraitii
This was SVN commit r24635.
The carnyx was a long, bronze, Celtic trumpet and used on the
battlefield; its sound would intimidate opponents.
This patch introduces a trainable infantry champion for the carnyx-using
actor, at the assembly, and adds a generic template and an aura file,
which lowers the attack damage of nearby enemy soldiers a bit.
While it has an aura that could make a difference, it has no training
restrictions (unlike heroes); to compensate for that, it has a higher
cost, less resistance and less attack damage than other champions. If it
turns out to make the Gauls too strong, its values can be adjusted in
the future.
Having this (historically attested) unit would make the Gauls less
similar to other civs.
The specific name was suggested by @genava55 on the forums.
Icon adapted by @Stan from @niektb.
Original patch by: @Stan
Redone by: @Nescio
Differential revision: D3320
Reviewed by: @borg-
Comments by: @Freagarach
This was SVN commit r24634.
Fixes 5473393e30.
This:
- Puts RL code under the RL namespace to avoid name collisions
- Avoids usage of new/delete
- Adds more documentation
- Does general cleanup (const-correctness, move semantics, argument
types, early returns...)
Patch by: irishninja
Comments by: Vladislavbelov, wraitii
Differential Revision: https://code.wildfiregames.com/D2947
This was SVN commit r24631.
A pure stone cost makes it easier to research and more unique.
Patch By: borg-
Accepted By: wraitii, Nescio
Differential Revision: https://code.wildfiregames.com/D3356
This was SVN commit r24628.
Foundations were originally made conquest critical in 722578fdcd.
However, it remains rather frustrating that a player can evade defeat by
placing an unbuilt, uncommitted foundation. While allies can revive a
player with only a foundation, that cannot happen in 1v1, where it is
simply undue frustration, and the inconvenience seems greater than the
feature.
This thus removes them again from the conquest critical list.
Patch By: nephele
Differential Revision: https://code.wildfiregames.com/D2674
This was SVN commit r24624.
Houses increase the population limit. Various other structures did it
too as a side-effect.
This changes that, making houses more unique.
This also removes the Gaul/Brit bonus that most buildings increased
population, as they already build structures 20% faster and that is
deemed a sufficient early-game advantage.
Accepted By: borg-
Differential Revision: https://code.wildfiregames.com/D2950
This was SVN commit r24623.
If there is a building that has a paired tech researchable, where the
two techs have a civ requirement but the parent pair tech doesn't, then
the selection panels will throw errors.
This has happened with add6b0206c,
https://wildfiregames.com/forum/index.php?/topic/24732-de-alpha-24/page/2/
and other incidences.
Now when both paired techs have an unmet civ dependency they are not
shown, when one of them hasn't, it is shown.
Fixes: #5915
Original patch by: @elexis
Changes by: @Freagarach
Differential revision: D2171
Comment by: @Imarok
This was SVN commit r24621.
Since many players might not notice the new snapping feature
(a8f241da5d), a loading screen tip is nice.
Patch by: @elexis
Differential revision: D2545
Comments by: @bb, @Nescio, @vladislavbelov
Some minor changes by: @Freagarach
This was SVN commit r24620.
Because heroes permanently die (de3ed2cd19) it is nice to users of that.
Differential revision: D3294
Comments by: @Nescio, @Stan
This was SVN commit r24619.
This changes ConfigDB to support empty settings, marked with `= ""`. It
also changes hotkey to handle unused hotkeys, but stil have them appear
in the hotkey editor.
Fixes an issue where the current editor would bug when saving an empty
hotkey.
Removes the old system for unused hotkeys, adjust hotkey files
accordingly.
Reported by: FeldFeld
Differential Revision: https://code.wildfiregames.com/D3307
This was SVN commit r24618.
Adjusts the jb.js to not try and place walls outside of the map.
Only adds really added walls to the entity list (refs. #5919).
Patch by: @elexis
Differential revision: D3299
Tested by: @Freagarach, @Stan
Fixes: #5177
Refs. #5150
This was SVN commit r24617.
The NetClient code is now threaded, and this means it can try to flush
messages while 'knowingly' being disconnected.
This can be avoided by storing some state in NetClientSession
Improves 2d40068cd1, refs #3700
Differential Revision: https://code.wildfiregames.com/D3352
This was SVN commit r24616.
- Changes the Hero Elephant damage to twice that of Champion Elephants
(consistent with other classes).
- Reduces Champion Elephant crush damage resistance to the same of other
Champions.
- Give all elephants the same walk speed.
- Removed the bonus vs cav from GAIA elephants.
Patch by: @Nescio
Differential revision: D2853
Reviewed by: @borg-, @wraitii
Comments by: @Feldfeld
This was SVN commit r24615.
Clients don't get map size updates shown in the gamesetup (they do
appear in the description).
Tested by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3351
This was SVN commit r24614.
Previous to 7f77cf2f3e the AI got its population bonus per entity from
the Cost component, which every entity happened to have.
Thereafter, the population bonus was handled by a separate component,
which was not always present leading to `(void 0)` additions to the pop
cap and PetraAI not constructing houses.
Differential revision: D3360
Reviewed by: @Angen, @wraitii
This was SVN commit r24613.
And moves elephant training thereto.
This means the Persians get to train them again, by popular demand.
Mauryas are not the only ones anymore that have the elephant stables,
but they can build it earlier.
Patch by: @Nescio
Differential revision: D3362
Reviewed by: @borg-
This was SVN commit r24612.
To better fit the content being displayed.
Patch by: @Nescio
Accepted by: @s0600204
Differential Revision: https://code.wildfiregames.com/D3295
This was SVN commit r24611.
7460d0e56e uses a GCHashTable to recognize objects. However, It should
have used MovableCellHasher to maintain a stble hashmaps when GC
pointers change.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3363
This was SVN commit r24610.
Artillery is not that effective in 0 A.D., partly because their damage
per second is unimpressive (especially compared to rams or war
elephants), partly because of their splash damage.
Splash damage was added in f72d820cd4 (nearly eight years ago). The
values have changed multiple times, as has the exact calculation (see
simulation/components/Attack.js). While it's quite interesting in
theory, in practice it's not that effective. @fatherbushido explained
how it works on the forums. It's important to understand the actual
splash damage depends on the distance to the centre of entities, in
contrast to ordinary attacks, which do full damage when they hit the
footprint (edge).
Splash damage has some serious problems:
- It may have no effect vs entities with footprints longer than the
splash radius, such as many (most?) structures and warships.
- The AI does not take it into account.
- It's anachronistic: exploding shells did not exist yet in 0 A.D.'s
timeframe. Missiles were rigid objections, and even the very largest
projectiles were well under a metre in diameter.
This patch therefore removes splash damage from artillery (except bolt
shooters).
Fireships and fireraisers now deal fire damage instead of a combination
of other damage types.
Basically, stone throwers are good against large unit masses and
structures only, while bolt shooters are unit killers.
Artillery and bolt towers no longer get additional projectiles from
garrisoned units.
Roman artillery does not get a larger range but keeps the increased
damage.
Patch by: @Nescio
Differential revision: D2494
Reviewed by: @borg-, @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24608.
- Changes footprints to better match their visuals.
- Lowers ram cost to compensate for ther reduced effectiveness (against
units).
- Loot = 20% cost.
- Change experience loot to relate to health.
- Give Kush ram +2 garrison capacity and +20 attack damage since it is
the same actor as the Persian ram.
- Adjust fireraiser template.
Patch by: @Nescio
Differential revision: D3345
Reviewed by: @borg-
This was SVN commit r24606.
Since they are conceptually more policical techs than commercial.
Patch by: @Nescio
Differential revision: D3321
Reviewed by: @borg-
This was SVN commit r24605.
This separates the pierce and hack damage resistance techs but lets them
apply to all soldiers (including elephants).
Patch by: @borg-
Differential revision: D3287
Reviewed by: @Nescio, @wraitii
This was SVN commit r24604.
The various pages of the Reference Suite (`structree`, `civinfo`,
`viewer`) all
use the same `CloseButton` object, and the same hotkey to close each
page.
The hotkey that is listened for is the one assigned to `cancel`, however
the
tooltip was attempting to display the hotkey assigned to `close` (which
doesn't
actually exist).
This was SVN commit r24601.
This made citizen workers show up in the 'idle worker' GUI button when
e.g. formation-patrolling between two points (since 6778fc4ea6 / D2913)
Co-written with: Freagarach
Differential Revision: https://code.wildfiregames.com/D3335
This was SVN commit r24596.
Nisean war horses were reserved for the heaviest shock cavalry (i.e.
champion spearmen in 0 A.D.).
- Limit to Champion Cavalry Spearmen.
- Increase training time by 10%.
- Food cost raised to 400.
- Made the "Horse Breeding" technology a requirement.
Original patch by: @borg-
Taken over by: @Nescio
Reviewed by: @borg-
Comments by: @Feldfeld, @Palaxin, @ValihrAnt
This was SVN commit r24589.
Fix an incorrectly named variant,
Enable gather meat sounds
Replace the sword attack sound by a knife attack sound
Patch by: @Samulis
This was SVN commit r24579.
Change loot for support units and citizen soldiers following champion
loot pattern from 84a3f36537
10% loot is present for other citizen soldiers so this makes quite sense
for support units as well
last rebalance done in 94791c53c6
Differential revision: D3327
Comments by: Nescio, borg-
This was SVN commit r24567.
Also puts resources on a new line and purges entries with `0`.
Moves the Immortal class visible since it is used by a technology (and
thus should be known to a player).
Patch by: @Nescio
Differential revision: D3338
This was SVN commit r24564.
This reverts dad2857538. That diff had two issues:
- It modifies the JS objects, which means subsequent serialization in
quicksave are 'dirty'.
- It doesn't work with non-extensible objects. That's rather annoying,
and has already caused problems.
It also revert f0faab7a42, which was necessary because of the second
issue.
Fixes#5908
Differential Revision: https://code.wildfiregames.com/D3336
This was SVN commit r24563.
Following 9fc6c3c897, components Deserialize() was called before
entity/template were set, which is incorrect.
Refs #4698.
Differential Revision: https://code.wildfiregames.com/D3337
This was SVN commit r24561.
This character is invisible in templates, but pyrogenesis does not know
how to render it, so it renders missing character, which looks bad.
Thanks @s0600204 for grep investigation.
Reviewed by: @Nescio
Differential revision: D3323
This was SVN commit r24560.
Some techs are shared between multiple civs and having them in a folder
that is named differently (successors/hellenes) can be confusing.
This patch deprecates the subfolders and moves all techs in the main
folder.
(Also did svn propset on *.json to not have to do it for every changed
template.)
Patch by: @Nescio
Differential revision: D888
Comment by: @fatherbushido
This was SVN commit r24558.
59d0885d68 Changed the way to get formation UnitAIs, but didn't account
for selecting entities with and without UnitAI.
This fixes that.
Differential revision: D3333
Reviewed by: @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24557.
- Moves the maiden guard champions and heroes there.
- Removes the need to unlock champions.
Patch by: @Nescio
Differential revision: D3330
Reviewed by: @borg-
This was SVN commit r24556.
- 10% Lower build time.
- Cost changed from stonly [sic] to stone and wood.
- Reduced Health by 10%.
- Removed resistance addition.
- Equalised the Iberian fortress since there is no historical
justification.
Patch by: @Nescio
Differential revision: D3324
Reviewed by: @borg-
Comment by: @Stan
This was SVN commit r24552.
Currently gather rates per subtype of resource are averaged , which
hides important information for players. Therefore they do not realise
some units may be better collecting grain or fruit.
Also removing todo from the code.
Thank @Stan for fruit and grain icons without cursor and new fish.
Differential revision: D3310
Accepted by: wraitii
Comments by: Freagarach, Nescio
Ref: #4077
This was SVN commit r24549.
Now the stable is available for all civs (c4eeb82d83) new techs for it
are welcome.
This introduces:
- town-phase technology that gives cavalry +10% health;
- city-phase technology that gives the stable -0.1 corral batch training
time (similar to the one the barracks has).
The two Persian levy technologies, which used to give -20% training time
and -5% health, now simply grant -10% training time instead.
Patch by: @Nescio
Differential revision: D3317
Reviewed by: @borg-
This was SVN commit r24548.
6013aaebd3 removed training_phoenician_naval_architects but failed to
remove it from the super dock of Carthage.
Noticed by by @Angen.
This was SVN commit r24547.
- +2 damage resistance -> +25% health and moved to city phase.
- +2 damage resistance -> +10% movement speed and moved to city phase.
- batch time modifier -> construction time
- Renames some stuff and cleans production queue.
Patch by: @Nescio
Differential revision: D2987
Reviewed by: @borg-
Comment by: @wraitii
This was SVN commit r24546.
cdfa6cb8b4 made it such that a ResourceGatherer takes a target to commit
resources, this extends that to dropping resources at the dropsite.
While add it also added some tests for ResourceDropsite and -Gatherer.
Differential revision: D3300
Comments by: @Stan, @wraitii
This was SVN commit r24543.
Since one may start a match with all visible and then the tech is
useless and hides what is underneath.
Patch by: @Nescio
Differential revision: D2999
Reviewed by: @borg-
This was SVN commit r24541.
Fix larger structures being able to shoot further than they can see.
(At least for most cases, a large elevation bonus can still mess this
up.)
Patch by: @Nescio
Differential revision: D3314
Reviewed by: @borg-
This was SVN commit r24540.
Make linter useful again.
- var -> let
- Linter issues (except default cases for switches).
- Delete unused comments.
- Removed some trailing commas in objects.
Differential revision: D3298
This was SVN commit r24537.
Adds a new class `CivSpecific` which, when combined with the `Structure`
class,
is then used by the `civinfo` page to identify buildable structures
specific to
a selected civilisation. (The `SpecialBuilding` class previously used
was
removed from templates over half a year ago.)
This should resolve the main concern raised on 190d6e7cf5.
The `civinfo` captions have also been updated to match.
Patch by: @Nescio
Accepted by: @s0600204
Differential Revision: https://code.wildfiregames.com/D2733
This was SVN commit r24535.
Currenlty when one looks into specific name of kush arsenal there is
weird character at the end.
According Nescio there is empty character.
Introduced in 2b3c829e74
Differential revision: D3313
Reviewed by: @Nescio
This was SVN commit r24534.
Following general comments by players that the new turn rates were too
slow for good feeling/gameplay, this increases turn rates for most
units.
This remains a rather conservative increase, so further changes may be
needed.
Differential Revision: https://code.wildfiregames.com/D3274
This was SVN commit r24533.
Fixes the default name.
Remove comment that was invalid after 876b035336.
Deepfreeze data.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3306
This was SVN commit r24532.
In 52f311da2b code was made resource agnostic except a few places.
This fixes one of them.
(Notice that this approach also addresses Vladislavs recommendation to
load all textures at XML parsing time rather than at JS runtime
(D1745).)
Ticket: #3934
Patch by: @elexis
Differential revision: D2329
Reviewed by: @Freagarach, @wraitii
This was SVN commit r24531.
Follows 107d3d461f and other 'pthread->std::thread' diffs.
Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.
Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
To allow all civs to counter rams.
The rams are to be differentiated in future patches. This is kind of a
placeholder to fix balancing.
Patch by: @Nescio
Differential revision: D2815
In favour: @badosu, @Feldfeld, @genava55, @ValihrAnt, @wraitii
Reservations: @borg-, @Imarok,
This was SVN commit r24528.
Since 8cb7c4ec34 they had the same cost/health/food, this fixes that.
- Enables all four animals at all corrals; the Mauryas have a zebu
instead of an ordinary cow, and cart, kush, ptol sanga cattle, since in
reality the big four (goat, sheep, pig, cattle) had already spread
throughout the Old World in the Stone Age and in our time frame were
available practically everywhere; it was not an either-or situation;
each animal had a somewhat different function.
- Gave them different stats:
-- 1:1 cost:health ratio
-- 1:2 cost:meat ratio
-- Four goats approximately equal three sheep or two pigs or one cow.
Patch by: @Nescio
Differential revision: D3301
Reviewed by: @borg-
Comments by: @Angen, @wraitii
This was SVN commit r24527.
Differential Revision: D1492
Fixes#5112
Original patch by smiley
Commandeered, edited and tested by @FeXoR
Discussed by @smiley, @elexis, @vladislavbelov and @FeXoR
This was SVN commit r24525.
Makes all (standard) structures don't heal at first, execept for the
wonder (heal rate of `5`) and temple (`3`).
Replaces the barracks healing technology by one that allows healing in
all structures (`+1`).
Summarising:
This patch makes the 0 rate the default and merges the technologies to a
single one, researchable at the temple, but affecting garrisoned units
in all structures, except for outposts and walls (i.e. those with
visible turret points). The new situation is:
```
0: structures by default
1: structures with technology
3: temple by default
4: temple with technology
5: wonder by default
6: wonder with technology
```
Patch by: @Nescio
Differential revision: D3264
Reviewed by: @borg-
This was SVN commit r24523.
When an entity promotes it autogarrisons in the turret position but
because `GARRISONE.enter` returns early a turret never reaches the
`IDLE`-state and thus won't automatically react on nearby enemies.
This is explicitly a temporary fix.
Differential revision: D3293
Reviewed by: @wraitii
This was SVN commit r24521.
This threads the netclient session, which avoids timeouts when the
main-thread is not polling (map creation, very long simulation frames).
Unlike the NetServer, which should be as independent as possible from
the main thread, the NetClient is fundamentally tied to the game thread.
Therefore, this only threads the session object.
To ensure good performance and ease-of-use, lock-free queues for
in/out-going messages are used.
This fixes artificial timeouts, while also improving actual ping reports
(since frame-time is no longer a factor).
It effectively reverts D1513/eda236522c and 2e7e1c0b2b, all hacks around
lag-timeouts (and bits of 1a3fb29ff3).
Based on a patch by: Stan
Comments by: Vladislavbelov
Fixes#3700, refs #3373
Differential Revision: https://code.wildfiregames.com/D2848
This was SVN commit r24518.
The 'arena' allocator does not take memory alignment into account, which
can result in crashes at -O3 with gcc 7.5 (presumably because of SSE
instructions).
This accounts for alignment issues, fixing the issue.
Also do various cleanup in lib/allocators.
Reported by: Bellaz89, Freagarach
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3181
This was SVN commit r24517.
Change description.
Affect Champions training time instead of fortress' batch time modifier.
Patch by: @borg-
Differential revision: D3273
Reviewed by: @Nescio
This was SVN commit r24514.
Large units risk being stuck between other units. This is true in
general, but particularly weird with formations, since individual units
may well not be stuck, only the invisible formation controller.
This alleviates the issue by ordering units to move individually when
the controller appears stuck.
It introduces a new "VERY_OBSTRUCTED" unit motion message, which
triggers when a unit has failed to move for several turns.
Reported By: Angen
Reviewed By: Freagarach
Fixes#4935
Differential Revision: https://code.wildfiregames.com/D3209
This was SVN commit r24511.
And move the damage_types to simulation/data (i.e. one level up).
Differential revision: D3276
Idea accepted by: @wraitii
Tested by: @Stan
This was SVN commit r24509.
Follows D2814 / a4852c4c01
Hotkey tooltips used 'untranslated' hotkeys instead of the accurate
ones, as they directly pulled from config values.
Noted & tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3277
This was SVN commit r24504.
By specifying the players which are allowed to use(/see) a command
button and adding an enabled/disabled property to the info.
Differential revision: D2343
Comments by: @Angen, @Stan
This was SVN commit r24501.
Reads attack effects from JSON files to allow easier introduction (one
still needs to modify other components).
Differential revision: D2661
Comments by: @Angen, @bb, @Stan, @wraitii
This was SVN commit r24500.
Moves attack sound groups to where the weapon is defined (where it was
not already the case).
Removed sounds from entities that can't use the sound.
Patch by: @Nescio
Differential revision: D2855
This was SVN commit r24499.
Allows four `Ranged+Infantry` to occupy turrets on the tower.
Also gives all siege wall segments the same cost-to-health ratio.
Patch by: @Nescio
Differential revision: D2993
Reviewed by: @borg-
This was SVN commit r24498.
This commit removes two things from the `{civ}.json files, for the
following
reasons:
1. The team-bonus information, as the only thing that was reading it
(the
`civinfo` page) no longer does so.
2. Information about civ-bonuses that have been implemented via a single
auto-researchable technology, as the `civinfo` page is now capable of
displaying information from technology files and, in fact, now does
so.
This was SVN commit r24494.
As of 190d6e7cf5, the `civinfo` page no longer reads information about
Heroes and Special Structures/Technologies from the `{civ}.json` files,
but
from relevant templates.
Nothing else uses the entity/tech descriptive information contained in
the
`{civ}.json` files, so we can safely remove it.
Note: The Team and Civilisation Bonus information contained within the
`{civ}.json` files are not touched in this commit.
This was SVN commit r24493.
Instead of loading information about heroes, special buildings, et al.,
from the
`{civ}.json` files, load the information desired from templates.
Determination of "specialness" works as follows:
* Heroes are detected via the `Hero` class.
* Special Structures are detected via the `SpecialBuilding` or `Wonder`
class.
* Technologies are determined to be "special" when they can be
researched by
the currently selected civ, but are not open to be researched by
every civ.
* Team Bonuses are any applicable aura that reside in the appropriate
folder.
Accepted by: Freagarach
Comments by: Stan
Differential Revision: https://code.wildfiregames.com/D759
This was SVN commit r24492.
- Rename macros to be more explicit
- Move detection code to a separate file
- Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
- Make explicit the SSE2 dependency for Windows
Comments by: @vladislavbelov @wraitii @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
This allows choosing a "default formation", which is activated
automatically for units given walk orders (and attack-walk etc.).
Conversely, units in formation that are given a gather/build/... order
are taken out of formation and given the order individually.
The default formation can be selected by right-clicking on any formation
icon.
This leverages formations for walking, where they are quite efficient
(in fact, perhaps too efficient), while circumventing issues with
various orders.
Choosing the "null formation" as the default formation de-activates the
behaviour entirely, and plays out exactly like SVN.
This makes it possible to queue a formation-order then a
noformation-order (i.e. walk then repair), though the behaviour isn't
very flexible.
For modders, it should be relatively easy to change the setup for each
order, and/or to force deactivating/activating formations in general.
Tested by: Freagarach, Angen
Refs #3479, #1791.
Makes #3478 mostly invalid.
Differential Revision: https://code.wildfiregames.com/D2764
This was SVN commit r24480.
This is a rather controversial change, so if it feels compleatly off, we
should revert.
The game is Alpha, so try anyways.
Patch by: @Nescio
Differential revision: D2507
Accepted by: @borg-, @Lionkanzen,
In favour: @borg-, @Lionkanzen, @wraitii
Reservations: @elexis, @Feldfeld, @badosu
Reservations against former patch: @chrstgtr, @PhyZic, @Stan, @ValihrAnt
This was SVN commit r24479.
Removes siege engines from them such that if one wants siege engines,
they need to construct an arsenal.
Instead it now trains advanced melee infantry.
Patch by: @Nescio
Differential revision: D3174
Reviewed by: @borg-
Comments by: @Freagarach, @Stan
This was SVN commit r24477.
Gives all archers a reload time of 1 s and gives 1:2:4 damage ratio for
basic, champion and hero archers.
Patch by: @Nescio
Differential revision: D3235
Reviewed by: @borg-
Comment by: @ValihrAnt
This was SVN commit r24475.
- Uppercase -> lowercase.
- Title -> regnal number.
- Added where appropriate.
Actors are not changed.
Patch by: @Nescio
Differential revision: D2156
This was SVN commit r24472.
Moves cavalry there.
Moves chariots there.
Moves wardogs there.
Makes the unlock_champions tech cheaper because it now only unlocks
infantry.
Removed increased cost of cart_temple since the kush one doesn't have
that either.
Patch by: @Nescio
Differential revision: D2801
Reviewed by: @borg-, @ValihrAnt
Comments by: @Angen, @badosu, @Feldfeld
This was SVN commit r24470.
- Raises the champion's reload time but ensure same DPS for better
visuals.
- Changed citizen's attack to be like the champion's.
- Macemen don't benefit from steelworking tech (which is about swords).
Patch by: @Nescio
Differential revision: D3234
Reviewed by: @borg-, @ValihrAnt
This was SVN commit r24469.
Idle formations re-arrange whenever a member leaves the formation.
Because Idle formation entities can attack nearby units (the formation
stays idle for this), any death will re-arrange the formation, causing
the entities to move in formation before going back to attack.
This looks odd and makes formation less usable. Given that it's tricky
to change the controller state with the current code, this instead
reforms the formation on a timer, only when all members are IDLE.
It fixes the issue and looks generally similar in other cases.
Reported By: wowgetoffyourcellphone
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3236
This was SVN commit r24467.
Follows D2746 / 9fc6c3c897 and dad2857538.
Player colors are copied from the settings, which are deep-frozen, thus
not extensible. Cloning them restores that, allowing serialization.
Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D3263
This was SVN commit r24466.
Generalize component/AI serialization system to any user-defined JS
object. This includes Vector2D/3D, fixing an old issue.
As with components/AI, JS Objects may implement a Serialize/Deserialize
function to store custom data instead of the default, which attemps to
serialize all enumerable properties.
Fixes#4698
Differential Revision: https://code.wildfiregames.com/D2746
This was SVN commit r24462.
Currenlty there is regression in structuretree from b2842e8021, when
upgrade for sentry tower is not in the correct phase row.
Thix is fixing that.
Probably typo in condition.
Differential Revision: D3252
Reviewed by: bb
This was SVN commit r24461.
The technology introduced in 586b045d09 for gauls is a bit overprised.
This is lowering the price to the original cost of rotarymill and
lowering gain a bit more because the tech is not just gobal but
available in phase earlier. Also it is "almost" half on cost and effect
of the current phase II tech which is available for everyone.
Differential Revision: D3253
Reviewed by: borg-
This was SVN commit r24460.
This grid-based system allows browsing all available maps at a glance,
encouraging more diversity and making it nicer to pick a map.
Moves the mapCache and the map filters controller to the gui maps/
folders, and include that folder where it is used, instead of them being
in common/ or the gamesetup.
Comments By: Freagarach
Patch By: Nani (reworked by elexis then wraitii)
Fixes#5315 (though further work, such as proper scrolling, would be
nice).
Differential Revision: https://code.wildfiregames.com/D1703
This was SVN commit r24459.
This bumps arrows from 75 to 100, slingers to 90 and javelins from 62.5
to 70. It's both slightly more realistic and helps with dancing, since
the problem is the ratio of unit speed vs projectile speed.
Further increases would reduce dancing, but also make it harder to see
projectiles which isn't desirable.
Refs #5106
Differential Revision: https://code.wildfiregames.com/D3179
This was SVN commit r24458.
Following D3221/38c3827d3b, units switch to the 'run' animation when
moving faster than their walkspeed.
This makes formations 'flickery' because units often move slightly
faster than their walkspeed when the formation rotate slightly, which
happens often. It looks fairly bad.
This switches to the running animation halfway through, though a more
general system would be more desirable.
Approved By: Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D3224
This was SVN commit r24456.
Post SM60 upgrade, CompileFunction started actually adding a line in
front of the source buffer, shifting the error reporting in the
simulation and other callers of LoadScript.
The GUI isn't affected as it uses LoadGlobalScript, which uses Evaluate
directly.
Refs #5859Fixes#5895
Differential Revision: https://code.wildfiregames.com/D3257
This was SVN commit r24455.
Component.h is loaded by convention in all CmpComponents and is
requireed to use CmpPtr.
Fixes#5898
Differential Revision: https://code.wildfiregames.com/D3259
This was SVN commit r24454.
In unit_actions.js sounds of the first entity that is able are now
played, instead of trying to play a sound of the first entity of the
selection, which may or may not be able to perform the command.
Differential revision: D3099
Reviewed by: @bb
This was SVN commit r24449.
Let the `hotkeyActionCheck` and `preselectedActionCheck` use the regular
`actionCheck` to reduce duplication.
Save the first able entity used to orderOne.
Removed some functions which were used merely once.
Combined non-target actions with the regular ones.
Differential revision: D3222
Reviewed by: @bb
Comments by: @wraitii
This was SVN commit r24444.
Changed in 37d3adcf23, presumably erroneous given a relevant IRC log
(2012-12-02), and in daf572eb43.
Refs. D193.
Differential revision: D3233
Reviewed by: @Nescio
This was SVN commit r24443.
Redo original diff D245 by ffffffff after commit of cpp changes for
input placeholders.
Differential revision: D3245
Reviewed by: bb
Comments by: Stan, wraitii
This was SVN commit r24439.
Position of garrisoned entities is undefined, thats why landaccess
fails, when asking for position in some cases.
Last replay in ticket is from a23b.
source of the issue was this.target in attackplan got garrisoned so it
got undefined possition.
Solution applied is to ask for landaccess of garrisonholder if current
entity is garrisoned inside the function itself, instead doing it in
every place possible and forget it the future additions. If calling code
does not want to deal with garrisoned entities, it should check for that
case separately.
For attack plan, when it happened is fine, because it will deal with
garrisoned entity later.
Differential revision: D3244
Fixes: #5589
This was SVN commit r24436.
give same movement speed to sword/axe cav as spear cav has
run speeed multiplier 1.2 -> 1.1
Differential revision: D3231
Patch by: borg-
Accepted by: Nescio, ValihrAnt
This was SVN commit r24435.
The crash could be reproduced by hotloading. It didn't always happen
(about 1 in 15?).
I do not have sufficient time to investigate, so this reverts this for
now.
Introduced with the SM78 migration, refs #5861
Differential Revision: https://code.wildfiregames.com/D3239
This was SVN commit r24434.
different font colour
no need to delete the text, when one wants to write there something
text displayed is not a value so field is technically empty
will disappear when user writes some character
will appear when user deletes all characters
we can get rid of text value "Filter" in mod selection screen and ugly
hack around it
Differential Revision: D2460
Comments by: vladislavbelov, elexis
This was SVN commit r24433.
Lake was not showing properly in a24 anymore.
Reported by gameboy on forum:
https://wildfiregames.com/forum/topic/34502-the-disappearing-lake/
Cause is, that water level had the same value as terrain level and since
a24 uses more precise water level computation, high quality water
effects did not show the lake. ( found by @vladislavbelov )
Rise water level in the lake, remove animals, trees, minerals from lake
area add some fish.
Differential Revision: D3240
This was SVN commit r24432.
And use that for the seleucids reform/traditional tech.
Noticed by @wraitii
Differential revision: D2654
Reviewed by: @bb
Comments by: @Stan
This was SVN commit r24431.
This improves behaviour when units need to go around a concave obstacle.
They would tend to clump inside the 'dead-end' before realising they
needed to go around. This was rather easy to trigger on Acropolis. See
included Unit Motion Integration Test.
The cause is the logic that removed the next long waypoint when
obstructed. While that behaviour is desirable, removing too many
waypoints means the unit tries to short-path, using a small domain
range, to a goal that's impassable, meaning they go as close as they can
in Euclidian distance, i.e. towards the dead end.
This changes that behaviour by only deleting waypoints within a certain
distance from the entity, scaling with search-space range. It's tricky
to find a good compromise between performance and behaviour here, but
the values I've picked seem OK.
However, the fact that the entity would ultimately remove all waypoints
and thus trigger a full path recomputation was actually a feature,
inherited from D2754 / 892f97743b. This diff therefore handles that
explicitly, doing so on a more regular basis to behave better overall.
As a further cleanup, "m_FailedPathComputations" is incremented in
HandleObstructedMove, as it is quite possible to never increment it in
PathResult despite not getting actionnable paths. This thus renames it
to m_FailedMovements, and uses the opportunity to clean up PathResult(),
by only having one path for both short and long-range paths. Further,
PathResult now does not immediately request new paths, leaving that to
Move(), to avoid requesting transient paths that aren't actionnable.
This also makes it possible to revert 9e41ff39fc. It requires increasing
the MAX_FAILED variable, or more units get stuck as they reach the max
more often.
The search-space expansion is slightly slowed, and with a little more
delay, as a performance optimisation. From testing, this doesn't impact
real movement much as units short paths tend to be invalidated by the
next turn, as other units move, anyways.
Clarify comment around the vertex-pathfinder search-space bounds hack,
and ensure it isn't used for the very worst cases of units being stuck,
as it could be a pessimisation then.
Finally, this explicits a 2011 hack where if the long-pathfinder fails
to return a valid path the goal's center is used directly. This happens
when the goal is unreachable to the long-pathfinder, which may be
because it is actually unreachable or because only the short-pathfinder
can reach it. In those situations, the hack allows a last-ditch attempt
at reaching it before failing to move entirely. Performance wise, this
is faster overall for actually unreachable goals, since it skips all the
intermediate steps. For reachable goals, it might be occasionally
slower, but that case is quite rare (certainly rarer than unreachable
goals).
Reported By: Angen
Fixes#5795
Differential Revision: https://code.wildfiregames.com/D3203
This was SVN commit r24429.
By using templates appripriately we can remove the need for explicit
specification of serializers, making it easier to serialize container
types and to write new serialization helpers.
Direct serialization calls haven't been replaced in this diff.
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3207
This was SVN commit r24427.
Deprecates elite healer upgrade in favour of training elite healers at
the Amun temple.
Increases stats of Amun temple slightly. Removes production queue of
(unbuildable) Kushite shrine.
Lets Kushites start with a healer on random maps :) (To signify the
importance of the political power of the priesthood of Amun.)
Patch by: @Nescio
Differential revision: D2843
Reviewed by: @borg-
This was SVN commit r24422.
Fixed:
- The gamesetup no longer becomes entirely unusable when there is an
error parsing the map data.
- The match settings aren't overwritten in case of an error
- The PopCap / StartingResources control properly check for map data
existence, fixing an underlying error.
Differential Revision: https://code.wildfiregames.com/D3053
This was SVN commit r24421.
This makes this feature, very useful for checking for OOS, more easily
accessible.
Differential Revision: https://code.wildfiregames.com/D3199
This was SVN commit r24407.
The latter are not properties of the global object but stored within the
global lexical environment.
This is not currently needed, but will be useful for future diffs.
Update Vector2D/3D querying.
Taken from D2746
This was SVN commit r24406.
Missed in bdbd0b9dbf, meaning after serialization uncommited foundations
preview were incorrectly created. This was generally invisible, except
when a decal was present (e.g. with ptolemies).
This was SVN commit r24405.
In earlier revisions units fled more slowly with fewer hitpoints.
Since def47cb7ae this is not the case anymore.
Differential revision: D3229
Reviewed by: @wraitii
This was SVN commit r24404.
`ConstructionFinished` is obselete since 88dc6d8e1e.
These messages are only sent when the entity is in a specific state (or
states).
Differential revision: D3044
Discussed with @wraitii
This was SVN commit r24402.
Fixes eb7940b418.
As reported by Vladislav, there is possibly confusion on what exactly is
being ignored when there are multiple statements after DISCARD. Explicit
wrapping avoids that.
Differential Revision: https://code.wildfiregames.com/D3206
This was SVN commit r24397.
Since PopBonus is not a cost.
Patch by: @lonehawk
Differential Revision: D2948
Comments by: @Angen, @Nescio, @wraitii
Closes#4081
This was SVN commit r24394.
Further work would be nice to be able to only collect zones that
probably have garbage to collect, but that likely requires splitting our
contexts in more zones.
0 A.D. had been running in incremental GC since 1.8.5. With the SM78
upgrade, I changed this to the new default "ZONE_INCREMENTAL", which GCs
specific zones.
However, I failed to realise that deleted scriptInterfaces and their
corresponding zones would no longer be collected.
This corrects for that.
Fixes d92a2118b0.
Refs #5861
Differential Revision: https://code.wildfiregames.com/D3220
This was SVN commit r24392.
- move infantry_crossbowman_c.xml from athenians/ to macedonians/
- renames kushites/camelry_* to kushites/camel_*
- renames kushites/infantry_clubman_* to kushites/infantry_maceman_*
- renames persians/cavalry_swordsman_* to persians/cavalry_axeman_*
- renames ptolemies/camelry_* to ptolemies/camel_*
Patch by: @Nescio
Differential Revision: D2688
This was SVN commit r24391.
Update build shell scripts to use premake5 `gmake2.*` directories.
(The old `gmake.*` directories have been removed from premake5.)
Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24388.
See `CHANGES.txt` below for the upstream-composed list of changes.
`premake5.exe` built by Stan
Accepted By: Stan (for Windows)
Trac Tickets: #5869
Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24387.
These files contain instructions to build premake and its bundled
dependancies
on versions of Visual Studio we no longer support.
Refs: D3219
This was SVN commit r24386.
Units can get stuck on passable navcells surrounded by impassable
navcells because the short-pathfinder got them there, and then ordering
them to move far way uses the long-pathfinder.
We can safely run a short-pathfinder call, using the same logic as in
D1424, to get unstuck in at least some of those situations.
Reported by: Angen
Differential Revision: https://code.wildfiregames.com/D3215
This was SVN commit r24385.
- Store the functions in an unordered_map. A no-container implementation
is doable but likely not worth the added code complexity, maybe with
C++20
- Move more things into the _impl.h
- Clear out the un-necessary friends declaration in the specific types
by moving the functions to the public interface, which makes sense.
- Fix a memory leak (JS::PersistentRootedObject weren't deleted).
This doesn't change what one needs to do to add a new type, but it does
reduce the actual code that's necessary, and makes it less error prone.
Differential Revision: https://code.wildfiregames.com/D3214
This was SVN commit r24384.
Summary: 9c5062147a introduced the `getTextSize()` to all GUIObjects for
getting the rendered size of a text. 8190293f8b made it only available
to CText. `getTextSize()` can also be useful for CButtons so this diff
adds the function back to CButtons. There seem to be no other GUIObjects
besiders CText and CButton where `getTextSize()` makes sense.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3195
This was SVN commit r24378.
- Change the .Plist to associate 0 A.D. with .pyromod files (as owner,
so the default choice), and .zip (as alternate, so not the default, but
will appaer in the 'open with' dropdown).
- Make 0 A.D. actually load mods opened like that on MacOS. The files
aren't actually opened with command line arguments, but via Cocoa stuff,
which SDL2 handles via the 'DropEvent' event. This ought also work on
windows and linux.
Closes#5357
Differential Revision: https://code.wildfiregames.com/D3190
This was SVN commit r24377.
Allow boolean modifications JavaScript
Allow territory influence weight, and root, to be changed via tech.
Differential Revision: https://code.wildfiregames.com/D3069
This was SVN commit r24373.
I was not aware of the erase-remove idiom and failed to notice that
remove_if simply reorders the elements.
Noted by Stan thanks to VS17 warnings.
Fixes a4852c4c01 / D2814
This was SVN commit r24371.
MacOS requires some UI-related API calls to happen on the main thread.
There are several SDL functions that call UI-things, and those were,
since #500 / 08b4d96cf2, in a separate thread.
This crashes on Catalina, instead of simply warning (see #5470).
It is not the first time we had such issues, as originally the Engine
was on the main thread and AtlasUI on a separate thread.
That didn't work on MacOS, so the threading was inverted in #500 /
08b4d96cf2, with AtlasUI on the main thread and the Engine in another
thread.
Unfortunately, this still wasn't enough.
This formally unthreads the engine, running it on a wxTimer, to avoid
these issues.
Future work should focus on:
- Further decoupling the simulation from the engine itself, as what
Atlas really needs is a threaded simulation, not a threaded engine.
- Making the simulation itself more threaded
- Making it possible to do tasks asynchronously under Atlas.
Refs #500Fixes#5470
Differential Revision: https://code.wildfiregames.com/D2752
This was SVN commit r24361.
This makes 'dancing' impossible with patrol, for both single units and
formations.
It further makes the formation and regular patrol code more similar.
The diff harcodes an integer wait time as it relies on timer calls
instead of range queries, as that was much simpler to implement.
Animations for the waypoint-waiting is also unimplemented.
Reviewed By: Freagarach
Refs #5106
Differential Revision: https://code.wildfiregames.com/D2913
This was SVN commit r24360.
This made entites use slaughter against the wolves instead of normal
attacks.
After b97d251322 the class is not needed anymore to be able to move the
wolves.
The fix of the wolves stacking in one place is deferred.
Patch by: @Dunedan
Differential Revision: D2771
Reviewed by: @wraitii
Comments by: @elexis
This was SVN commit r24359.
And total gatherers next to the population icon.
Closes#643
Patch by: @mammadori
Differential Revision: D3155
Earlier revisions reviewed by: @Angen, @wraitii
Comments by: @Nescio, @s0600204, @Stan
This was SVN commit r24357.
Preview entity IDs vary from user to user.
Reported by: Freagarach
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3196
This was SVN commit r24354.
- Add a 'dev' option to the mac bundle that's much faster, intended to
quickly test bundle-like behaviour.
- Add an option to only archive the 'mod' folder, intended to speed up
the CI weekly builds and avoid taking too much disk
space.
- Tweak the windows installer, add an option to create a shortcut to the
desktop (Fixes#1637). This uses the readme 'hack'
which appears to be a relatively standard way of doing that.
- Make the scripts executable.
- Update jenkinsfile.
Follows d95550248b
Differential Revision: https://code.wildfiregames.com/D3191
This was SVN commit r24353.
GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.
Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.
Thanks Stan for the testing.
Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
d0fc8ff67d / D2759 made ranges account for entity size, making auras
larger than they needed to be. This accounts for that.
Units haven't been changed, the delta is not worth modifying imo.
As discussed with Nescio, this means that, for a given aura, larger
buildings will now have a larger "aura area". This particularly affects
oblong buildings.
A proper solution for this would be to not approximate some structures
as a circle, but remains to be implemented.
Note that for current 0 A.D., this effect is unlikely to be a
significant gameplay advantage to one civilisation over another.
Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D3169
This was SVN commit r24349.
Identity classes where added to construction previews in D576 /
7bf933d5f6. This meant they counted towarde entity limits, as they were
not local entities.
This diff fixes that by making them local entities.
Thanks for s0600204 for raising the issue
Reported by: wowgetoffyourcellphone
Refs #2907
Differential Revision: https://code.wildfiregames.com/D3187
This was SVN commit r24347.
This reworks the OSX bundle script, to run it easily on CI and to
further also build the unix tarballs and the windows installer.
Clean up the MacOS bundle detection, by not forcing a compilation-time
switch.
Clean up shared library compilation: changing the installation name
isn't necessary for 0 A.D.
Differential Revision: https://code.wildfiregames.com/D3161
This was SVN commit r24343.
This ugprades 0 A.D. to the latest ESR at the moment of writing.
Mostly straighforward API changes (see meta-Bug 1633145)
- js::Class is merged with JSClass
- JSNewArrayObject becomes JS::NewArrayObject
- ArrayObject-functions are moved to a new public header Array.h
- JSMSG error messages have again been changed, requiring some tweaks.
- AutoValueArray becomes RootedBalueArray (Bug 1634435)
- 'uneval' is behind a Realm flag (Bug 1565170), but no removal is
planned in the short-term future.
- Some minor GC API changes (Bugs 1569564 and 1633405)
- Error reporting has had some tweaks, and error flags have been removed
(Bug 1620583)
- StructuredClone are now always thread-safe, simplifying an API change
introduced in SM52 (Bug 1607791)
Tested by: Stan, Freagarach, mammadori
Closes#5861
Differential Revision: https://code.wildfiregames.com/D3168
This was SVN commit r24333.
SM78 drops usage of Python 2 in favour of Python 3.
SM78 is the first ESR to actually use rust, which means a new static
library is bundled.
This means LLVM-objdump is now a dependency of Spidermonkey, and also 0
A.D.
SM78 also removes the need for NSPR on Windows (Bug 1556646).
Tested by: Stan, Freagarach, mammadori
Refs #5694
Refs #5861
Differential Revision: https://code.wildfiregames.com/D3167
This was SVN commit r24332.
Move repetitive cost change for mercenary from templates to technology
json.
Differential revision: https://code.wildfiregames.com/D2685
Patch by: Nescio
This was SVN commit r24330.
b57abe806c had some errors in the patch. @Nescio noted that the fortress
builder script was using the wrong civ. And the committer noticed the
elephantine random map was broken.
Differential Revision: D3122
Tested by: @Nescio
This was SVN commit r24328.
Since relics ought to be undestroyable, a health component makes no
sense. This makes that the Invulnerability-flag can be removed and
relics can be captured again (after 0f91c5ac61#inline-5236).
Differential Revision: D1268
Original patch by: @temple
Reviewed by: @wraitii
Comments by: @bb, @elexis
Fixes#5007, #5847, 0f91c5ac61#inline-5236
This was SVN commit r24327.
Based on a patch by: @NF
Tested by: @nephele
Tested on FreeBSD, Windows, Kubuntu, macOS
Fixes: #1325
Differential Revision: https://code.wildfiregames.com/D2399
This was SVN commit r24323.
This patch increases the attack base hack damage of pikemen from 1 to 2.
Differential revision: D2972
Patch by: borg-
Reviewed by: Nescio
Comments by: myou5e, wraitii, badosu, ValihrAnt
This was SVN commit r24316.
Original diff D2512
Reported on forum by gameboy:
https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/
Units with goal where minrange = maxrange rarely arrive to destination,
because they miss it.
See Todo in unitmotion
Relative part:
In the meantime, one should avoid that 'Speed over a turn' > MaxRange -
MinRange, in case where min-range is not 0 and max-range is not
infinity.
For that reason avoid passing minrange = maxrange from ai.
Also warn in cpp unitmoition when getting this kind of command.
Differential revision: D3149
Reviewed by: @wraitii
This was SVN commit r24315.
- Remove the last usage of the MACRO "TRUE" as it's deprecated and
replace it by its value "1" the == operator is overloaded to return a
UBool(int8_t) refs 9b9a96382c
- Remove two unused DLLs
- Update and add EOL to headers.
Refs #3004
This was SVN commit r24314.
The `pology` library runs on Python2 and development appears stalled. It
is also not available on pip.
The `babel` library, BSD-licensed, provides, amongst many other things,
a replacement for .POT / .PO manipulation.
The `poediff` tool that we used to detect spurious i18n change is
replaced with a Python script that does a simpler but good enough job
(it is also much, much faster).
These replacements let the i18n scripts run on Python3 entirely.
Makes D506 redundant.
Comments by: Itms
Reviewed By: Gallaecio
Refs #5694
Differential Revision: https://code.wildfiregames.com/D2757
This was SVN commit r24313.
f78d3ddf71 / D1781 would fix an important source of lag... If it
actually used the code.
Also clean up some comments.
Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D3176
This was SVN commit r24312.
Unify the build scripts between macOS and Linux.
Reviewed by: @Freagarach, @wraitii
Differential Revision: https://code.wildfiregames.com/D3173
This was SVN commit r24310.
Supported compilers are Clang 5, GCC 7, Visual Studio 17, Xcode 9.3
Update Atlas alongside since the replacement APIs are c++17 only.
De-activate the StyledTextCtrl module of WxWidgets on mac, since that is
a wrapper around the Scintilla Text editor and doesn't compile with
C++17 (as it uses auto_ptr). We don't use the editor, so this is also a
win on the compilation time front.
Closes#5862
Differential Revision: https://code.wildfiregames.com/D3166
This was SVN commit r24308.
CText requires re-rendering every message when adding a new one, which
quickly becomes very slow.
Use CList and a custom method to work around this.
These classes are in need of a more complete refactoring.
Based on a patch by: nani
Differential Revision: https://code.wildfiregames.com/D1781
This was SVN commit r24306.
C++14 deprecates and C++17 removes functions we use for random sounds.
This makes FastRand() fit the URG interface, and uses the appropriate
function.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3107
This was SVN commit r24302.
std::binary_function was a pre-C++11 construct, that is removed entirely
in c++17, and no longer necessary regardless.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3164
This was SVN commit r24301.
No noteworthy API changes.
Details:
- Remove UTF16 script execution since UTF8 is supported in SM68 and
going forward
- Several new headers includes are required
- Realms replace Compartments as "global holders" (see meta-Bug 1357862)
- JSRequests are removed entirely (Bug 722345), see also aae417bd29
- Trivial API updates in ProxyHandlers, ArrayBuffer, Warnings, GC
reasons, Context options, ObjectIsFunction, ValueVectors and
JSCompartment
See also the migration guide:
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Migration%20Guide.md
Tested by: Freagarach, Stan, Subitaneo
Fixes#5860
Differential Revision: https://code.wildfiregames.com/D3144
This was SVN commit r24297.
No noteworthy build system changes, however rust is now necessary for
Spidermonkey compilation.
On windows, clang-cl is now necessary.
Tested by: Freagarach, Stan, Subitaneo
Refs #5860
Differential Revision: https://code.wildfiregames.com/D3143
This was SVN commit r24296.
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
Update the lib used to handle plists, as dmgbuild changed things for
Python3.
Refs #5694
Differential Revision: https://code.wildfiregames.com/D3157
This was SVN commit r24282.
Use FinishedOwnCommands, which is intented to plan commands for the N+2
turn, but can be used to run commands immediately by the replay manager,
and unlike FinishedUpdate is called before the first update.
Reported by: Freagarach
Fixes#5546
Differential Revision: https://code.wildfiregames.com/D3067
This was SVN commit r24280.
Correctly recompute the actor when something changes that could modify
it (ownership change, ...).
Make sure mirages are updated when they reappear after being hidden.
Make sure foundations have proper identity classes.
Make sure mirages don't respond to value modifications in the visual
component.
Clarify a few comments.
Earlier work by: Sandarac
Fixes#2907
Differential Revision: https://code.wildfiregames.com/D576
This was SVN commit r24279.
If modifiers (except shift) are used, hotkeys should still be triggered.
Fixes a4852c4c01 / D2814
Reported by: Stan`
Differential Revision: https://code.wildfiregames.com/D3154
This was SVN commit r24278.
clean-workspaces.sh now cleans SM libs, so it needs to be called before
building libraries.
Differential Revision: https://code.wildfiregames.com/D3153
This was SVN commit r24274.
This fixes tab buttons not playing sounds when pressed.
Original patch by: Stan
Amended patch reviewed by: Stan
Differential Revision: https://code.wildfiregames.com/D3109
This was SVN commit r24270.
We now support the most recent released version of `fmt` available (at
the time
of committing).
As we no longer patch `fmt` to get it to work within `pyrogenesis`, this
commit
also mostly removes its source from our code-tree (some headers are
retained for
Windows builds).
If you are a user of...
Linux/BSD: You will now need to have `fmt` installed from your
distribution's
package repository. The minimum supported version of `fmt` is
`4.0`.
OSX: The source is acquired and compiled (in `build-osx-libs.sh`),
then included and linked automatically.
Windows: The relevant header files are retained and, along with a
pre-built
library, are the only things still bundled.
Accepted by: wraitii
Tested by:
* Freagarach (Lubuntu 18.04, `fmt 4.0.0`)
* Krinkle (MacOS 10.14, `fmt 6.1.2`)
* nephele (Alpine Linux)
* wraitii (MacOS 10.14)
* Nescio (Fedora 33, `fmt 7.0.3`)
Windows library files built by: Stan
Fixes: #3190
Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24267.
Fix in b1a78ce285 actually worked by accident, and introduced more
serious issue with minimal range.
Differential revision: D3148
Fixes: #5864
Reviewed by: wraitii
This was SVN commit r24264.
Introduce a DISCARD macro to ignore the warn_unused_result attribute
used by Spidermonkey, and reuse it elsewhere.
Differential Revision: https://code.wildfiregames.com/D3147
This was SVN commit r24261.
All are updated except:
- WxWidgets (not sure about compatibility)
- libogg (doesn't compile)
- zlib/libsodimum which have no update.
This drops supports for 10.11 and earlier, meaning we can now assume
SSE4.1 is present.
Updates the build system to account for this.
Closes#5777 (by virtue of upgrading to SDL 2.12)
Refs #4362
Differential Revision: https://code.wildfiregames.com/D3111
This was SVN commit r24257.
Fix aarch64 build for NVTT.
Fix warning about GLVND when building on Linux (Patch by @Stan)
Native EOLs.
Patch by: @Itms
Differential Revision: https://code.wildfiregames.com/D2563
This was SVN commit r24245.
Two noteworthy changes:
- Proxies are update to the SM60 API, having an explicit reserved slot
and a private slot, in which the 'proxy data' and the C++ object are
stored. This fixes a debug assertion failure of SM52 (See bugs 1237504
and 1339411)
- The GC callback behaviour has changed slightly, and we should now only
look for GC_SLICE_BEGIN and GC_SLICE_END calls (Bug 1364547)
Other updates are minor:
- Bug 1339036: JSTYPE_VOID beomes JSTYPE_UNDEFINED
- Bug 1308236 - avoid ambiguous comparison by changing NULL to nullptr
- Bug 1421358, GC::reason::REFRESH_FRAME was removed. API is indicated
in jsapi.h so use that.
- Compartment behaviours update
- ClassOps changes (Bug 1389510 removed the getter/setter - 7c04ea0211 -
and bug 1370608 added one more before that so net minus one)
- Minor tests touchups again.
Tested by: SubitaNeo, Stan
Thanks to bellaz89 for the Shared Array fix
Closes#5859
Differential Revision: https://code.wildfiregames.com/D3116
This was SVN commit r24243.
This changes VS to use the same library name as other platforms, since
the toolsets are binary-compatible going forward. This makes the build
script slightly more streamlined on windows.
Also enable building NSPR on windows as part of the spidermonkey build,
instead of compiling it separately.
Tested by: SubitaNeo, Stan
Refs #5859
Differential Revision: https://code.wildfiregames.com/D3115
This was SVN commit r24242.
This:
- Generates a VS solution for VS17
- Explicits the boost toolset chosen, leveraging ABI compatibility to
avoid recompiling the library (for now).
- Likewise, reuses the Spidermonkey libraries. The SM60 upgrades does
away with putting the toolset in the library name entirely.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3130
This was SVN commit r24240.
Compatibility mode will be handled in a later diff.
Comments by: @Itms, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2420
This was SVN commit r24238.
Spidermonkey 60 can only be compiled with C++14. This conflicts with
building 0 A.D. with C++11, so upgrade to C++14 first.
This in itself should not drop compiler support on any platform.
Tested on Windows by: Stan
Tested on Linux by: Freagarach
Refs #5859
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3124
This was SVN commit r24235.
UniqueRange was a unique_ptr replacement with a few tweaks (such as a
compulsory custom deleter). Its features are not really used, it
contains outdated atomic calls, and it blocks D1511, thus it is removed.
Refs #5165
Differential Revision: https://code.wildfiregames.com/D613
This was SVN commit r24234.
Two issues are fixed:
- Atlas on non-Mac crashed when started from within the game.
- MSAA options crashed if enabled on startup.
The underlying issues where improper shutdown, and assuming the renderer
was initialised than it might not be (in particular, the post-processor
wasn't).
Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3131
This was SVN commit r24233.
Follows from d0fc8ff67d, 95dbb8be25.
The original diff asserted that only "real" entities would make range
queries. This proved inaccurate as building previews can too. However,
simply removing the assertion doesn't fix the issue, given that they
still aren't found and we still need to account for their size.
This fixes that properly by special-casing local entities.
Thanks s0600204 for giving this a look.
Reported by: Mr.lie
Differential Revision: https://code.wildfiregames.com/D3132
This was SVN commit r24231.
The JS-side counterparts of C++ objects are now Proxy objects, in
anticipation of SM60 changes that remove the get/set hooks entirely.
This makes semantic sense too as they are essentially phantom wrappers
around the C++ objects, with no proper JS representation.
By using different proxy handlers for different GUI object types, we can
further fix issues encountered in D2136 by defining the relevant
functions only on objects that should have them.
The main complexity with proxy handlers is that Spidermonkey assumes in
several places that they are static and data-less, so they cannot be
used directly to hold data. This diff works around that issue by storing
per-script-interface data in the CGui directly.
Further API changes in SM60 make this slightly cleaner.
Comments by: Itms
Refs #5859
Differential Revision: https://code.wildfiregames.com/D2768
This was SVN commit r24229.
Rendering options use this capability to simplify their implementation.
This makes it easier to add new options.
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2293
This was SVN commit r24228.
This cleans up many un-necessary header includes, either simply
providing nothing or forward declarations in their place.
No major compilation time change here, though this does reduce depencies
in some headers.
Also fix up old MacOS STL-include fixes that are no longer relevant.
Differential Revision: https://code.wildfiregames.com/D3128
This was SVN commit r24227.
I incorrectly assumed no local entities would be making range queries,
but some building previews do. The assert is thus incorrect.
Reported by: SubitaNeo
Fixes#5870
Differential Revision: https://code.wildfiregames.com/D3125
This was SVN commit r24223.
FCollada asserts, but only on windows for whatever reason, when loading
a file that contains a Windows path.
There are many others, but the game explicitly fixes those, so I haven't
changed them for now.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3120
This was SVN commit r24220.
CCmpRangeManager queries do not take obstruction size into account,
meaning they return fewer entities than they should. This particularly
affects buildings with ranged attacks, gates, and a few other templates.
This is, unfortunately, a slight performance decrease.
Discovered following Angen's comment [[
https://code.wildfiregames.com/D2738#116269 | here ]].
Comments by: Angen
Reviewed By: bb
Refs #3381 (not marking it down as 'fixes' and I'm not entirely sure it
was the only moving part here).
Differential Revision: https://code.wildfiregames.com/D2759
This was SVN commit r24217.
- Provide a "Hotkey" screen to let players remap hotkeys in-game using a
convenient setup.
- Make all .cfg hotkeys refer to scancodes (i.e. position on the
keyboard), so that default hotkeys now translate correctly for AZERTY,
QWERTZ and other layouts.
- 'BackSpace' is now an alias for 'Delete', and works for killing units.
This fixes#1917, as macs don't have a proper delete key and would need
to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.
Functionally, this switches hotkeys to scancodes, as that makes more
sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.
Fixes#2850, Fixes#2604, Refs #1810, Fixes#1917.
Follows work in 3d7784d2af.
Various diffs tested by: Angen, Stan, Freagarach
Comments by: Nescio
Differential Revision: https://code.wildfiregames.com/D2814
This was SVN commit r24215.
D2768 inherits from a Spidermonkey class, and SM is built without rtti.
This won't compile unless we also compile without RTTI, and that diff is
required for SM60.
Further, windows was already compiling without RTTI and our coding
conventions say to not use it, so this is more of a regularization.
AtlasUI is left unaffected as WXWidgets uses it (and it's a dynamic
library so separate enough to do that).
Differential Revision: https://code.wildfiregames.com/D3104
This was SVN commit r24214.
Making it easier to change just one of the two.
Also makes some stats more similar to that of a champion elephant, most
notably the vision was increased from 92 to 100 and deleted wedge
formation.
Patch by: @Nescio
Differential Revision: D2595
Comments by: @Angen, @bb.
This was SVN commit r24212.
This reverts static linking on linux from 6bb08fb424, it appears to fail
to link and/or crash, depending.
- Commit the tarball.
- Update update-workspaces.sh
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3114
This was SVN commit r24205.
No particularly noteworthy changes, as most complex API changes were
already supported in SM45 and done.
The addition of JSStructuredCloneData allows to remove our custom class.
Changes:
- InformalValueTypeName is back in the API, so remove our
implementation.
- Stop using JSRuntime entirely in favour of JSContext*
- JSPropertyDescriptor is renamed.
- CompartmentOptions are tweaked slightly (no functional changes)
- JS::Construct - API update.
- JSClass split - API update.
- A js.msg error message was removed, so we had to use a different one.
- Tests fix: fix comparison of union instances
- Disable warning in spidermonkey Vector.h
- Update error reporting to SM52 (minor API updates)
- Ignore warnings about unused return values (would come from OOM, which
isn't recoverable)
Most of the patching was done by Itms.
Tested by: Stan, Freagarach
Fixes#4893
Differential Revision: https://code.wildfiregames.com/D3095
This was SVN commit r24203.
Of note is the change to static linking on *nix (MacOS already used it).
The logic is that we can only use one single version of SM, so that
advantage of dynamic linking is lost regardless. We might also see
performance gains in the future with LTO enabled. It is also slightly
easier to distribute the program as a result. Expect a negligible size
increase in the binary size (offset somewhat by no longer needing to
distribute .so files). Finally, it streamlines the build script.
Also noteworthy in this commit:
- The MacOS build script is folded back into the general build script.
- the perl/sed command is replaced by patching the configuration file,
which at least warns if it starts failing in the future.
Binaries for windows provided by @Itms
The bulk of the patching was also done by @Itms.
Tested by: Stan, Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3094
This was SVN commit r24202.
Broken in several recent diffs.
This also fixes (very) old missing standard headers.
Differential Revision: https://code.wildfiregames.com/D3110
This was SVN commit r24200.
Includes alarm_defeated_ally.ogg by @Samulis
Reviewed by: @bb
Comments by: @Angen Freagarach
Differential Revision: https://code.wildfiregames.com/D2860
This was SVN commit r24199.
Make packing states to react to Stop command, which is supposed to
cancel current orders.
Fixes: #4015
Differential Revision: D3105
This was SVN commit r24191.
- Check for pending exceptions after function calls and script
executions.
- Call LOGERROR instead of JS_ReportError when there is a conversion
error in FromJSVal, since that can only be called from C++ (where JS
errors don't really make sense). Instead, C++ callers of FromJSVal
should handle the failure and, themselves, either report an error or
simply do something else.
- Wrap JS_ReportError since that makes updating it later easier.
This isn't a systematical fix since ToJSVal also ought return a boolean
for failures, and we probably should trigger errors instead of warnings
on 'implicit' conversions, rather a preparation diff.
Part of the SM52 migration, stage: SM45 compatible (actually SM52
incompatible, too).
Based on a patch by: Itms
Comments by: Vladislavbelov, Stan`
Refs #742, #4893
Differential Revision: https://code.wildfiregames.com/D3093
This was SVN commit r24187.
ProfileViewer.h forward-declares JS::Value but doesn't use it. Starting
in SM68, JS::Value is a union, and this breaks at compilation.
Last modified in c02a7e1a7b, useless since 2af94c5898
Differential Revision: https://code.wildfiregames.com/D3102
This was SVN commit r24186.
aae417bd29 made ScriptInterface not recreate a new JSContext since it
becomes a compartment wrapper, but that means we need to GC tests or
they might OOM.
To make it mostly seamless, GC on any test setup. The JS tests are
pretty close to the 16Mb limit as it stands so GC them manually too, for
good measure.
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3101
This was SVN commit r24182.
SM52 essentially replaces JSRuntime with JSContext (though JSContext
itself was replaced with JSCompartment).
To prepare for this migration, rename all Runtime-related things to
Context.
Part of the SM52 migration, stage: SM45 compatible.
Patch by: Itms
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3091
This was SVN commit r24181.
ScriptInterface is now a wrapper around a JSCompartment, and thus always
has a well-defined global.
The error reporter is moved to ScriptRuntime in anticipation of that
handling JSContext in a later diff.
Part of the SM52 migration, stage: SM45 compatible.
Patch by: Itms
Tested By: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3090
This was SVN commit r24180.
As part of the SM45->52 migration, a ScriptInterface becomes a wrapper
around a JSCompartment, not a JSContext, thus we ought to store private
data for the compartment and not the context.
This is a mass rename of CxPrivate to CmptPrivate to match that before
the actual changes.
Part of the SM52 migration, stage: SM45 compatible
Patch by: Itms
Tested By: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3089
This was SVN commit r24177.
JSAutoRequest is required before calling into most JSAPI methods, for GC
reasons.
Calling it is required and fragile as one must not forget.
Further, SM52 and later make manipulating JSContext* dangerous as that
can cross Compartment(Realm in SM68) barriers (and ScriptInterface now
matches a Compartment).
The solution to both problems is to avoid using JSContext* in 0 A.D.
itself. To achieve this, a Request class is introduced, and must be used
to access a JSContext* from a scriptInterface. Further, Request is
passed to other ScriptInterface functions isntead of JSContext*, making
it obvious that the caller has already called it, reducing errors and
redundant JSAutoRequest calls.
Only JSNative functions now get a naked JSContext* without protection,
but the likelihood of forgetting a request is lower since many
ScriptInterface functions now expect it.
JSContext* is directly passed to JSAPI functions only.
Part of the SM52 migration, stage: SM45 compatible
Based on a patch by: Itms
Tested By: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3088
This was SVN commit r24176.
After this change, units will move directly to the nearest resource
dropsite when they are idle but carrying resources at full capticity,
instead of trying to gather, then realising again they are full, and
going back to the dropsite.
Reviewed by: @Freagarach
Comments by: @Angen, @wraitii
Differential Revision: https://code.wildfiregames.com/D2791
This was SVN commit r24172.
- Makes it easier to change down the line (and change is coming)
- Allows making g_ScriptRuntime thread-local easily.
- Remove ParentRuntime, which is not used at the moment.
Part of the SM52 migration, stage: SM45 compatible.
Patch by: Itms
Tested By: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3087
This was SVN commit r24171.
DefPersistentRooted is essentially a wrapper around unique_ptr and has
no real reason to exist.
Part of SM52 migration, stage: SM45 compatible.
Patch by: Itms
Tested by: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3086
This was SVN commit r24170.
When serialising JS objects, we keep track of any encountered object,
and serialize it only once. Any further serialisation instead stores an
ID referring to the original object (essentially an opaque pointer).
The trouble of course is to have a unique, persistent identifier for
such an object.
svn uses an ObjectIDCache, essentially a "JS Object -> ID" map (which
internally is essentially a "JS heap pointer -> ID" map).
JS, since ES15, includes a "Symbol" primitive type, which is a unique,
immutable identifier. They are also not iterable by for..in or
GetOwnPropertyName or related.
This means they can be used to store the tag directly on the object
(since it's impossible overwrite a user property).
Thanks to this, we can forgo ObjectIDCache in the serializers, and since
following D2897 it becomes unused, we can delete it, along with the
Finalization code it used.
Part of SM52 migration, stage: SM45-compatible changes.
Patch by: Itms
Tested By: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3085
This was SVN commit r24167.
By default structures now have a vision range of 4 (to allow them to
reveal themself). Effectively no values are changed (beyond those in
templates/other).
Patch by: @Nescio
Differential Revision: D3036
This was SVN commit r24163.
Follow up on 8bfb449375. Allows saving turret positions in the map file,
instead of relying on the order in which the entities are added.
Differential Revision: D2614
Reviewed by: @wraitii
Comments by: @Angen, @bb, @vladislavbelov.
This was SVN commit r24161.
The script interface has code to serialize/deserialize JS objects with a
user-defined prototype. That code is usable in the AI, but currently
unused (and there are no plans to use it in the long run).
Removing it allows removing more code down the line, which helps with
the SM45-52 migration.
Collaboration with itms.
Refs #4893
Differential Revision: https://code.wildfiregames.com/D2897
This was SVN commit r24157.
Do not use props , to reduce drastically the number of drawcalls. Those
should only be used for uneven terrain.
Do not load the kart struct for every arrow use prop_weap like all the
other weapons.
Do not use basic_trans where not necessary
Noticed by: @vladislavbelov, @OptimusShepard.
This was SVN commit r24156.
ComputeTargetPosition called Dot() with large enough vectors that it
overflowed. Avoid that by not actually doing the full dot product.
Reported by: Itms
Fixes#5852
Differential Revision: https://code.wildfiregames.com/D3061
This was SVN commit r24152.
Where controllability is defined as the ability to receive _any_ order
from the player.
Fixes the concern not raised at a1dc9cadd8#42637.
Differential Revision: D1960
Reviewed By: @wraitii
Comments by: @bb, @Stan.
This was SVN commit r24148.
e07f12bea6 Changed the class names of Defense Towers, but it forgot to
update maps, this patch fixes that.
Differential Revision: D3063
Reviewed By: @Nescio
This was SVN commit r24147.
Following d592bf9cb6, paths requested at turn N were set-up to be
computed between the end of turn N and the start of turn N+1 (which
would ultimately allow threading this computation), via calls to
'StartProcessingMoves' and 'FetchAsyncResultsAndSendMessages'.
However, the call to UpdateGrid() remained at the start of turn N+1,
between the 'start' and 'fetch' calls. Since all paths are currently
computed on the 'start' call, this means all paths are computed on a
(possibly) dirty pathfinder grid.
In particular, this leads to OOS on rejoin since the rejoiner will
recompute the grid before computing the outstanding paths.
This would also obviously be buggy in a threaded environment, since some
paths might be computed on the fresh and some on the dirty grid.
Finally, MT_TurnStart was sent before the paths were computed, which
might lead to further pathfinder grid changes (not a crashing problem
without threading, but still conceptually odd). The 'fetch' call is thus
moved before it.
This thus fixes d592bf9cb6/D1918, after 92ad6a61fa already fixed a first
issue.
Since the grid is now only updated at the end of a turn, we need to
ensure that it is correct on Turn 0, thus the pathfinder recomputes it
on InitGame.
Refs D14
Reported by: Itms
Fixes#5851
Differential Revision: https://code.wildfiregames.com/D3064
This was SVN commit r24142.
Introduced in af15d5972d.
Landscape and Biome previews are not updated correctly when reopeneing
gamesetup.
To solve that, remove lastBiome and lastLandscape and always try to
update preview if preview file exists and does not match with current
one.
Differential revision: D3041
Reviewed by: @Freagarach
Fixes: #5785
This was SVN commit r24139.
Remove the MAHAF code and binaries, which doesn't work on anything more
recent than Windows XP due to the usage of an unsigned driver.
Remove the custom timer (PMT, TSC...) code to use the Windows
recommended way aka, QueryPerformanceCounter (QPC)
Remove the deprecated functions in wpthread relating to this. Some
further cleanup will be needed, but this patch is already big enough.
This patch voluntarily excludes the Linux Fix for further investigation
as we haven't ruled out a kernel bug yet;
Discussed with: @wraitii, @vladislavbelov, @janwas, AMD Inc,
Tested by: Dakara, @OptimusShepard, Stan (On W10, Win7; with and without
PCH)
Threads:
https://wildfiregames.com/forum/topic/28367-amd-ryzen-threadripper-user-read-before-posting/https://wildfiregames.com/forum/index.php?/topic/26890-problem-with-ryzen-3000er-series/page/3/
Differential Revision: https://code.wildfiregames.com/D2726
This was SVN commit r24137.
70c71bff0f changed modifiers to explicitly support only string or
numeric values.
However, buildRestrictions territories worked with a list, which errored
out. This is now replaced with a string.
Reported by: Asger
Investigated by: Freagarach.
Reviewed By: Freagarach
Fixes#5849
Differential Revision: https://code.wildfiregames.com/D3062
This was SVN commit r24135.
Commented By: Stan
Reported By: Freagarach
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3059
This was SVN commit r24129.
Renames helper Entity.js to Position.js and moves to there:
- `EntitiesNearPoint` (from Attacking.js).
- `InterpolatedLocation` (from Attacking.js).
- `TestCollision` (from Attacking.js).
- `PredictTimeToTarget` (from Attack.js).
Also adds a test for the helper.
Differential Revision: D2940
Reviewed By: @wraitii
Comments by: @Stan, @vladislavbelov
This was SVN commit r24128.
Such that now e.g. control groups can be selected using those.
Patch by: @Nescio
Differential Revision: D3029
Accepted by: @wraitii
This was SVN commit r24120.
939002f0dc changed from vectors to grid which broke resetting when
terrain size changed.
Also use SAFE_ARRAY_DELETE for simplicity.
Reported by: vladislavbelov
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2961
This was SVN commit r24117.
Added in 9023f4bebb, which changed lobby GUI messages to JS::Values,
requiring a real context. The original code mistakenly inverted the
owning script interfaces.
Given the reproducibility discovered in SM52, the timeline of the bug,
and the nature of the issues encountered in MP, this is a rather safe
fix for #5655.
Reviewed By: Itms
Fixes#5655
Differential Revision: https://code.wildfiregames.com/D2922
This was SVN commit r24116.
This function is currently polling-based, and called by the GUI on each
turn, which results in a big performance hit.
Use the opportunity to rename the set of functions with more generic
names.
Reviewed By: Freagarach, wraitii
Differential Revision: https://code.wildfiregames.com/D2919
This was SVN commit r24114.
Gamesetup fails to handle cases with fixed ai 5ca68a38ef.
Removing wrong 'this' and checking for 'undefined' to fix additional
warnings when switching maps.
Differential Revision: D3038
Fixes: #5844
This was SVN commit r24109.
- Purge unnecessary attack sounds and buildingAI-nodes.
- Define some sounds, health and territoryInfluence in children when
most of them override parent.
- Remove unused `<BuildRestrictions/Category>` reverts 9af7747d76, part
of cdcee291cf, references 5e3049f6b2. Categories can be added when
necessary.
Patch by: @Nescio.
Differential Revision: D3016
This was SVN commit r24104.
Unify textures for kushites and ptolemies.
Add back the kush_struct_02.png file with a proper name this time
Some textures fixes from delenda est.
Delete the old textures and use correctly desaturated version of those.
Refs: 7943d82bfe & d8c7f6da62
This was SVN commit r24103.
Disable GPUSkinning when glsl is disabled, because VertexAttribPointer
is not implemented on ARB/GLES and it is called by GPUSkinning.
Differential Revision: D2423
Reviewed by: vladislavbelov
Fixes: #5635
This was SVN commit r24101.
Before this patch, when entity was upgrading and producing and finished
upgrading before production, production was canceled. That meant player
assumed unit/tech will be ready in certain time but it will not. Also
fixing interference between upgrade and production animations.
Differential Revision: D2652
Reviewed by: bb
Comments by: Stan, Freagarach
Fixes: #5749
Refs: #2706
This was SVN commit r24088.
Based on Patch By: ramtzok1
Comments by: elexis, Polakrity, smiley, Stan
Differential Revision: https://code.wildfiregames.com/D1764fixes#5385
This was SVN commit r24075.
Introduced in 5fbb224dc0
rewrite 3 ifs to 1 if
merge 2 member variables into 1 member variable
remove 2 function local variables
save one call for CComponentManager as both ifs would or execute or not
code is shorter and looks nicer
Differential Revision: D3009
Reviewed by: bb
This was SVN commit r24072.
This moves:
- geology_metal_*.xml -> ore/*_small.xml
- geology_metal_*_slabs.xml -> ore/*_large.xml
- geology_stone_*.xml -> rock/*_small.xml
- geology_stonemine_*_quarry.xml -> rock/*_large.xml
To have folders per resource subtype as was already the case for fish,
treasures and ruins.
Patch by: @Nescio.
Differential Revision: D1010
This was SVN commit r24070.
This moves fruit templates to gaia/fruit/ and wood (tree) templates to
gaia/tree, thus sorting them by resource subtype, as is the case for
fish, ruins and treasures already.
Patch by: @Nescio.
Differential Revision: D1009
This was SVN commit r24069.
[Petra]Check against `undefined` when caching variables from templates.
Current check does not allow to read 0 and false values from templates
and represents them as undefined.
Forum link:
https://wildfiregames.com/forum/topic/29206-questions-on-ai-api3-template-handling/
Reported by: Teiresias
Patch by: smiley
Reviewed by: Angen
Differential Revision: D3010
This was SVN commit r24053.
Into:
- template_gaia_fruit*
- template_gaia_tree*
to have a template per resource subtype for consistency.
Removed also "Dead " and " Tree" from specific names and purged the
unused "ForestPlant"-class.
Patch by: @Nescio.
Differential Revision: D2990
This was SVN commit r24043.
After 34138a7764, if map specifies 0 as value in certain settings, this
value is ignored.
Fixing that by explicitly checking for undefined.
Differential Revision: D2982
Reviewed by: Freagarach
This was SVN commit r24037.
94c02ec33c deprecated the use of storing the gatherers on a per player
basis.
This removes it entirely thus saving a few useless calls and operations.
Refs #1387.
Differential Revision: D2755
Reviewed by: @bb.
This was SVN commit r24036.
Cheering as is done now is highly unfair and illogical. Cheering units
are immune to all damage for 2.8 seconds.
That means unit A attacking cheering unit B is wasting its attack and
doing 0 damage while taking damage from anyone attacking it (unit A).
That can save cheering unit with 1 HP from being killed what is not fair
to the attacker.
Changes:
removing immunity to damage while cheering
do not forcing cheering order so unit can respond to attacks
removing cheering from promotion
cheering after unit cannot find more targets(units) while in combat and
has nothing else to do
tell units around to cheer as well
Differential Revision: D1977
Reviewed by: Freagarach
Accepted by: goldie, borg-
Comments by: Stan, wraitii
This was SVN commit r24034.
Explicitly disallowed in the past (see ticket), it now becomes possible
to e.g. guard a catafalque with a hero and guard the hero with healers.
Refs #2034.
Differential Revision: D2732
Reviewed by: @Angen, @bb.
This was SVN commit r24033.
Summary:
As reported by @bb and @Angen , 375c319639 broke formation walking in a
few situations.
The issue is that f489ab3a16/D2871 requires formation members to get no
messages until the controller is stopped, but 375c319639 didn't use the
correct function (on account of a missed rebase), so members stopped too
early.
Reported by: bb, Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D3006
This was SVN commit r24029.
Current gui has no space for more structures/formations to be displayed
and some
civilisations are very close to hit this limit.
Alternative would be scrolling option or pages, but until then this is
acceptable solution.
Differential Revision: https://code.wildfiregames.com/D2875
Patch by: Nescio
Reviewed by: Angen, geneva55
Comments by: wraitii, Stan
This was SVN commit r24028.
Remove Champion class from siege functions related to melee elephants.
Improve mobile dropsite code by replacing Elephant class with Unit
class.
Remove code related to fact support elephants can build as it is not
case anymore.
Differential Revision: https://code.wildfiregames.com/D2964
Patch by: Nescio
Reviewed by: Angen
This was SVN commit r24027.
var -> let
comments - capital leters, dots
a:help - dots
spaces
Differential Revision: https://code.wildfiregames.com/D3001
Comments by: Nescio, Jenkins
This was SVN commit r24024.
Instead of disappearing inside an open structure, this lets garrisoned
entities show up on the platform of an outpost.
Also corrects some dimensions.
Patch by: @Nescio.
Differential Revision: D2986
Idea accepted by: @wraitii.
Reviewed by: @borg-.
This was SVN commit r24021.
Gates can be garrisoned like regular wall pieces now, which looks nice.
Different civs have different amount of entities that can be placed due
to differneces in their actors:
- 4: brit, gaul, maur
- 5: sele
- 6: kush, pers
- 8: athen, cart, iber, mace, spart, roman siege wall gate
- 10: ptol, rome
Patch by: @Nescio.
Differential Revision: D2760
Informally accepted by: @badosu, @borg-, @genava55.
This was SVN commit r24020.
Medium walls now have four slots up from three.
Long walls now have eight slots up from five.
This looks nice and improves realism by making walls a tad easier to
defend.
Patch by: @Nescio.
Differential Revision: D2783
Idea accepted by: @genava55, @borg-.
This was SVN commit r24019.
Outposts ought to be used to get more vision, not as an accessory to
rushing.
Technologies were not very potent and hardly ever researched.
Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2933
This was SVN commit r24016.
City Phase economic technologies gave +50% gathering rate increases, on
top of the pre-existing ones, which was such a huge bonus that players
could never recover from being late.
This patch balances techs so that Village and Town phase technologies
are stronger, and City phase not so potent.
Research times also increase with each phase.
Patch by: borg-
Reviewed by: wraitii, badosu
Differential Revision: https://code.wildfiregames.com/D2916
This was SVN commit r24015.
Ranged units are more durable, and generally stronger than melee units
currently.
Making them promote slower (+25%) slightly reduces the gap.
Patch by: borg-
Reviewed By: wraitii, genava55, badosu
Differential Revision: https://code.wildfiregames.com/D2899
This was SVN commit r24014.
Having two technologies was too strong a bonus.
Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2966
This was SVN commit r24012.
Splash falloff was calculated using centre-to-point distance, where
nearest-edge to nearest-edge ought to have been used.
Use DistanceToPoint to correct for that.
Make sure the damage multiplier cannot go negative.
Remove GetUnitSize in favour of GetSize.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D2963
This was SVN commit r24010.
The Maurya elephant archer is a fast moving citizen soldier, despite
being unable to gather.
This led to an issue post 164af0742a.
Reviewed By: bb
Fixes#5800
Differential Revision: https://code.wildfiregames.com/D2962
This was SVN commit r24009.
Also don't try to calculate more when we are damaged with zero (`0`)
amount.
Differential Revision: D2981
Reviewed by: @Angen.
This was SVN commit r24006.
Fixes the ordering of arguments in HandleAttackEffects by StatusEffects.
Fixes wrongly written effectType.
Differential Revision: D2977
Reviewed by: @bb.
This was SVN commit r24004.
The nodes in the templates ought to be sorted alphabetically as should
the modifications in technologies and auras. This makes that so.
(Also added the `Civ` to the Identity of template_formation, for it is
necessary although commented out.)
Differential Revision: D2976
Reviewed by: @Nescio.
This was SVN commit r24003.
- Renames Armour-node to Resistance.
- Support resistance against Capture.
- Puts resistance against effects in separate nodes.
- Some cleaning.
Differential Revision: D2229
Reviewed by: @bb (accepted), @wraitii.
Comments by: @Stan, @Nescio.
This was SVN commit r24001.
A blacksmith is a person, a forge is the blacksmith's workshop.
This renames templates and corrects simulation and sound files.
Patch by: @Nescio.
Differential Revision: D2971
Approved by @genava55, @Gallaecio, @wraitii.
This was SVN commit r23998.
Also cache calls to `cmpIdentity` to improve performance for multiple
bonuses.
Differential Revision: D2970
Reviewed by: @bb.
This was SVN commit r23993.
The "hawk" is actually a buzzard, so renamed.
Moved outside of the "gaia" folder so mapmakers can easily identify
between birds that cannot be interacted with ("birds" folder) and those
that *can* be interacted with ("gaia" folder) even though they may have
the same template name.
Patch by: @Nescio.
Differential Revision: D2254
This was SVN commit r23977.
This will prevent users who have an old NVTT installed on their system
from experiencing crashes. Other NVTT issues at runtime should be fixed
by clearing the cache.
Differential Revision: https://code.wildfiregames.com/D2765
This was SVN commit r23974.
Before the NVTT upgrade, no DXT1a file would have been properly decoded:
they would all have been mistaken for a 8bpp greyscale due to a logic
issue in our code, which would have triggered a crash. I did not notice
the logic issue when performing the upgrade. As a result, decoding those
files now fails silently: their alpha bit will be ignored and they will
be handled as DXT1.
This patch fixes the logic and allows us to decode DXT1a properly, in
accordance with the format specifications. Currently, we do not use this
format.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2522
This was SVN commit r23973.
- Custom fixes to coala: support python3.8 and recent versions of
cppcheck
- Adapt .coafile to current coala
- Adapt LicenseYearBear to current `svn` python package
- Move the linter configuration to the coala directory
- Remove the now unused lint-patch script
- Update Jenkins pipelines to report build stderr as a comment on Unix
(including warnings when the build succeeds), and to report lint issues
inline
Tested on Jenkins during the past week.
Differential Revision: https://code.wildfiregames.com/D2931
This was SVN commit r23971.
Fixes 5568bd4c16
`lastPos` isn't guaranteed to exist, though formations are most likely
required to make the situation happen in common gameplay.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2960
This was SVN commit r23970.
- Move nodes that are superseded in (practically) all children.
- Move footprints to specific children since most actors differ anyway.
Patch by: @Nescio.
Differential Revision: D2744
This was SVN commit r23963.
Removes usages of fixed pipeline functions in shader path.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2944
This was SVN commit r23954.
Differential Revision: D2796
Patch by: Nescio
Reviewed by: Angen, Stan
0 A.D. currently uses the term "Italiote" [sic]. It's best to use
precise language:
Italic refers to a branch of Indo-European and the peoples that speak it
(cf. Celtic).
Italian refers to the modern language, descendant from Latin, the people
that speak it, and their country (cf. Romanian).
Italiot (from Ἰταλιώτης) refers to Greeks living in Italy (cf. Cypriot).
From the context it's clear what 0 A.D. actually means (Samnites etc.)
is Italic.
This patch therefore:
Corrects the art file names.
Also renames the other embassy icons for consistency (cf. D2551).
Corrects the embassy template file name.
Adjusts the affected templates, AI, and map file.
Deletes the unused Celt, Iberian, Italian classes.
Updates the embassy template tooltips (cf. D2578) and cart.json civ file
entries.
Orders the <Identity> node in the templates as specified in Identity.js.
This was SVN commit r23949.
Add missing entries and remove deprecated rotary mill.
Also some cosmetic changes.
Patch by: @Nescio.
Differential Revision: D2887
This was SVN commit r23946.
ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp
and once by HWLightingModelRenderer.cpp.
Having two different definitions in the global namespace is a violation
of the C++ One-Definition-Rule.
Patch by: StefanBruens
Reviewed By: wraitii, Vladislav
Differential Revision: https://code.wildfiregames.com/D2932
This was SVN commit r23941.
As reported by Freagarach following a7da40ac2f.
32e8ed51aa introduced a "MoveObstructed" message, that could be sent
when the entity ran into obstructions, to stop early.
In HandleObstructedMove, my intention, as written in the comment, was
that the caller would do its thing (call StopMoving(), move out of the
world etc.) and thus ComputeGoal would return early.
However, I mistakenly left the `cmpPosition->GetPosition2D()` in between
that and ComputeGoal, which would then fail.
This fixes that by moving it after the `ComputeGoal` call.
Also add a sanity StopMoving() call to a7da40ac2f's move-out-of-world
call.
Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2935
This was SVN commit r23940.
The default size used to be Medium, when "Normal" makes more sense for
that.
Further, "medium" is now halfway between tiny and giant sizes, which
also makes more sense.
Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2927
This was SVN commit r23939.
This makes it faster, particularly for small radiuses.
Patch by: badosu
Comments by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2710
This was SVN commit r23938.
Makes the tooltips of technologies that modify armour consise.
Patch by: @Nescio.
Differential Revision: D2579
Reviewed by: @Gallaecio.
This was SVN commit r23937.
A workshop is a more generic place of doing work whilst an arsenal is a
place where artillery is handled, which is the purpose of the structure
in 0 A.D..
Patch by: @Nescio.
Differential Revision: D2756
This was SVN commit r23935.
Those buildings get 1 vision (making them selectable), but no longer
provide vision on their own.
Wall Towers have their vision increased slightly to make it larger than
their attack range and to compensate for it.
Patch by: Nescio
Accepted By: borg-, genava55, wraitii
Differential Revision: https://code.wildfiregames.com/D2505
This was SVN commit r23934.
CLogger.h uses std::deque but doesn't include the required header file.
This fails since 5473393e30 on Arch Linux
Reported by: navigo_ps91
Reviewed By: irishninja
Differential Revision: https://code.wildfiregames.com/D2928
This was SVN commit r23933.
Define them in specific templates as animals generally have specific
actors.
Use values in 0.5 steps and pick them appropriately for each actor.
Patch by: Nescio
Accepted By: wraitii, genava55
Differential Revision: https://code.wildfiregames.com/D2721
This was SVN commit r23930.
Introduced by 21106e011f and d4db7d2e0b respectively, these templates
were introduced without taking gameplay considerations into account, and
players disliked them.
De-activate them from regular play until a better solution can be found.
Test Plan: Check for completeness and correctness. Agree unbuildable is
an improvement over brokenness.
Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2495
This was SVN commit r23928.
This fixes the transfer of key inputs from WxWidgets to SDL, making it
possible to type in the in-game GUI from Atlas.
Also fixes whitespace issues in some Atlas files.
The following improvements are OSX specific:
- fixes an SDL assertion related to unused subsystems in Atlas.
- Remove the 'osxguiapplication' override. This fixes the editor
starting up in the background and not accepting input when launched from
in-game.
- To prevent an issue with sdl/wxwidgets conflict when running from
inside the game, actually boot a new instance (see #2427)
Reported by: wik (Many thanks for your investigations)
Tested by: trompetin17, Stan
Fixes#2427Fixes#2846
Differential Revision: https://code.wildfiregames.com/D2788
This was SVN commit r23926.
Improve unitAI: don't move if the requester can reach us and we are
close enough. This avoids an issue where ships moved more than necessary
when picking up many units.
Also improve requester UnitAI -> retry pickup if the target entity is
Idle.
Improve unitMotion: periodically recompute paths in "known bad path"
mode to adapt to moving targets.
Expose UnitMotion reachability to scripts and other code.
This adds a test map for some common and some tricky pickup cases, using
triggers.
Based on a patch by: causative
Reviewed By: Freagarach
Fixes#3472
Differential Revision: https://code.wildfiregames.com/D665
This was SVN commit r23925.
All entities with UnitAI wastefully listened to global
ConstructionFinished messages. Now the message is only sent to assigned
builders.
Differential Revision: D2697
Reviewed by: @wraitii.
This was SVN commit r23924.
This makes it less likely to add double entries. Also corrects
indentation in the `<StatisticsTracker>`-node.
Patch by: @Nescio.
Differential revision: D2834
This was SVN commit r23923.
Women could already build/repair such buildings, they simply could not
be used to place foundations.
This reduces micro and removes a minor annoyance.
Accepted By: Nescio, borg-, badosu, itms
Differential Revision: https://code.wildfiregames.com/D2911
This was SVN commit r23921.
Promoted units move out of the world but keep their current orders,
which can trigger invalid states.
As cleanup, handle this case in GATHER.FINDINGNEWTARGET
A more general fix seems possible by putting the UnitAI in a default
state.
Reported by: psypherium
Reviewed By: Angen
Fixes#5788
Differential Revision: https://code.wildfiregames.com/D2920
This was SVN commit r23920.
This crash occured on the receiver machine, making it effectively a
remote crash attack.
Reported by: Riddler66
Based on a patch by: elexis
Fixes#5726
Differential Revision: https://code.wildfiregames.com/D2629
This was SVN commit r23918.
Implement a simple HTTP server to start games, receive the gamestate and
pass commands to the simulation.
This is mainly intended for training reinforcement learning agents in 0
AD. As such, a python client and a small example are included.
This option can be enabled using the -rl-interface flag.
Patch by: irishninja
Reviewed By: wraitii, Itms
Fixes#5548
Differential Revision: https://code.wildfiregames.com/D2199
This was SVN commit r23917.
This class is an AI hint that such units are to be treated as moving
fast, e.g. war dogs, or cavalry.
This makes it easier to introduce camels and chariots correctly.
Further work is required to make the AI unit choices less hardcoded.
Patch by: Nescio
Reviewed By: Angen, wraitii
Differential Revision: https://code.wildfiregames.com/D2251
This was SVN commit r23916.
“Rubble Materials” and “Geometric Masonry”, paired techs, could be
researched by most civs. They had limited use, were incoherent with
civ-specific art, and were researchable at wall-towers, at which points
techs that affect walls make less sense.
As such, they are deleted.
Patch by: Nescio
Accepted By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2880
This was SVN commit r23915.
The "health" of the palisade wallset was not being displayed correctly
in the
Structure Tree for any civ that didn't have the same resultant civbonus
effect
as the first civ shown when the 'Tree was opened.
The issue was caused by caching the parsed form of an entity template
when it is
first requested, then using that for *every* civ.
This wouldn't matter if every civ had completely different entities from
every
other civ, and no civ had civbonus technologies that affect shared
entities.
However, in "vanilla" 0 A.D., the templates of the palisade wallset, and
those
of the sheep, pig, and goat trainables, are shared between multiple
civs. And
the athen, brit, gaul, mace, and spart civs all have civbonus
technologies that
affect structure health.
(And as for mods, who knows...)
The solution provided here is to cache parsed entities by civ, like we
already
do with technologies.
Issue raised by @Nescio in b2842e8021
This was SVN commit r23913.
The code assumed that a player was being passed when it wasn't.
Reported by: Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D2904
This was SVN commit r23910.
Patch by: @wowgetoffyourcellphone
Textures created by Lennart Demeshttps://cc0textures.com/ and adapted by
wowgetoffyourcellphone
This was SVN commit r23908.
Removing strict binding of selection to footprint by adding optional
choice similar in footprint. If present, that one will be used, else it
will fallback to footprint size.
Allowing to use any selection shape without affecting gameplay, because
foorprint is used for projectile hit detection.
Differential revision: https://code.wildfiregames.com/D2844
Reviewed by: wraitii
This was SVN commit r23900.
Ranged units have a base walk multiplier of 1.2, melee of 1.0. Pikemen
are slightly slower.
Heros have 100 vision range, infantry have 80.
Approved by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2884
This was SVN commit r23895.
This patch fixes some oversights missed in recent commits:
* `pers.json` entry in D2532/d1d4a1d6b9.
* `brit.json` entry in D2533/c04a1ebac3.
* Delete two auras rendered obsolete in D2686/c1d71abe0b.
* Tooltip and `mace.json` entry in D2867/9eff418cb5.
* `maur.json` entry in D2821/133d163689.
* `sele.json` entry in D2858/95cc3937bd.
* Indentation, tooltip, and `{civ}.json` entries in D2839/32615ae6be.
* Indentation, tooltip, and `{civ}.json` entries of Hellenistic
Metropolis technology.
* Purged some non-existent things in various `{civ.json}` files.
* Added a history string and updated the technology tooltip for the
Immortals.
* Fixed Cart walls civ bonus tooltip.
Patch by: Nescio
Reviewed By: borg-
Differential Revision: https://code.wildfiregames.com/D2885
This was SVN commit r23894.
The war dog was OP in the early game, and useless in the late game.
Patch by: borg-
Comments by: Nescio
Approved by: badosu, Lionkanzen, Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2879
This was SVN commit r23893.
The agoge did not concern perioikoi, thus should not affect the citizen
soldiers.
Spartan hoplites are supposed to be the strongest infantry in the game,
this makes them again more effective than Macedonian Silver Shields.
Patch by: borg-
Accepted by: Nescio
Differential Revision: https://code.wildfiregames.com/D2846
This was SVN commit r23892.
The health reduction was too drastic and made this tech unbalanced. It
is removed, in favour of slightly smaller buffs and a lower cost.
Patch by: borg-
Comments by: Nescio
Reviewed By: wraitii, Nescio
Differential Revision: https://code.wildfiregames.com/D2876
This was SVN commit r23891.
The Kardakes mercenaries, trainable at the Persian Hall, are
historically problematic. Few sources exist on Kardakes troops, but they
seem to have been rather heavy infantry, and likely not mercenaries. As
such, they would be rather redundant with the Immortal.
The elephants are attested, and might be reintroduced later.
Further, the Ishtar Gate is Neo-Babylonian and predates the 0 A.D.
timeline. As such, given its limited use, it is removed as a buildable
structure.
Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2742
This was SVN commit r23888.
This unit is historically well attested, such as the Battle of Cunaxa or
the Battle of Gaugamela.
This unit is currently added at the fortress, though another pass for
chariots in general is needed.
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2683
This was SVN commit r23887.
This splits the "LOS"-query from the "Attack"-query. The LOS-query is
only enabled for skittish animals for now and entities without cmpAttack
don't try to set up an Attack-query anymore.
Differential Revision: D2824
Reviewed by: @bb.
This was SVN commit r23877.
This allows to specify a world population capacity that is divided
evenly amongst living players.
Differential Revision: D2426
Reviewed by: @Angen
This was SVN commit r23873.
Overall costs are reduced by around 25%, keeping a high Metal cost, and
they are made uniform across champions as a baseline.
Loot is adjusted.
Patch by: borg-
Accepted By: badosu, Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2816
This was SVN commit r23868.
Units in formation can occasionally request many short paths (and thus
introduce crippling lag) if their offset is obstructed.
This particularly happen when the formation is idle, since the offset
then always remains obstructed.
To prevent this, it is OK to immediately stop pathing on any motion
message (obstructed, failure, success). This does not break formation
movement since messages are only sent when the formation controller is
not moving (this finishes what was started in 0535eb9b92).
Ideally, this hack could be removed if the short-pathfinder was quick
enough / units were better at aborting.
Fixes concern raised by Freagarach on a7da40ac2f.
Refs #5624 in that the max-short-path range is the source of the lag.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2871
This was SVN commit r23867.
template_structure_economic_market.xml → Market
template_structure_military_dock.xml → Dock
<Market/TradeType> node → Trade
requirement for bartering: BarterMarket → Barter
Change Petra accordingly
Also changing:
Renamed the Gates class to Gate, LongWall to WallLong (cf.
WallTower), and StoneWall to Wall, to match their template file names.
Adjusted AI code, technologies, and templates accordingly.
Entity build restrictions:
renamed Apadana to Palace;
replaced UniqueStructure with IshtarGate and TempleOfVesta.
added Council to the (unbuildable) spart_gerousia.xml, since
it's functionally identical to athen_prytaneion.xml.
Introduced the following classes:
Council, IshtarGate, Library, TempleOfVesta, and Theater, to
match their build restrictions.
WallMedium and WallShort, to complement the already existing
WallLong and WallTower classes.
Stoa, TempleOfMars, and TriumphalArch, for completeness.
Made the ArmyCamp, Colony, Gate, Lighthouse, Naval, Palace,
Palisade, SiegeWall, and StoneWall classes visible.
Deleted the now unused Apadana, Kennel, SpecialBuilding classes.
Removed the Village class from outposts and palisades, because those
are not supposed to count towards the phase technology requirements.
Slightly rephrased the phase technology requirements tooltips.
Corrected the <GenericName> of the various palisade files.
Updated Structure tooltips from D2578 that have not already been
committed elsewhere.
Patch By: Nescio
Differenital Revision: D2892
This was SVN commit r23865.
String-values in modifications fail if the modifications do not apply,
as they end up in the "multiply/add" path, following D270 / 70c71bff0f.
Also allow multiple token modifiers, so that multiple tokens may be
added for example. This becomes order-dependent but the positive
outweighs the negative.
Reported By: wowgetoffyourcellphone
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2894
This was SVN commit r23862.
When starting a game with exactly one player that instantly wins the
game (consequest victory) and after that ceasefire running out will
trigger first the correct victory chat message, then a broken and
undefined have won the game chat message, initiated from the
ceasefiremanager.
Check for allies emptyness and do not send it if no players are active,
what means they all have been defeated or won.
Differential Revision: https://code.wildfiregames.com/D2891Fixes: #5675
This was SVN commit r23857.
The logic concerning visible garrison points (i.e. turrets) is moved
from `GarrisonHolder` to a separate file.
This is logical because garrisoned != turreted, so this allows for
turrets that cannot be garrisoned (refs. D1958).
Also references #3488.
Differential Revision: D2367
Reviewed by: @wraitii
This was SVN commit r23856.
Classes:
The Defensive class is made visible (cf. Civic, Economic, Military).
The Fortress class is made visible (because of build restrictions).
The Tower class defined in template_structure_defensive_tower.xml is now
visible.
The unused GarrisonTower class is removed.
The DefenseTower class is deprecated in favour of one unique class in
each of the *_tower.xml children templates:
*_artillery.xml → ArtilleryTower
*_bolt.xml → BoltTower
*_sentry.xml → SentryTower
*_stone.xml → StoneTower
template_structure_defensive_wall_tower.xml does not inherit from
*_tower and therefore has a WallTower class instead of a Tower class.
Updated the Identity.js file accordingly.
Updated the Petra AI files accordingly (DefenseTower → Tower).
Tower build restrictions are changed to simply Tower.
Technologies:
tower_armour.json affects all towers, but not outposts (unchanged).
tower_decay.json and tower_vision.json affect only outposts (unchanged).
tower_crenellations.json, tower_murderholes.json, tower_range.json, and
tower_watch.json affect now only the Sentry and Stone towers, instead of
all towers. This alters gameplay for the Artillery and Bolt tower, but
those shouldn't have been benefitting from arrow tower technologies
anyway.
Standardized the tooltips per the style guide.
Updated the <Identity/Tooltip> in the tower templates.
Inserted <BatchTimeModifier>1.0</BatchTimeModifier> in
template_structure.xml, where the <ProductionQueue> is defined, and
removed the <BatchTimeModifier> from templates that can't train any
units.
Patch by: Nescio
Reviewed by: Angen
Differential Revision: https://code.wildfiregames.com/D2549
This was SVN commit r23853.
This prevents units to rotate when leaving formation as they already
have correct rotation.
Differential Revision: https://code.wildfiregames.com/D2889
This was SVN commit r23851.
`target` did not always exist, thus raising errors when patrolling or
guarding.
Fixes concern raised by @Freagarach at 4bed678194
Reported By: Freagarach
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2883
This was SVN commit r23846.
This adds a new mode to modifications called "tokens" which allows
clever token parsing.
Technologies, auras and modifiers in general can use this to switch out,
add or delete tokens dynamically.
Currently implemented are production and builder queue tokens.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D270
This was SVN commit r23843.
The 'Hellenic Architecture' bonus for Greek civilisations increased
health and capture points slightly, but also build time.
Because it is active from the start, it ended up being a large economic
debuff that made these civilisations less competitive.
The build-time increase is removed so "Hellenic Architecture" is now a
pure bonus.
Patch by: Feldfeld
Accepted By: wraitii, borg-
Differential Revision: https://code.wildfiregames.com/D2839
This was SVN commit r23840.
Rome was unable to build palisades (presumably as it had unique access
to the somewhat comparable Siege Walls).
This however made Rome unable to build walls in Village Phase, and
restricting access to palisades makes little historical sense.
Patch by: Nescio
Accepted By: ValihrAnt, borg-, Lionkanzen
Differential Revision: https://code.wildfiregames.com/D2741
This was SVN commit r23839.
Seleucid armies used cavalry alongside pikemen, making the unit
versatile.
Depending on other balancing changes, this may be revisited later.
Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2858
This was SVN commit r23838.
Reduces build time of most buildings (except Barracks), and standardize
costs better across civs.
Furthermore, tooltips are updated and <Identity> nodes ordered as listed
in Identity.js.
Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2821
This was SVN commit r23837.
The Gauls were part of well-connected trade networks in ancient times.
Their exports mainly centered on slaves, mercenary, and military
equipment.
As such, a team bonus reducing blacksmith costs makes much more sense
than one reducing technology research time (particularly since the
historical justification for the existing team bonus was... thin).
Patch by: Nescio
Approved by: borg-, ValihrAnt, wraitii
Differential Revision: https://code.wildfiregames.com/D2669
This was SVN commit r23832.
'Hack' melee units had a preference towards Siege units. This made them
awkward to use in some fights.
PreferredClasses is not intended to remove Micro from the player's hand
but to prevent units from attacking unlikely targets (e.g. ships for
land units).
As such, this reworks PreferredClasses so that:
- Ranged & Spearmen/Pikemen (which deal Pierce damage) target Human
units, against which they are reasonably effective.
- Other units target either Human or Siege units with no particular
preference (Unit+!Ship).
This further specifies the preferred classes for all base templates for
easier modification, since extending this list (ordered by priority) is
tricky.
Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2851
This was SVN commit r23831.
This was missing in 62f07098ea.
Based on a patch by: luiko
Also reported by: serveurix
Tested by: Freagarach
Fixes#5750
Differential Revision: https://code.wildfiregames.com/D2172
This was SVN commit r23830.
This is a major buff to their anti-ram capabilities and thus to their
viability in general.
The historical background for this unit is an elite corps of Thracians
under Philip V of Macedon.
Patch by: Nescio
Approved by: borg-, badosu, wraitii
Differential Revision: https://code.wildfiregames.com/D2872
This was SVN commit r23829.
Wonders cost food previously, which is not in line with their look or
other buildings.
Their healing aura is removed to make the slightly easier to capture.
Kushites pyramids are adjusted slightly, and the monumental architecture
tech moved to the CC to match the Persian.
Patch by: Nescio
Accepted By: borg-, Feldfeld
Differential Revision: https://code.wildfiregames.com/D2686
This was SVN commit r23824.
If one mod is not signed or broken in any other way, mod.io downloader
fails and does not display any mod.
The problem with unsigned mod is that its metadata are empty.
That means one cannot break mod io downloader with mods having invalid
data.
mark mod as invalid and display in list as disabled and display reason
instead description to not spam ugly error messages on screen as this is
not error by the game but of the moder
report failed signatures back to list of mods
fail if property is not set using strict mode when getting from js
check in js for undefined values
Allow to filter only valid mods.
Differential Revision: https://code.wildfiregames.com/D2114
Reviewed by: @Itms
Fixes: #5459
This was SVN commit r23821.
Attack strengths for citizen soldiers is increased, making it easier to
capture in the early game.
Hero capture points reduced to align them with their attack multiplier.
Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2847
This was SVN commit r23820.
Techs which enabled training advanced/elite mercenaries directly also
increased the train time of those units.
It is more consistent and more maintainable to increase the train time
in the advanced/elite tech.
This does not affect promoting units since those are not trained.
Also rename and use a consistent order.
Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2865
This was SVN commit r23818.
For those lucky enough to have screens with a high enough resolution to
display
a chosen civilisation's tree in its entirety, the Structure Tree page
now
determines the minimum space necessary to do so, and sizes itself
accordingly.
(e.g. The page no longer scales to fill the entire screen.)
For those on lower resolution screens, the page now takes up slightly
less space
vertically.
This was SVN commit r23813.
Formation were reshaping in cases where they should not (such as when
the controller is waiting on members).
This made them look very odd for some orders.
This also cleans up held positions for formations somewhat.
Also:
- ed54ad3486 fixed units not facing correctly after a formation-walk.
The fix is correct, but we can actually make it slightly more
self-contained by moving everything in `leave`. Also clarify comments.
- This fixes some very broken code in 4ca448a686 in
FORMATIONMEMBER.WALKING.MovementUpdate. It never errored because
formation controllers weren't moved out of the world before.
Reviewed By: Angen
Fixes#5443
Differential Revision: https://code.wildfiregames.com/D2763
This was SVN commit r23806.
As a result, any player that captures an embassy (including Blemmy camp
or Nuba village) can train these mercenaries there, while preventing
them from building structures they shouldn't have access to.
Differential Revision: https://code.wildfiregames.com/D2536
Patch by: @Nescio
Reviewed by: @Angen
Agreed by: @ValihrAnt, @borg-
This was SVN commit r23802.
Lower repeat rate of spear cavalry so it does not look like attacking in
slow motion and lower attack damage as well to compensate speeding up
attack.
Differential Revision: https://code.wildfiregames.com/D1365
Patch by: @temple
Reviewed by: @wraitii, @Angen
Agreed by: @ValihrAnt, @Lionkanzen
Comments by: @badosu
This was SVN commit r23801.
Decrease the health gain to 10%. (20% health + 1 armour);
Increase the crush damage for axemen as well (Previously they only got a
penalty)
Patch by: @borg-
Reviewed by: @Nescio, @Feldfeld, @badosu
Differential Revision: https://code.wildfiregames.com/D2792
This was SVN commit r23800.
Replace two slashes (“/”) with “or” and another with “and” to reduce
ambiguity
Replace “Enter/Return” with “Enter (Return)”
Patch by: @Nescio
Reviewed by: @Gallaecio, @Stan
Differential Revision: https://code.wildfiregames.com/D2570
This was SVN commit r23799.
SpiderMonkey uses UTF16 internally, and only provides APIs for that
encoding, so stop hacking UTF8 strings: properly convert them to and
from UTF16 when passing them through SM.
Patch By: wraitii
Differential Revision: https://code.wildfiregames.com/D2838
This was SVN commit r23795.
Patch By: pcpa and wraitii
Tested By: Nescio, andy5995 and others
Differential Revision: https://code.wildfiregames.com/D2745
This was SVN commit r23794.
This gives Kushites more interesting gameplay options, and is consistant
with other mercenary camps.
Kushite mercenaries lived outside of the core Kushite territory, thus
giving a historical ground to this change.
Accepted by: ValihrAnt, borg-, scythetwirler, Angen, badosu, sundiata
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2534
This was SVN commit r23793.
Introduces axeman parent templates, used to differentiate axemen from
swordsmen
(which they had been "under the hood" up until now), and update entity
templates
and maps where applicable.
Artwork (actors, icons) is not touched here - see D2688 for that.
Patch by: Nescio
Reviewed By: s0600204
Differential Revision: https://code.wildfiregames.com/D1355
This was SVN commit r23780.
Store components when used several times
Check all components for existance when used
Use ProcessCommand instead of injection order directly in unitAI
This was SVN commit r23779.
Changing Grid.h should recompile faster, as it is now included in fewer
TUs.
Differential Revision: https://code.wildfiregames.com/D2784
This was SVN commit r23774.
Upstream spidermonkey supports JSNative error reporting by returning an
explicit failure code. This provides a full stacktrace. Calling
JS_ReportError, removed upstream, removes that stacktrace.
Instead, we should simply LOGERROR.
Based on a patch by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2627
This was SVN commit r23773.
This includes a workaround that should be removed when it is fixed
upstream (LDFLAGS=).
It disables guile support, since we do not need it and it fails to
compile too.
Patch by: Krinkle
Reviewed By: wraitii
Fixes#5729
Differential Revision: https://code.wildfiregames.com/D2716
This was SVN commit r23772.
This lets it support the JSClass syntax, introduced for components in
5fb88172a2/D2492, which required a workaround before.
As cleanup, remove the prefix logic which was too specific to be in
ScriptInterface, and use an upstream-compatible API that also does more
of what we want.
Based on a patch by: elexis
Differential Revision: https://code.wildfiregames.com/D2644
This was SVN commit r23771.
Many were 'pair' technologies, originally removed from the game in
13b229d503.
Patch by: Nescio
Reviewed by: wraitii
Fixes#3800
Differential Revision: https://code.wildfiregames.com/D1775
This was SVN commit r23770.
Range manager has several `std::vector` for fixed-size arrays and 2D
grids. By using proper data structures, the code readability is
improved.
This also moves around the LosVisibility enum.
Comments by: Stan`, nani
Differential Revision: https://code.wildfiregames.com/D2770
This was SVN commit r23769.
We were using ARB shaders in GLSL mode for overlay lines (unit
selection, ranges and so on).
Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2621
This was SVN commit r23765.
Carthaginians currently rely on embassies to be competitive, and
restricting them to 2 is too limiting for balance purposes.
This change also affects Kushites structures which was also approved by
borg- and ValihrAnt.
Further, the original choice of 2 seems to have been to force
Carthaginian players to make a choice, but since one can delete an
existing embassy and pick another, that seems somewhat artificially
restricting.
Patch by: borg-
Approved By: ValihrAnt, PhyZic
Differential Revision: https://code.wildfiregames.com/D2798
This was SVN commit r23764.
Branches introduced in f1610ce4fa had commented part to consider
stonewalls as blocking targets only if there have been siege units in
army.
Commented part was removed in ade8bcc0b8.
Differential Revision: https://code.wildfiregames.com/D2804
This was SVN commit r23760.
Avoid trying to attack unattackable entities based on restricted classes
from Attack component.
Differential Revision: https://code.wildfiregames.com/D2111
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23759.
Match trader footprint with mesh shape for nicer visual effect.
This also removes footprint inconsistency among camels.
Patch by: Nescio
Reviewed by: Angen
Comments by: Feldfeld
Differential Revision: https://code.wildfiregames.com/D2640
This was SVN commit r23758.
Continuation of work on status effects, following 82a5ab6d19.
Allow techs to modify properties.
Enable different behaviour when status effects would stack, such as
extending the duration or stacking the effects.
Fix GUI issue with more than 5 status effects.
Improve tooltips.
Let status effects show a different tooltip for the attacker and the
receiver.
Patch by: Freagarach
Reviewed By: wraitii, Angen (on an older differential).
Differential Revision: https://code.wildfiregames.com/D2296
This was SVN commit r23757.
Before and after the commit we don't support multiple displays and HiDPI
properly.
Patch By: linkmauve
Tested By: Angen, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23754.
Rams are currently evry strong. This nerfs them by reducing their speed
slightly and by preventing them from attacking organic units.
The speed change was agreed by ValihrAnt, the organic restriction is
more experimental and might be reverted in favour of a "reduced damage"
approach (see D2684) if it proves too limiting.
Patch By: borg-
Approved by: wraitii, ValihrAnt (mostly on the speed debuf)
Differential Revision: https://code.wildfiregames.com/D2782
This was SVN commit r23753.
Elephants were designed to prefer targeting structures. This is not
particularly historically accurate, and makes them rather annoying to
use against enemy units, reducing their efficiency.
This simply removes the preferred class, making elephants easier to
handle while keeping their usage as siege units for some civilisations.
Max-range is reduced slightly as the previous one was extremely large
for a melee unit.
Approved by: Nescio, wraitii
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D2786
This was SVN commit r23752.
The HWDetect changes were not working properly.
Reported by: Nescio
Tested by: Nescio
Differential Revision: https://code.wildfiregames.com/D2799
This was SVN commit r23748.
Remove duplication when setting graphic options by reading the configDB
directly.
Properly protect the ModIO config keys.
Approved By: linkmauve
Refs #5538
Differential Revision: https://code.wildfiregames.com/D1931
This was SVN commit r23747.
Remove champions from the fortress. This mimics the Maurian elephant
stable.
Approved By: ValihrAnt, Feldfeld, borg-
Differential Revision: https://code.wildfiregames.com/D2532
This was SVN commit r23746.
Formation controllers were not always waiting on their members correctly
because the "finishedOrder" check was being reset in the wrong place.
This happened particularly with queued orders.
This merges the "finishedOrder" and the "InPosition" logic.
Reported by: elexis
Based on a patch by: Freagarach
Tested by: Freagarach
Reviewed By: Angen
Fixes#3274
Differential Revision: https://code.wildfiregames.com/D2702
This was SVN commit r23744.
423b3cbcaa Moved the message sent that an entity garrisons from
`PerformGarrison` to `Garrison`. However, when an entity is
autogarrisoned from `ProductionQueue` `PerformGarrison` is called thus
not triggering the message. When ejecting the entity from the structure
there is a message sent that the entity is removed, thus allowing for a
negative amount of archers/arrows in `BuildingAI` (see
423b3cbcaa#42654).
Note that `PerformGarrison` was explicitly split in 2102648f7c when
introducing autogarrisoning. It probably has something to do with the
position, since that was split. But I couldn't find any reason why it
cannot be used now.
A side effect of this is that when autogarrisoning an entity with
visible garrison points those will be occupied as well now.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2790
This was SVN commit r23743.
This lets unitAI FSM states correctly handle target entity renaming by
processing a message when that happens. The default behaviour is to
leave-reenter the state, which re-runs sanity checks and optionally
picks a better behaviour.
UnitMotion is still not made aware of entity renaming, as the
leave-enter makes it irrelevant in practice. It still may be a good idea
to implement that someday.
Fixes the concern raised at de1bb8a766.
Fixes#5584
Comments by: bb, Freagarach
Tested by: Freagarach
Reported by: minohaka, bb, Freagarach, gameboy (error in the original
commit)
Differential Revision: https://code.wildfiregames.com/D2735
This was SVN commit r23742.
The wrong components were mocked, but the test did not fail as the
asserts were not called.
Add a check that tests are indeed called here.
Patch by: Freagarach
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D2787
This was SVN commit r23738.
Citizen, Champion and Hero cavalry now have the same 2x walk speed
multiplier.
Speed difference between cavalry type unchanged.
Patch by: Nescio
Approved by: borg-, ValihrAnt, wraitii
Differential Revision: https://code.wildfiregames.com/D2596
This was SVN commit r23737.
Entities should look for a new foundation near the targeted one, not
near themselves, when they cannot proceed with constructing the original
target.
This behaviour matches expectations from players better, since the
entity will go closer to where the player intended.
It also rejoins behaviour when gathering introduced in 7d53fb19a2.
For now, keep looking near the entity too if there are no obvious picks
at the destination, but this could be done only within a certain range
(see D2525).
Comments by: Angen
Differential Revision: https://code.wildfiregames.com/D2753
This was SVN commit r23734.
This moves some resource committing logic from `UnitAI` to
`ResourceGatherer`.
Allows easier modification by modders, and cleaner separation of
concerns.
Check if the carried resources actually changed before sending the
message.
Make all paths through Repair.ConstructionFinished return resources.
Patch by: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2664
This was SVN commit r23733.
This is the same commit as 2abd9cead2 / D1418, fixing noted issues.
This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.
De-activate the obstruction of visibly-garrisoned entities, fixing the
2nd issue.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.
Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.
Based on work by temple
Fixes#2679.
Fixes#5151.
Differential Revision: https://code.wildfiregames.com/D2775
This was SVN commit r23731.
This appears to comply with "This can be changed once all settings
belong to a section." from afecbf02f3 which did not set these hotkeys
under session.
Patch By: Nescio
Differential Revision: D2616
This was SVN commit r23726.
Added in df6fceba62 to (most likely) have some control over brightness,
this conflicted with dimming utilities and would not play nice with
starting 0 A.D. in windowed mode.
If gamma handling were to be reintroduced later, it should only affect
the 0 A.D. window.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1976
This was SVN commit r23722.
PersistMatchSettings are broken by this commit.
Comments By: leper, itms, Stan, vladislav, elexis
Patch By: Nescio
Differential Revision: D1042
This was SVN commit r23719.
While at it remove the cap from the name, according to the art naming
conventions.
Noticed and proposed by Nescio in D1042
Comments by: elexis, stan, vladislav
This was SVN commit r23717.
Before this change, civilisation could train champions in captured
barracks only if captured barracks allowed to train that unit, what was
not always the case so some champions were allowed to be trained in
captured barracks and some was not.
Differential Revision: https://code.wildfiregames.com/D2547
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23715.
Player-testing has revealed QA issues, so reverting these for now.
Differential Revision: https://code.wildfiregames.com/D2773
This was SVN commit r23714.
0363202a20 actually fixed the particular issue of upgrading a long-wall
to a gate by correctly handling it in UnitAI, so this code, which didn't
work, is no longer needed anyways.
Noticed by running units_demo which seems to have skirmish replacer
placeholders.
This was SVN commit r23711.
This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.
Remove the block-movement flag from visibly garrisoned entities.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.
Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.
Based on work by temple
Comments by: Freagarach
Tested by: Nescio
Fixes#2679Fixes#5151
Differential Revision: https://code.wildfiregames.com/D1418
This was SVN commit r23710.
This lets sunit AI FSM states correctly handle target entity renaming by
processing a message when that happens. The default behaviour is to
leave-reenter the state, which re-runs sanity checks and optionally
picks a better behaviour.
UnitMotion is still not made aware of entity renaming, as the
leave-enter makes it irrelevant in practice. It still may be a good idea
to implement that someday.
Fixes the concern raised at de1bb8a766.
Fixes#5584
Comments by: bb, Freagarach
Reported by: minohaka, bb, Freagarach
Differential Revision: https://code.wildfiregames.com/D2735
This was SVN commit r23708.
Change HotkeyPress event to be non-repeating (HotkeyDown to replace the
repeating case)
Fix shiftlag
Make toggle hotkeys only respond to the first SDL event.
Many iterations of review by: elexis
Test done by: Imarok
Comments By: vladislav, Stan
Reviewed By: wraitii
Fixes: #5055
Differential Revision: https://code.wildfiregames.com/D1398
This was SVN commit r23701.
This fixes an off-by-one error that led to entities sometimes getting
stuck against obstructions.
It also increases the max-range of the short pathfinder to help entities
find their way around corridors and house blocks.
Fixes 2ff8614ce2 (off-by-one error) and reverts the range changes from
32e8ed51aa
Reported By: Freagarach
Fixes#5586 . Refs #5624
Differential Revision: https://code.wildfiregames.com/D2754
This was SVN commit r23699.
Since 16b452cf91, it is possible for units to be sent "Attacked"
messages even though they cannot be attacked
(e.g. a non-capturable being the target of a Capture attack effect).
These messages are spurious and should not be sent.
Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D2758
This was SVN commit r23698.
Needs ReviewPublic
Differential Revision: https://code.wildfiregames.com/D2707
Comments by: elexis, Stan, wraitii, bb
Remove variables were not needed to be serialised or stored inside
component
Create `variablesToSerialize` to hold list of variables, that need to be
Serialized.
Rename `this.template.Animations` to `this.template.AnimationVariants`
(and anything related) as it does not hold animation names but names of
animation variants what is misleading.
Do not create timer when deserializing as that would cause oos and timer
already exists.
this.Init has to be called from Deserialize because it is not called by
default
This was SVN commit r23694.
Compare matrix values against `undefined` instead of relying on `||`
because `||` does not work as intended when distance is `0`.
Differential Revision: https://code.wildfiregames.com/D2761Fixes: #5761
This was SVN commit r23693.
Some languages like sk in [[SVN:21907]] have changed crucial line with
information about how many plurals language uses and how to calculate
correct one. However in plural_forms this line could not be matched with
implemented functions so as result object with default settings have
been returned what resulted in using only singular for translatePlural
calls.
Affected languages (12):
sk, lt, uk, cs, pl, ro, mk, he, ga, cy, be, br
I am leaving old variants as they can be useful for another languages.
Differential Revision: https://code.wildfiregames.com/D2751
Comments by: wraitii
This was SVN commit r23690.
Use a suffix for bundled libraries in order to rebuild them when we
patch them, refs #2551.
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2649
This was SVN commit r23686.
Also resolves whitespace issue in WallSet component breaking structree
and rmgen
wallbuilder when wall curve pieces are listed separated with newlines (&
tabs)
instead of single spaces.
Requested by: Nescio
Refs: #2944, D900
This was SVN commit r23684.
.json files in simulation/data/template/helpers/damage_types and
status_effects will be used to internationalise damage types and status
effects, as well as share common text.
Fixes the order of damage types being inconsistent.
Add the possibility for i10n xml extractor to set a custom context.
Fixes#4801
Related to D2296.
Featuring work from: Freagarach
Differential Revision: https://code.wildfiregames.com/D2337
This was SVN commit r23681.
Use a fixed range delta around the missile hit-location for neighboring
entities to damage.
Use a common query for GAIA and non-GAIA entities.
Do not presume attackable entities have Health.
Fix an issue where gaia entities were returned twice.
This fixes concerns reported by elexis at 38b2e37a61 and by Freagarach
at 16b452cf91.
Differential Revision: https://code.wildfiregames.com/D2738
This was SVN commit r23680.
This includes:
- some build fixes
- Jenkins pipelines, in use since January
- a revamped DMG build script, including dmgbuild configuration by Tobbi
and a tweak by norsnor (D2650)
Differential Revision: https://code.wildfiregames.com/D2523
This was SVN commit r23676.
Corrects the name of the Seleucid champion pikeman: “silver shields” is
the name of their corps, they fought as phalangites, thus there is no
need to specify that.
Patch by: @Nescio
Comments by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2736
This was SVN commit r23674.
Fixed hand position on infantry pikeman.
Adjusted Shield position in some howdah.
Replaced Shield cloak on an outdated (to be updated) shield
This was SVN commit r23646.
Use the github mirror instead,
Update from 59.1 to 59.2
Accepted by: @Itms
Patch by: @Krinkle
Differential Revision: https://code.wildfiregames.com/D2717
This was SVN commit r23644.
Differential Revision: https://code.wildfiregames.com/D2162
Patch by: Freagarach
Replace current fleeing order with new fleeing order instead adding new
one on top of current fleeing order, what was causing fleeing unit to
move further away as it should.
This was SVN commit r23637.
Differential Revision: https://code.wildfiregames.com/D2706Fixes: #5712
Correctly check for timer when regeneration rate is affected by
modifications but not capture points.
Move frequently affected values with modifications called by timer to
prototype.
Recompute all cached values affected by modifications when ownership is
transfered.
Recompute cached values before initialising capture points first time
fixing e16c4c4800.
This was SVN commit r23633.
Cleaned some textures using new blender 2.81 Feature Denoiser, while
also replacing material from High poly to low poly baking to Direct
Rendering.
Added some new variants and improved patterns with the help of @Lion and
@Stan.
Both @Stan and i handled the baking of the shields.
Including some animations corrections.
Renamed shields from Basic, Elite, Advanced rank to _## following a
better naming schema on the textures.
*New:
Added aprons (Aspis shield hellenic faction cloaks).
17 new variants, after this committ cleaning of the old aprons will be
done deleting old unuseable dds files and meshes.
Baked using direct render and the new alpha material.
Animated mesh for use with both Hoplite and Swordsman (Relax/Ready
variants)
Let me know if there's any issue.
Will continue adding/cleaning the rest of the aspis in the meantime.
This was SVN commit r23623.
f19a8d6b41 moved sorting classes to template and according to lines 561
and 574 in that commit, it was intended to not use sorting in case of
forced columnar formation.
Fixing oversight at lines 660 and 662 in that commit by removing this.
word so cavalry will be put to the front always.
Noticed in D2707 after @elexis mentioned behaviour change on unused
variable.
Differential Revision: https://code.wildfiregames.com/D2711
This was SVN commit r23613.
Align footprints/obstruction/visual garrison spots/statusbar height with
the visual actors in use.
Gate doors got a little wider (since their visual actors allows that),
so this might help pathing a little.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2502
This was SVN commit r23609.
We don't need exact precision in that kind of calculations. Since we use
not fixed floating point numbers and use them only for visual stuff.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2713
This was SVN commit r23608.
Reduce the number of Position/Anchor entries by setting "pitch" in
template_unit instead
pitch Elephants, traders and some cows
pitch-roll catafalques
The solution is not ideal for catafalques, traders and chariots, since
they consist of different parts that want different values. Probably
needs subunits to fix.
Patch By: Nescio
Differential Revision: D2705
This was SVN commit r23607.
Replaces texture2DLod (deprecated in 1.30, but available in 1.20) by
textureLod and updates the shader version to 1.30. texture2DLod was
added in 113b1c49b9 as the part of FXAA.
Tested By: Imarok, OptimusShepard
Differential Revision: https://code.wildfiregames.com/D2699
This was SVN commit r23606.
Sort keys from g_UnitActions once and store in global variable saving
around 40 microseconds in every tick and mouse event required to
determine action of unit.
Differential Revision: https://code.wildfiregames.com/D2637
Patch by: Freagarach
Reviewed by: Angen
Comments by: elexis
This was SVN commit r23602.
Adjusted mesh of the elephants to match the new howdwah and cushion
variants
Moved howdah and renamed properly to keep the props in a single folder.
Added new turret pikeman animations while attacking melee.
Added Infant elephant animations.
Replaced Hannibal turret mesh with a new howdah with same shields.
This was SVN commit r23597.
Check for existance of requested type in event message, since 6814a983e1
stoped sending resource codes with 0 tribute and that was not even
guaranteed to get before through another options how to trigger tribute
event.
Differential Revision: https://code.wildfiregames.com/D2703
Patch by: Freagarach
Reviewed by: Angen
Comments by: elexis
This was SVN commit r23596.
Use Archer-Fem for female variants because there were two Archer-Relax
variants with different animation sets introduced in d3cc5523ae.
Fix cape attack animation for classic archer variant following
676bc42647, introduced by not updating in 61b8a32ad5.
Differential Revision: https://code.wildfiregames.com/D2701
Reviewed by: Stan
This was SVN commit r23595.
This allows Atlas not to rely on eval() to get access to the attack
component.
Add a quick test for the added method.
This fixes the animation speed matching that of the actor instead of the
template.
Remove some dead code after af2abb8cbfFixes: #5129
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2464
This was SVN commit r23592.
Summary: Having a mouse event and a hotkey for the same hardware key
turned out to be bad. If the mouse is above a gui element that handles
the middle mouse event and the middle mouse is released, this event will
be consumed by the gui handler of this gui element. Therefore the hotkey
handler does not know that the key was released. If we change that
behaviour typing in input fields would trigger hotkeys. So this seems
unsolvable without adding special handling for the middle mouse case,
which would be ugly.
Fixes: #5695
Differential Revision: https://code.wildfiregames.com/D2700
This was SVN commit r23589.
Remove unused variable since e16c4c4800 and call for ranged manager.
Transform comment to javadoc.
var -> let
Differential Revision: https://code.wildfiregames.com/D2631
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23587.
Remove redundant comments.
var -> let
quote object properties
fix intendation
fix some spacing
use javadoc for function description
remove one line brackets
Differential Revision: https://code.wildfiregames.com/D2069
Patch by: Freagarach
Reviewed by: Angen
Comments by: elexis, Nescio, Stan
This was SVN commit r23584.
When a formation that is given the order to attack another formation is
already in range the formation controller of the target is passed as the
target for its members.
Use same behaviour when formation walks into another formation`s range.
Differential Revision: https://code.wildfiregames.com/D2692
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23582.
Remove regression after 34138a7764.
Make ready status message bold as any other system messages are bold.
Differential Revision: https://code.wildfiregames.com/D2663
Reviewed by: elexis
Comments by: nani, Freagarach
This was SVN commit r23581.
This patch sets selection groups for all shared structures in the
generic parent templates of structures.
Clicking behaviour:
single click: select the clicked structure
double click: select all structures of the same selection group within
view that are owned by this player (e.g. all owned barracks across
civilisations)
triple click: select all structures of exactly the same file within view
that are owned by this player (e. g. all owned barracks of the same
civilisation)
Differential Revision: https://code.wildfiregames.com/D2675
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23580.
Remove builder component from worker elephant as it was not able to
place any foundation.
Add aura, that speeds up builder rate for all workers by 25% inside 15
range.
Differential Revision: https://code.wildfiregames.com/D2511
Patch by: Nescio
Reviewed by: Feldfeld
Comments by: elexis, Stan
This was SVN commit r23579.
Due to recent Elephant update for having the blend file of the whole
elephants and have the proper workspace for animating riders it was
updated in a recent commit. However the african forest elephant mesh
wasn't properly adapting to the new UV mapping since it wasn't properly
alligned.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27906-elephant-uv-mapping/&tab=comments#comment-393918
This was SVN commit r23574.
Use `CheckFormationTargetAttackRange` instead `CheckTargetAttackRange`
for formations to not use that ugly workaround with passing `target,
target`.
Use `MoveFormationToTargetAttackRange` to achieve better looking
behaviour when moving formation to target range.
Differential Revision: https://code.wildfiregames.com/D2015
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23571.
Merge selection group for women.
Merge selection group for healers.
Add selection group for merchant ship and fishing ship.
Add selection group for trader and slave as well.
Differential Revision: https://code.wildfiregames.com/D2677
Patch by: Nescio
Reviewed by: Freagarach
This was SVN commit r23570.
Differential Revision: https://code.wildfiregames.com/D2517
Reviewed by: Freagarach
Comments by: elexis, Stan
Fixes: #5610#5656
Introduce likelyFailure check in the movementupdate for chasing state
missing since 32e8ed51aa.
Use new order and substate for Chasing to get into the wanted range and
avoid that way issue with running - walking tracking or animation
variants.
Fixing issue when attacker would not react to the death of the target
while chasing it in stances where results for abandoning chasing are
always false and also do not rely on timer ending chasing for the rest
of stances.
This was SVN commit r23566.
Compared to other occurrences in code base, it makes sense to return
undefined rather then just empty return.
Differential Revision: https://code.wildfiregames.com/D2665
Patch by: Freagarach
This was SVN commit r23563.
Use the opportunity to rename the lib from cppformat to fmt, refs #4148.
Patch By: adrian
Rebased By: s0600204
Differential Revision: https://code.wildfiregames.com/D2613
This was SVN commit r23562.
Structure loot is standardized to 20% of cost.
Loot is provided from resources that were required for constructing.
Exception is field, which costs wood but grants food as loot.
Removed not needed elements.
Related D2605
Differential Revision: https://code.wildfiregames.com/D2659
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23559.
Remove argument passed to timer, which was not used.
Remove 4-th argument passed into SelectAnimation, that takes only 3
arguments.
Differential Revision: https://code.wildfiregames.com/D2679
Patch by: Freagarach
This was SVN commit r23557.
Use tabs for intendation.
Remove trailing zeroes.
Alphabetize modifications, except for damage types and resources, which
have a fixed order (hack, pierce, crush and food, wood, stone, metal,
respectively).
Differential Revision: https://code.wildfiregames.com/D2000
Patch by: Nescio
Reviewed by: Freagarach
Comments by: elexis, Stan
This was SVN commit r23556.
Use the Persian cavalry for pers as well (Currently only used by
Seleucids)
Move the chariot to an unused unit
Fix the specicif names,
Move the icon from sele_ to pers_
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2530
This was SVN commit r23553.
Reduce buildtime of kush_blemmye_camp and kush_nuba_village to 150.
Remove not needed BuildTime element from cart_embassy.
Differential Revision: https://code.wildfiregames.com/D1863
Patch by: Nescio
Reviewed by: Feldfeld
This was SVN commit r23547.
Implement support for experience trickle. Provide 1 experience trickle
when unit is garrisoned in barracks.
Differential Revision: https://code.wildfiregames.com/D1245
Patch by: @temple
Reviewed by: @wraitii
Comments by: mimo, elexis, Freagarach, Stan
This was SVN commit r23541.
Move duplicating code to functions.
Cleaner, nicer, easier to extend.
Differential Revision: https://code.wildfiregames.com/D2655
This was SVN commit r23536.
This is adding support to handle garrisoned entities defined in map
files by game engine and atlas allowing future extension for atlas ui
and solving recreation of entites on init in D1958. Also solving
deepfreeze described in D2562.
Differential Revision; https://code.wildfiregames.com/D2597
Ticket: #3008
Patch by: Freagarach
Comments by: elexis
This was SVN commit r23529.
Fix some of the variant names.
Fix useless AO suffix as already contained in folders see:
wiki:ArtFileNamingConventions
Add some mime types and some EOL properties.
Based on a patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2554
This was SVN commit r23524.
Allow to cancel trade route setup when only origin market is set.
Reported in D2285.
Differential Revision: https://code.wildfiregames.com/D2643
Reviewed by: Freagarach
Reported by: Freagarach
Comments by: elexis
This was SVN commit r23521.
Allow templates to define if friendlyfire is enabled for projectiles.
Differential Revision: https://code.wildfiregames.com/D1973
Patch by: Freagarach
Reviewed by: wraitii, Angen
This was SVN commit r23519.
Check for player being out of bounds after m_TerritoryCellCounts may be
recomputed.
Differential Revision: https://code.wildfiregames.com/D2046
Reviewed by: @Stan
This was SVN commit r23510.
Check for cmpTechnologyManager existence to avoid calling function on
null when upgrading entity requires some technology to be researched.
Differential Revision: https://code.wildfiregames.com/D2632Fixes: #5668
Patch by: @Ampaex
This was SVN commit r23500.
delete not needed variable
var -> let
rename nearby variables to reflect what they are referencing
Differential Revision: https://code.wildfiregames.com/D1940
Comments by: Stan, Polakrity
This was SVN commit r23497.
Fail movement for formationmember when cannot find path to destination
and formationcontroller is not moving so formationmember will enter idle
state or follow next command relying on member stopping movement first.
Introduced in a1dc9cadd8.
Differentail Revision: https://code.wildfiregames.com/D2438
This was SVN commit r23496.
Introduced in d3f57744d9.
There are 2 mane cases when entity cannot play animation.
1st there are not bones
2nd animation is not valid
These conditions are merged into one.
Differential Revision: https://code.wildfiregames.com/D2416
Reviewed by: @Stan
This was SVN commit r23495.
Avoids computing the square of the compared value every call.
Differential Revision: https://code.wildfiregames.com/D2058
Reviewed By: Vladislav
This was SVN commit r23489.
Move call to SetDefaultAnimationVariant to leave function upon leaving
GATHERING state instead for every one substate leave.
Differential Revision: https://code.wildfiregames.com/D2565
This was SVN commit r23474.
Function introduced in 6bc99c47e1, GetRange can return undefined when
required component does not exist. Fixing two oversights, when check is
needed.
Differential Revision: https://code.wildfiregames.com/D2608Fixes: #5666
This was SVN commit r23471.
Do not create range query with no enemies as that triggers warning in
range manager.
This situation occurs when player has no enemies so empty list is
returned.
Fixing CCmpRangeManager: No owners in query for entity 0 warning
refs 38b2e37a61
Differential Revision: https://code.wildfiregames.com/D2601Fixes: #5666
Reviewed by: @Freagarach
This was SVN commit r23467.
I failed to keep tooltip constancy in 9c2e9d7893 done in e381fa393a as I
did not recheck tooltip changes when revisiting D1462 after longer time.
Differential Revision: https://code.wildfiregames.com/D2602
Reviewed by: @Nescio
This was SVN commit r23466.
This patch unifies the different GetRange calls to one function in
UnitAI. Split from D1958 and makes further changes to be done easier at
one place.
Differential Revision: https://code.wildfiregames.com/D2328
Patch by: @Freagarach
This was SVN commit r23465.
Disband formation with less memebers than required.
Do not allow one member in formation.
Show only formations entities actually are allowed to form. (do not show
wedge for infantry)
Differential Revision: https://code.wildfiregames.com/D1462Fixes: #5119
Comments by: elexis, bb, temple, Stan, Freagarach
This was SVN commit r23450.
Update this.repairTarget in UnitAI when target renames.
Transfer builders among renamed entities.
Differential Revision: https://code.wildfiregames.com/D2360
Patch by: @Freagarach
Comments by: Stan, elexis
This was SVN commit r23449.
Status effect can apply modifier to the entity (armour strength, walking
speed, ...)
This is also hiding status effect icons by default in selection detail.
Fixing smaller related bugs.
Differential Revision: https://code.wildfiregames.com/D2281
Patch by: @Freagarach
Comments by: Stan, wraitii
This was SVN commit r23448.
Use the events to fix jittering of the gamesetup slider in
multiplayermode, refs 352d4ea78f/D2571.
Differential Revision: https://code.wildfiregames.com/D2592
Reviewed By: nani
Comments By: Vladislav
This was SVN commit r23435.
Use Math.round until the slider GUI object type supports fixed step
sizes, refs D406.
Differential Revision: https://code.wildfiregames.com/D2571
Comments By: Vladislav (irc), nani (PM), bb (irc), Stan
This was SVN commit r23430.
GetMonitorSize was added in 5b5726ed4d. Its usage wasn't added. We don't
need to have the custom implementation of the function, since SDL2 can
do this. Also it doesn't make sense to get the default monitor size in
multi-monitor environments since the application window might be located
on each of them.
Patch By: linkmauve
This was SVN commit r23426.
We don't need to account #2145 anymore, since we dropped SDL1. SDL2
doesn't have SDL_GetVideoInfo. We might use OpenGL extensions like
GL_ATI_meminfo, GLX_MESA_query_renderer or GL_NVX_gpu_memory_info.
But they aren't spreaded very well. Also VRAM size isn't so useful for
us, since OpenGL driver can swap memory pages when it needs to.
Patch By: linkmauve
This was SVN commit r23425.
→ sets a generic icon (the golden laurel wreath) in
template_unit_hero.xml
→ removes icons from hero templates that used one belonging to another
hero
→ corrects hero icons, generic names, and specific names where necessary
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2582
This was SVN commit r23421.
This establishes a code architecture where only one class and only one
page is responsible per AI setting,
removes the hardcodings from the XML and JS file,
allowing future patches and mods to insert, remove and edit independent
AI settings without having to overwrite the existing code.
Differential Revision: https://code.wildfiregames.com/D2577
See also 0550315161/D2581 and comments linked there.
This was SVN commit r23419.
Some pragma warnings are not more needed for VS2015 compilation this
removes them.
Removing some specific code for older version than VS2015.
Forcing build to fail if compiling with VS older than VS2015.
Differential Revision: https://code.wildfiregames.com/D1396
Reviewed by: @Itms
This was SVN commit r23416.
Split SetupWindow from GameSetupPage class.
Create Gamesetup/Pages subfolder, starting with the existing
GameSetupPage and LoadingPage.
Run the subpage in the same GUI script context instead of separate
pages.
Planned subpages are AIConfigPage (refs D2577), MapBrowser (D1703), hero
selection dialog, civ selection (refs #3987), starting resources,
population capacity (refs #4379, #812...).
This allows:
- subpages to benefit from direct access and reuse of the gamesetup
controlers, (f.e. gameSettingsControl, playerAssignmentsControl,
mapCache, netMessages, ...), deduplication.
- subpages to handle events and control gamesettings even if the
according subpage is closed (for example deleting AIBehavior if there is
no AI assigned).
- to keep gamesettings decoupled, i.e. exactly one class per setting
(for this example avoiding that both GameSetupPage/AIConfigButton and
AIConfigPage/AIBehavior control the AIBehavior setting value.).
Differential Revision: https://code.wildfiregames.com/D2581
Comments By: Vladislav
(http://irclogs.wildfiregames.com/2020-01/2020-01-18-QuakeNet-%230ad-dev.log),
nani (PM)
This was SVN commit r23413.
a8f48ff7e0 introduced XeroXMB lowercasing of element and attribute names
as a feature.
cf9d8b9797, 4d390f501c, dda6268466 added bugfixes and TODOs because of
that.
f76d0ffdc6, 44fe226dd2 removed the XeroXMB lowercase feature.
This patch removes the lowercasing GUI bugfixes that don't fix any bug
anymore while increasing code complexity and lowering performance
(string copies).
Do not send mouse coordinates objects for events that do not relate to
the mouse.
Store event names in static const members to:
(1) improve performance, ensuring that the CStr is not reconstructed
every call,
(2) obtain compile errors when misspelling event names,
(3) allow reuse of the strings in inherited and friend classes.
Differential Revision: https://code.wildfiregames.com/D2445
Comments by Matei, Philip on 2006-03-11-QuakeNet-#wfg-Meeting-0126.log
and 2006-06-24-QuakeNet-#wfg-Meeting-0139.log
This was SVN commit r23403.
If there was a player rejoining, a "start" and a "playerassignments"
message pending for that player, the playerassignments message would not
update the assignments of the session page, but the one of the obsolete
gamesetup_mp page, thus triggering "unknown player" messages for that
player during the session.
This seems to only happen when two players rejoin simultaneously and
with very rare timing / race condition, and thus was not reproducible
without modifying the code.
Issue since b454ccca79.
Differential Revision: https://code.wildfiregames.com/D2559
Should fix#5660.
This was SVN commit r23401.
* Relic count setting didn't work at all, reported by gameboy.
* GameSettingsPanel columnWidth wasn't lowered when using 1024*768,
necessary when all victory conditions are enabled (two columns),
reported by bb.
* Landscape setting didn't work with the random random map, reported by
bb.
* SavegameDetails used an obsolete function name.
This was SVN commit r23398.
This patch is split from D2305. It does the following:
* replace programmer's quotes () in text with proper opening and closing
quotation marks ()
* start sentences with a capital
* →
* remove an incorrect colon ()
* use imperative
Author: Nescio
Reviewed By: Gallaecio, Freagarach
Differential Revision: https://code.wildfiregames.com/D2560
This was SVN commit r23397.
Allow gamesetup options other than biome to determine the map peview
image, refs #4962, 8adc6d8e93.
Add previews for the 12 Unknown, 2 Danubius and 2 Polar Sea variations.
Concludes deduplication of the Unknown (0d0bc32736), Unknown Land
(25682da568) and Unknown Nomad (7f8adcf8cb), refs #4317.
Differential Revision: https://code.wildfiregames.com/D2564
This was SVN commit r23392.
* Decouples settings logically which in turn allows fixing many problems
arising from previous coupling.
* Fixes the persist-match-settings feature, refs #2963, refs #3049.
* Improves performance of the matchsetup by rebuilding GUI objects only
when necessary.
Provides groundwork for:
* UI to control per-player handicap, such as StartingResources,
PopulationCap, StartingTechnologies, DisabledTechnologies,
DisabledTemplates, ..., refs #812.
* Map specific settings (onMapChange event), refs #4838.
* Chat notifications announcing which settings changed, refs D1195,
* Multiple controllers setting up the game (since setting types can
check for permissions in onUpdateGameAttributes without the need for a
new data model or a second gamesetup data network message type), refs
#3806, subsequently dedicated server, refs #3556.
* MapBrowser (MapCache, MapTypes, onUpdateGameAttributes interface),
refs D1703 and D1777,
* Multiplayer saved games (decoupling and setting dependent unique
logic), refs #1088.
Refs
https://wildfiregames.com/forum/index.php?/topic/20787-paid-development-2016/https://wildfiregames.com/forum/index.php?/topic/20789-paid-development-2016/
Enable maps to restrict setting values:
* If a map specifies an AI or Civs for a playerslot, the controller
can't assign a player/other AI or Civ to that slot, refs #3049, #3013.
Fix per player StartingResources, PopulationCap, StartingTechnologies,
DisabledTechnologies, DisabledTemplates following 9177683653, refs #812,
fixes#4504. Use this for DisabledTechnologies on Polar Sea.
Persist user settings for Skirmish maps:
* All user chosen settings are persisted when changing the selected map
or maptype,
except where the selected map overwrites the setting value and
except for Scenario maps which still use the default value where the
map doesn't specify the setting value.
* Tickets relating to that Skirmish mapchange user setting persistance:
- Selecting a map doesn't change the selected civilizations, fixes
#3120 (together with 7cf83f19fd removing map specified Civs).
- Selecting a map type doesn't reset the selected settings, fixes
#5372.
- Selecting a map doesn't change the selected victory conditions,
unless the map specifies those, refs #4661, #3209. (Atlas still writes
VictoryConditions to every map.)
- Consume the player color palette from Skirmish maps, refs 4996d28110
/ #1580. Preserve the selected playercolors when switching the
Skirmish/Random map by chosing the most similar colors if the map comes
with a different palette.
Rated games:
* Hide and disable Rated game setting unless there are exactly two
players, fixes#3950, supersedes D2117.
* Display conspicuous warning if the game is rated, so players are
perfectly aware.
Autostarted games:
* Allow using the gamesetup page to autostart matches with arbitrary
maps, not only this one tutorial, as reported in D194 and 15e2b42525,
refs D11.
Networking:
* Keep gamesetup page open after disconnect, allowing players to read
chat messages indicating why the host stopped the server, fixes#4114.
* The message subscription system allows new and mod settings to run
custom logic on arbitrary setting changes (most importantly on map
change).
This removes hardcoded logic restrictions from the gamesetup option
unification rewrite in b4e5858f6d/D322, refs #3994,
such as the hardcoding of setting references in selectMap to biomes
from f2550705d3/D852 and the difficulty from 9daa7520ef/D1189,
RelicDuration, WonderDuration, LastManStanding, RegicideGarrison,
TriggerScripts, CircularMap, Garrison, DisabledTemplates.
Checkboxes:
* Display values of disabled checkboxes with Yes/No labels, fixes D2349,
reviewed by nani.
Clean g_GameAttributes of invalid values and gamesetup GUI temporaries,
refs #3049, #3883:
* Delete useless values:
- VictoryScripts, because they are redundant with TriggerScripts,
introduced in 8915037631.
- mapType which was written twice to g_GameAttributes following
9177683653
- Description, Keywords, Preview since that doesn't impact simulation
and can be loaded from the MapCache
- mapFilter, mapPath, SupportedBiomes, SupportedTriggerDifficulties
since they are only used in the gamesetup
* Delete conditional values if the condition is not met:
- AIDiff, AIBehavior if there is no AI in that slot
- Nomad and Size if the maptype is not Random
- Biome, TriggerDifficulty if the map doesn't support that
- WonderDuration, RegicideGarrison, RelicCount, RelicDuration if the
according VictoryConditions are not enabled
- LastManStanding if TeamsLocked
- Rating if there are more than 2 players
MapCache:
* Refactor to MapCache class, store maps of all types and use it in the
replaymenu, lobby and session as well.
SettingTabsPanel:
* Remove hardcodings and coupling of the SettingTabsPanel with
biomes/difficulties/chat UI from D1027/ac7b5ce861.
GamesetupPage.xml:
* Restructure the page to use hierarchical object organization
(topPanel, centerPanel, centerLeftPanel, bottomPanel, centerCenterPanel,
centerRightPanel, bottomLeftPanel, bottomRightPanel), allowing to
deduplicate object position margins and size math and ease navigation.
New defaults:
* Check LockedTeams default in multiplayer (not only rated games).
* Persist the rated game setting instead of defaulting to true when
restarting a match, which often lead to unintentional rated games when
rehosting.
* 60 FPS in menus since they are animated
Autocomplete sorting fixed (playernames should be completed first).
Refactoring encompasses the one proposed in Polakrity and bb D1651.
Differential Revision: https://code.wildfiregames.com/D2483
Tested by: nani
Discussed with:
* nani for blackbox testing, code architecture, performance and
MapBrowser in PMs on 2019-12-19, 2019-12-31, 2020-01-06
* Angen for the simulation diff on
http://irclogs.wildfiregames.com/2020-01/2020-01-03-QuakeNet-%230ad-dev.log
* bb on SettingsTabPanel on
http://irclogs.wildfiregames.com/2020-01/2020-01-05-QuakeNet-%230ad-dev.log
* Imarok on data model and revised multi-controller plans for #3806 on
http://irclogs.wildfiregames.com/2020-01/2020-01-07-QuakeNet-%230ad-dev.log
Emojis by: asterix, Imarok, fpre, nani, Krinkle, Stan, Angen, Freagarach
This was SVN commit r23374.
Title case is meant for titles, headers, entity names, classes, keys,
and button captions (see
https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Capitalization ).
In the game options about every entry (two exceptions) in the lists is
capitalized, which is both unnecessary and excessive. This patch removes
title case from the listed items, reserving it for the section headers.
Before: {F1154299}
After: {F1154298}
Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2437
This was SVN commit r23368.
Minor corrections to several tooltips in the pre-game main menu.
Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2428
This was SVN commit r23367.
This patch corrects occurrences of “building” into “structure”.
Whilst “constructing a building” is proper English, it is important to
refer to one and the same thing with a single term, to avoid potential
misunderstandings (see
https://trac.wildfiregames.com/wiki/EnglishStyleGuide ), thence
“building a structure”, because the unit action is “build” and the
entity is a “structure” (see `simulation/templates/`).
Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2429
This was SVN commit r23366.
sys_cursor was introduced in 7e1bcd5159 and partially in 5299dcad86.
Usage of sys_cursor was completely removed in 9a2d0f803e. At the moment
we use SDL and GL cursors.
Patch By: linkmauve
Comments By: Stan
This was SVN commit r23364.
Fixing oversight from e7ab2c9b3f. Switching to columnar formation,
adding or removing formation members does not reset animation variant
passed by last order.
Also adding remaining combat variants for formationwalk.
Differential Revision: https://code.wildfiregames.com/D2556
This was SVN commit r23359.
In 4ca448a686 : Make sure that formation members that end up in
INDIVIDUAL.IDLE go back to FORMATION.IDLE for sanity and for better
housekeeping
Differential Revision: https://code.wildfiregames.com/D2558
This was SVN commit r23357.
The front step or the quick "close-up" the infantry does while attacking
was a guide i've used while animating following the old attacking
animations, however this doesn't feel natural before and neither does
now. This animations follows the same attacking animation whitout
getting closer to attack in order to keep the visual mesh in the root of
the actor or the selection circle.
This avoid unnecesary clipping when attacking buildings.
This was SVN commit r23355.
Reduced shoulders height to make them look more femenine.
Adjusted Female_Dress mesh UV for have a proper Texture alingment in the
lower dress.
This was SVN commit r23354.
Set last carried resource when transforming gatherer as that information
is needed to set correct animation variant.
Missing since 7499b23991 (was still relevant in that time for
"RETURNRESOURCE.APPROACHING")
Differential revision: https://code.wildfiregames.com/D2471
This was SVN commit r23353.
Allows to pass variant name when moving units to formation used by
UnitAi when formation is moving. That variant will be passed as
parameter of order FormationWalk so formationmember can set requested
variant.
This passed variant will be ignored if formation defines own variant
based on position of member.
When none of above is true, that means nor formation nor order defines
variant, member will fallback to default variant in order to show
carried resources if has some what makes it more consistant with
animation variants used in individual state.
Differential Revision: https://code.wildfiregames.com/D2550
This was SVN commit r23352.
moved (four) specific structures
corrected ai file(s) accordingly
corrected appropiate map files (five scenarios and one skirmish)
moved one sound
moved an icon
moved the remaining art files for consistency.
Based on a patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2543
This was SVN commit r23347.
After formation member ends walking, he tries to face target point.
However that eliminates rotation set by SetInPosition from formation
component. Partly fixed in 9d0b4db973 with setting correct rotation in
idle state, but one could still notice that there is glitch when unit
does quick turn to target point and then back. However that solution
would be still required if logic in SetInPosition would not be changed
to always set correct rotation. Another alternative would be to unset
unit at position with every walking order but that would have the same
effect and this is just more performance friendly to not splice member
from position every time.
Notice that information from inPosition is currently not used, so that
change in it is not braking anything.
This was SVN commit r23346.
Add some special maps for the old hellenes/gymnasium.xml actor.
Comments by: @Angen
Based on a patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2208
This was SVN commit r23340.
Change the weapon of gaul infantry swordmen to (Celtic) csword, because
all other Celtic swordsmen (cavalry, champions, heroes, ptol
mercenaries) use it already and the spatha is a Roman cavalry sword;
Change the weapon of athen cavalry swordsmen to falcata
(kopis/makhaira), a chopping sword, because ancient sources (e.g.
Xenophon) emphasize cavalry used that, not a xiphos (similar to gladius
or akinakes), a short stabbing sword, unsuitable for horsemen.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2033
This was SVN commit r23339.
Fixed shadows have fixed rendering distance. Also they don't have a
swimming (blinking) effect on camera movement/rotation.
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2465
This was SVN commit r23333.
Allows to place buildings a bit faster and more perfectly aligned. Also
it helps to find a nearest placeable position in some cases.
Reviewed By: elexis
Comments By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2079
This was SVN commit r23330.
Fix redeclarations of variables
Fix variable shadowing
Remove duplicated cmpPlayer
Move querying of the same components out of loop
Change if (foo.length > 0) to if (foo.length)
Change if (foo == 0) to if(!foo)
Fix remaining var -> let
Remove white space from empty object { } to {}
Restyle more complicated objects
Differential Revision: https://code.wildfiregames.com/D2470
Comments by: elexis, Stan, nani
This was SVN commit r23322.
These two headers were missing in various places, preventing build in
some cases.
Patch By: linkmauve
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2481
This was SVN commit r23321.
Differential Revision: https://code.wildfiregames.com/D2526
Tested on: clang 9.0.1, Jenkins/gcc6, Jenkins/VS2015, Jenkins/macOS
This was SVN commit r23319.
Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and
no_pch parameters in premake5
Visual studio does not more override this logic
Differential Revision: https://code.wildfiregames.com/D1380
Reviewed by: @Itms
This was SVN commit r23314.
Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi,
containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.
The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.
Differential Revision: https://code.wildfiregames.com/D2475
This was SVN commit r23305.
When entity is in "enter" phase of state and it was called SetNextState,
code have to return true in order to abort current state to work
properly ( else return false ).
Differential Revision: https://code.wildfiregames.com/D1943
This was SVN commit r23300.
Cancel packing when next command requires unpacked state and cancel
unpacking when next command requires packed state.
Fixing unit refusing to move because keeps unpacking to attack targets
in range.
Partially Fixes: #4015, #5328
Differential Revision: https://code.wildfiregames.com/D1520
Patch by: @causative
Comments by: elexis, Freagarach, Stan
This was SVN commit r23298.
Display tooltip with disabled action and icon to player with
information, that markets are too close to setup trade route.
Differential Revision: https://code.wildfiregames.com/D2285
Reviewed by: @Freagarach
Comments by: elexis, Stan, Imarok, nani
This was SVN commit r23297.
Overal enhancement of the camel mesh and animations.
New animations for the camel riders allowing for more camel cavalry unit
types (Swordsman, Spearman, Javelinist, Archer, Lancer. Shield and No
Shield Variants).
New death animation.
New idle animations.
Better motion for the running, walking, trotting animation.
New melee attacking animations for the camel.
Improvement of the rein for a more performance friendly actor.
This was SVN commit r23296.
Make comments to start with capital letter and ends with dot.
Remove not needed continue call.
Merge if condition
Differential Revision: https://code.wildfiregames.com/D2001
Reviewed by: @Stan
This was SVN commit r23289.
Problem description:
When unit gets command to move to the range exactly X units from some
point/entity, what means minRange == maxRange, that triggers computing
goal when distance < minRange with result distance(goal, target) >
maxRange, because minRange computation uses clearance even when is
treating target as circle.
Solution:
Do not use clearance when treating target as circle, so computation when
distance < minimum range is done in same way as computation when
distance > maximum range and so computed goal has correct position.
Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/
Differential Revision: https://code.wildfiregames.com/D2512
Tested by: gameboy
This was SVN commit r23283.
* The gamesetup class rewrite in D2483 will enable Skirmish and Random
maps to fix AIs and Civs by specifying them.
Hence remove them from all maps that don't intend to fix them (i.e.
all except Egypt 3v3).
* Remove default values (and the few irrelevant non-default values) so
that the player-chosen settings may be persisted between Skirmish map
selection changes, refs #3120, D2483.
* Remove invalid settings: mapType, AISeed and random map settings
Script, Size, Seed, Nomad, BaseHeight, BaseTerrain, refs b8216a9164,
75c24843b2.
* Remove StartingCamera values since they are useless, refs #4839,
D1098.
* Add the "new" keyword to Atlas Valleys and Vesuvius from c4f530be28,
so they appear in the "new" filter.
* Unhide Barcania (3)
This was SVN commit r23279.
Fixing problem with filters reported in 64bfa089af.
Use filtered version of mods for manipulation in javascript instead non
filtered one.
Fixing following problems when filter is applied:
not enabling selected mod
displaying wrong tooltip
getting out of bounds error when using keyboard arrows to select
next/previous mod
This is also disabling possibility to sort enabled mods manually when
filters are applied. See comment in moveCurrItem for more details.
Differential Revision: https://code.wildfiregames.com/D1944
This was SVN commit r23269.
Move some pickup logic to Approaching state from parent Garrison state
to react to state changes among childrens of Garrison state properly.
Reported by: causative
Patch by: causative, Freagarach
Fixes: #5557
Differential Revision: https://code.wildfiregames.com/D2174
This was SVN commit r23268.
cc1ea7cca0 changed order in which cheer order is given and old orders
copied. That lead to replacing all orders with cheering order.
Patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2358
This was SVN commit r23267.
This code is planned to get refactored or removed anyway, so just do a
cheap workaround.
Reviewed by: Imarok
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D2353
This was SVN commit r23262.
Summary:
This bug was introduced in 62dd922bc0.
Fixed by not using the predicate of the `wait` command.
It was wrong and even if it was right it wouldn't be really usefull.
Reviewed by: Angen
Fixes: #5620
Differential Revision: https://code.wildfiregames.com/D2373
This was SVN commit r23259.
Set formation member rotation to the same angle as formation has when
member stays idle.
Differential Revision: https://code.wildfiregames.com/D2469
This was SVN commit r23248.
Aśoka was listed twice; kept the common English name Ashoka the
Great and removed Ashokavardhan
Acharya was not a Maurya, therefore removed
Bindusara was Chandragupta's son and Aśoka's father, therefore
listed second
Corrected s into sh (ś) where necessary
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2157
This was SVN commit r23245.
According to the `timer_DisplayClientTotals` comment 953d2621dd broke
correctness of `clients` after the function call.
Patch By: echotangoecho
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D812
This was SVN commit r23240.
It removes hardcoded value from Trader.js to templates.
This change allows to have merchant ships among civilisations or one
civilisation itself which would give different bonus when garrisoned
traders.
Supports modifications to that value with technologies and auras.
Differential Revision: https://code.wildfiregames.com/D2106
This was SVN commit r23238.
When observer selects some building he can see possible units to be
trained. Data about that templates are returned with id of observer what
means no technologies or bonuses for selected player have been applied
to the template. So observer does not see correct information in
tooltip.
Differential Revision: https://code.wildfiregames.com/D2054Fixes: #5109
Tested by: Nescio
This was SVN commit r23237.
When unit is idle in formation and promoted, it enters INDIVIDUAL.IDLE
incorrectly.
When unit is moving as part of formation and formation is ordered to
stop, unit enters INDIVIDUAL.IDLE but should keep FORMATIONMEMBER.IDLE.
Differential Revision: https://code.wildfiregames.com/D2468
This was SVN commit r23236.
Petra reached maxed population and started spamming attack requests.
Reported at forum
https://wildfiregames.com/forum/index.php?/topic/27319-ai-chat-spamming/.
Cause of problem was that with given population scaling and current
rounding minimal requested size of units dropped to 0.
What leaded to allow to start without units because minimum count have
been reached.
This change requires at least one unit if minimum size is not 0 before
adjustment by pop scaling , what we need to not block attacks with
heroes or healers for example.
Now in case Petra is not able to produce units, aborts plan correctly.
Differential Revision: https://code.wildfiregames.com/D2462
This was SVN commit r23235.
Formation variants for members are not set correctly once they move
because their ranks changes but variants do not get updated.
This was SVN commit r23233.
As noticed by @bb in
https://code.wildfiregames.com/D1727?id=7276#inline-38148 and found
issue in 4ee4f16793#inline-4563 ComputeMotionParameters is not called
correctly.
One problem is when merging twinformations, addMembers does not update
speed, so if one formation contains slowest unit and it is merged to
formation which does not, merged formation will move faster than it
should, the same problem applies if unit is added calling function from
outside of component.
Another problem is when from formation is removed slowest unit and has
rearrange set to false. Having speed computation after rearrange check
means formation is not going to move faster if slowest member is removed
by player or killed (but it will if player recreates formation manually)
Differential Revision: https://code.wildfiregames.com/D2449
This was SVN commit r23223.
Entities have different sound entries for build and repair orders in
templates but currently only one is used.
This patch is using build order for foundations and repair order for
anything else.
Also playing correctly order_build when placing new construction.
Differential Revision: https://code.wildfiregames.com/D2276Fixes: #5374
Reviewed by: @Freagarach
This was SVN commit r23221.
Use already defined function ReloadWaterNormalTextures with the same
code.
Fixes the TODO from 2d7d5b446d / aab15123f1
Differential Revision: https://code.wildfiregames.com/D2413
Reviewed By: @vladislavbelov
This was SVN commit r23219.
9230c107c5 allows to apply animations on entity which is upgrading. This
is adding progress bar for upgrading entities.
Suggested by @wowgetoffyourcellphone in D2371#101856
Patch by: @Freagarach
Differentail Revision: https://code.wildfiregames.com/D2442
This was SVN commit r23218.
b807c39e6a Introduced a infinite loop in which formation members keep
receiving the order to formation walk to their proper position. This was
due to this.formationOffset is not deleted when member gets in offset
position, what means he recieved motion update and it was not because of
failure.
Patch by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2424
This was SVN commit r23217.
Use the opportunity to fix some whitespace and to make the file name
consistent with Jenkins.
Patch by: Angen
Differential Revision: https://code.wildfiregames.com/D2021
This was SVN commit r23213.
In 32e8ed51aa have been changed message from MotionChanged to
MotionUpdate and CMessageMotionUpdate::FromJSVal was not implemented to
reflect changes in message structure.
As a result UnitMotionFlying tries to send MotionChanged message which
not only was renamed, but sending it from js is not supported anymore.
Also reported at this thread:
https://wildfiregames.com/forum/index.php?/topic/27294-cheats-error/
Differential Revision: https://code.wildfiregames.com/D2450
Tested by: @gameboy
Tested on: Jenkins/vs2015, Jenkins/gcc6
Fixes: #5626
This was SVN commit r23208.
Standarize pers neckguard for work with all cavalry variants.
Fix a wrong variant in persian cavalry archer
Fix a wrong animation in archer variants.
This was SVN commit r23197.
New animations:
New Walking animation.
New Death animation.
New Attacking animation.
New Idle animation.
New Promotion animation.
New riders animations.
Remove unnecesary duplicated files.
Standarize capes for easier usage.
This patch allows horses to use multiple walking animations whitout
duplicating props such hair or blankets.
This was SVN commit r23195.
Replace boost::hash_combine with a lib/hash.h hash_combine performing
the same statement.
Replace inconspicuous global boost hash_value specializations with
std::hash specializations.
No performance difference was observed in three simple MeshManager
measurements.
Remove unused TAG_MASK and h_tag in h_mgr.cpp following 0748c5a75e.
Replace typedef with using keyword and sort header includes.
Differential Revision: https://code.wildfiregames.com/D2441
Tested on: clang 9.0.0, gcc 9.2.0, Jenkins/vs2015, Jenkins/gcc6
This was SVN commit r23191.
Move object type definitions to own file, since CGUI doesn't use the
GUIObject types otherwise and for similarity with GUISettingTypes,
making it slightly easier to maintain and read.
Differential Revision: https://code.wildfiregames.com/D2439
Tested on: clang 9.0.0, Jenkins/vs2015, Jenkins/gcc6
This was SVN commit r23184.
This allows merging community balancing patches without giving them
false or no credit.
Differential Revision: https://code.wildfiregames.com/D2436
Comments By: Stan
This was SVN commit r23182.
Summary: Resources should be referred to as “Resources”, not as “Goods”.
This patch updates the Barter & Trade window to reflect that.
Test Plan: Check for mistakes and omissions.
Reviewers: O8 JS GUI, Gallaecio
Reviewed By: Gallaecio
Subscribers: elexis, Krinkle, bb, O8 JS GUI
Differential Revision: https://code.wildfiregames.com/D2306
This was SVN commit r23177.
Summary:
Single-player is proper English, single player and singleplayer are less
correct.
(Contrary to multiplayer, which doesn't have a hyphen or space.)
Test Plan: Check for mistakes and omissions.
Reviewers: Gallaecio
Reviewed By: Gallaecio
Subscribers: Freagarach, elexis, O8 JS GUI
Differential Revision: https://code.wildfiregames.com/D2312
This was SVN commit r23176.
Game selection details features:
* Display victory conditions following their sending but missing display
following bffe917914, refs 7b0f6f530c.
* Display the host of the match and the game name in the selected game
details following 61261d14fc, refs D1666.
* Display mods if the mods differ (without having to attempt to join the
game prior) following eca956a513.
Performance features:
* Implement batch message processing in the XmppClient to rebuild GUI
objects only once when receiving backlog or returning from a match.
* Implement Game class to cache gamelist, filter and sorting values, as
they rarely change but are accessed often.
* Cache sprintf objects.
Security fixes:
* Add escapeText in lobby/ to avoid players breaking the lobby for every
participant, supersedes D720, comments by bb.
* Do not hide broadcasted unrecognized chat commands that mods used as
leaking private channels, fixes#5615.
Defect fixes:
* Fix XmppClient.cpp storing unused historic message types resulting in
memory waste and unintentional replay of for instance
disconnect/announcements messages following both e8dfde9ba6/D819 and
6bf74902a7/D2265, refs #3306.
* Fix XmppClient.cpp victoryCondition -> victoryConditions gamesetup.js
change from 6d54ab4c1f/D1240.
* Fix leaderboard/profile page cancel hotkey closing the lobby dialog as
well and removes cancel hotkey note from lobby_panels.xml from
960f2d7c31/D817 since the described issue was fixed by f9b529f2fb/D1701.
* Fix lobby playing menu sound in a running game after having closed the
lobby dialog following introduction in 960f2d7c31/D817.
* Fix GUI on nick change by updating g_Username.
* Update profile panel only with data matching the player requested.
Hack erasure:
* Object semantics make it cheap to add state and cache values, storing
literals in properties while removing globals, adding events while
decoupling components and gaining moddability.
* Erase comments and translation comments stating that this would be
IRC!!, supersedes D1136.
* Introduce Status chat message type to supersede "/special" chat
command + "isSpecial" property from bffe917914 (formerly g_specialKey
e6840f5fca) deluxe hack.
* Introduce System chat message type to supersede system errors
disguising as chat from a mock user called "system".
Code cleanups:
* Move code from XML to JS.
* Move size values from JS to XML, especially following 960f2d7c31/D817
and 7752219cef/D1051.
* Rename "user" to "player".
* Fix lobby/ eslint warnings, refs D2261.
* Remove message.nick emptiness check from 0940db3fc0/D835, since
XEP-0045 dictates that it is non-empty.
* Add translated string for deleted subjects.
* Add TODOs for some evident COList issues, refs #5638.
Differential Revision: https://code.wildfiregames.com/D2412
This was SVN commit r23172.
Remove TODO question from c4684effb6 since the class updates correctly.
Differential Revision: https://code.wildfiregames.com/D2419
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015
This was SVN commit r23151.
Add config option to display the loading screen stage description.
Add tip functions for future use, refs D1730.
Harmonize coordinates.
Differential Revision: https://code.wildfiregames.com/D2418
This was SVN commit r23150.
Reset the cursor everytime the GUI page is opened, therefore also when
hotloading.
The init function shall be able to determine a cursor, such as already
present in the loading screen.
Differential Revision: https://code.wildfiregames.com/D2417
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015
This was SVN commit r23149.
Split capes for ranged infantry for avoid unsync while attacking.
Remove unused javelinist variant since theres no difference between
shield and shieldarm.
Several tweaks to jog animations such lowering foots for make it look
more jogging and less running.
This was SVN commit r23141.
Notably enables processing of GuiInterface messages when dialogs are
opened.
Differential Revision: https://code.wildfiregames.com/D2408
Tested on: clang 9.0.0, Jenkins/vs2015
This was SVN commit r23138.
The "chat" simulation command and according GUIInterface notification
became unused which translated simulation chat messages ("aichat") in
7afe0afbca.
That commit also introduced the "aichat" network message parsing code
that is never triggered since the NetClient never creates messages of
that type.
The "debug-print" command introduced by 1c0536bf08 sends a GUI value to
the simulation and prints it to the log, which is already covered by the
JS console since e4fe4ed602.
Differential Revision: https://code.wildfiregames.com/D2407
This was SVN commit r23137.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27118-task-civ-rome-scutum/
Including:
New Roman Republic shields:
Generic: 4
Hastatii: 13
Triarii: 14
Imperial: 4
Marian: 2
Centurion: 1
Praetorian: 1
Itallic Allies: 5
New Scutum Bosses:
7 New Bosses for match the roman equipment.
New feature: Shield Damage Over time; Shield have 3 textures that will
be used while the entity is getting damage.
Adjusments:
Adjusted the roman infantry template to enable the health variant over
shield.
Adjusted the testudo formation animations to match the new shields size
and positions.
Adjusted the base_swordsman variants to avoid cape going out of sync
while walking.
This was SVN commit r23134.
Capes now works as blankets does for horse, capes actors no longer need
to be duplicated in order to work with a different variant actor such
swordsman or spearman, in this case capes gather together all the
availabe variants into a single actor.
Remove unused variants and rename for a better name consistency.
Remove shieldsmall animations from swordsman folder since this no longer
makes a difference on the animations.
This was SVN commit r23124.
10 New Animations:
* 2 Spearman
* 8 Swordsman
6 Adjusted:
* 1 Hoplite
* 5 Swordsman
Actors adjusments:
New variant applied for ptol infantry spearman
Variants assignment for the rest of actors.
This was SVN commit r23122.
Notice TimeNotificationOverlay.xml must be included after
PauseOverlay.xml, otherwise there will be a Z/transparency bug, see
D148.
This was SVN commit r23117.
Decouples events from event handling, removes implicit-pause duplication
per messagebox and allows mods to modify message box values.
Differential Revision: https://code.wildfiregames.com/D2398
Comments By: Stan, Freagarach
This was SVN commit r23114.
Including:
New idles Relaxed (6).
New naming convention following Art_Naming Convention
https://trac.wildfiregames.com/wiki/ArtFileNamingConventions
Also included a fix in the attack hoplite variant.
Renaming _Gaul to _Celt since this animations gonna be used by both
factions (Gaul/Brit)
Added variant for the ptolemaic galatians
This was SVN commit r23106.
Including:
Replace idles Relaxed (7) (Before 8).
New idle Ready (2).
New naming convention following Art_Naming Convention
https://trac.wildfiregames.com/wiki/ArtFileNamingConventions
Also included a fix in the elephantry/turret_idle.xml variant.
This was SVN commit r23101.
The atlas check added in e3f43f6352 works for skirmish maps but not for
random maps generated in Atlas.
The same atlas check added in f2778ea7b4 works for random maps since the
partial information Atlas provides happened to be sufficient for
DiplomacyPlayerText.
Reported by Stan in 6814a983e1.
This was SVN commit r23097.
Rebuild the counters every 250ms instead of every frame and minimize
object creation.
Differential Revision: https://code.wildfiregames.com/D2391
Comments By: Stan
This was SVN commit r23096.
Add class MainMenuPage, BackgroundLayer, remove duplication of XML size
values in the MainMenuItemHandler,
remove onTick assignment from XML, replace references to globals with
local references.
Differential Revision: https://code.wildfiregames.com/D2390
Comments By: Stan
This was SVN commit r23093.
Avoids further session commits that missed to keep options.json session
code in sync,
enables use of anonymous or object owned config callback handlers and
encourages session developers to make the GUI more reactive to changing
options.
Update RangeOverlays when reseting to default, and update
RangeOverlays of selected entities upon closing the page too (not only
hotkey).
Differential Revision: https://code.wildfiregames.com/D2389
This was SVN commit r23091.
Change the logic to only insert/delete buttonhandlers on ownershipchange
and update only the entitystate dependent part on simulation update.
Differential Revision: https://code.wildfiregames.com/D2387
This was SVN commit r23089.
Improves performance if no techs are researched from 200 to 50
microseconds per turn (from 500 to 300 microseconds for one tech etc).
Differential Revision: https://code.wildfiregames.com/D2386
This was SVN commit r23088.
Adapt rating score for exploration score and add comment to keep
calculateExplorationScore and calculateScoreTotal in sync following
be881dc420 (following the formula in a4f27dc3e0 and bffe917914 being
otherwise in sync with the summary screen measures), refs #686.
Adapt rating score for captured entities and add comment to keep
calculateMilitaryScore in sync following f60befe098, refs #3216,
ad27deeb9d.
Adapt rating score for trade and vegetarian food and add comment to keep
calculateEconomyScore in sync following 202e567492/D494 and
215a102c27/D1052, refs #3948.
Remove ceasefire sending from the client from d21c0026ec since the bot
doesn't record it and since ceasefire time is expected to be 0 after a
1v1 was decided, refs #2749.
Resolve column value computation fragmentation and remove unneeded
intermediary object encoding following 1d3ac14d35, refs #686.
Remove hardcoding/duplication of unit and structure classes and send
domesticUnitsTrained too, refs c7a04e219b/D2384.
Move session code including the two globals to a separate folder so as
to maximize separation of and ease distribution without lobby code.
Migrate useless ugly trailing commas from bffe917914, to be removed in a
patch modifying the bot code.
Differential Revision: https://code.wildfiregames.com/D2385
This was SVN commit r23087.
Amongst other issues encountered in the lobby ranking session statistics
reporting, refs #5387, D2385, bffe917914.
Correct test case from 59e7320a49/D1305.
Differential Revision: https://code.wildfiregames.com/D2384
Comments By: Freagarach
This was SVN commit r23086.
Summary: The action is Reload Cache, but the tooltip used to say Rebuild
instead of Reload, which caused some confusion among translators
(https://www.transifex.com/wildfire-games/0ad/translate/#sv/$/113848525),
and hence could have the same effect among users.
Test Plan: No tests, only user-visible strings are affected.
Reviewers: Imarok
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D2294
This was SVN commit r23083.
Summary: This patch lists heroes after champions in structure production
queues and corrects some structure tooltips.
Test Plan: Check for mistakes and omissions.
Reviewers: Gallaecio
Reviewed By: Gallaecio
Subscribers: Freagarach, wraitii
Differential Revision: https://code.wildfiregames.com/D2324
This was SVN commit r23082.
Using 22 classes instead of 1 class (refs 2bcf4f678b/D1928) leverages
more benefit of the paradigm.
In particular it means the checkboxes can own the EntityState and
TimeWarp helpers and the DeveloperOverlay itself can remain independent.
Improve performance by 200 microseconds per turn by unsubscribing from
onSimulationUpdate when the developer overlay is not opened, refs
e3f43f6352 / D2378.
Move TimeWarp from input.js from 8ddef2fee0 to independent class using
hotkey release event from 78bc56f33e, refs #3194.
Differential Revision: https://code.wildfiregames.com/D2383
This was SVN commit r23081.
Add tooltips for buttons that can be triggered with hotkeys.
Unassign menu animation onTick function after the animation finished,
refs 9a00398e24.
Cleans unused openMenu following 5aae5ee55a.
Differential Revision: https://code.wildfiregames.com/D2380
This was SVN commit r23080.
New controller classes: PlayerViewControl, PauseControl,
GameSpeedControl
New viewer classes: ObjectivesDialog, PauseOverlay, FollowPlayer,
TopPanel (BuildLabel, CivIcon, CounterManager, CounterPopulation,
CounterResource refs 7e14a33411/D1113, GameSpeedButton,
ObjectivesDialogButton)
New events: SimulationUpdate, EntitySelectionChange, ViewedPlayerChange,
PreViewedPlayerChangeHandler, PlayerIDChange, PlayersInit,
PlayersFinished, Pause, DiplomacyColorsChange, HotkeyChange, refs #2604
Improves GUI onSimuationUpdate performance without selected entities by
allegedly 30%.
Delete misleading dead code resign command from leaveGame and rename to
endGame. The command is not sent via network (see fa85527baf) nor
processed in simulation, because the Game instance is deleted
immediately thereafter, introduced in fcedcae052, refs a3e1c68b9a,
39ffb0a6bd, 9f796068f8.
Remove explicitResume 0 value from e57c99c6f6 and 8ae67ed15f which
should have been a false if defined, and is equivalent to the default.
Restore fast forwarding option from cd571035bb/D595 for developers
changing the perspective to observer or player following 56308ec1ad.
Add pausing for the delete dialog missing following 7a7ebaa983.
Differential Revision: https://code.wildfiregames.com/D2378
This was SVN commit r23076.
Add a parent variant for the camelry gather variants
Make the camelry use those variants so that they get the custom knife.
Remove the glitching basket for camelry, as its gather_meat and they do
not use it anyway.
Remove the bow while gathering as well. If it should be displayed, it
should either be on the camel, or on the unit shoulder.
This was SVN commit r23070.
The catch had been introduced in 953fb41c82, seemingly to catch the case
PSERROR_Scripting_LoadFile_OpenFailed from 1e40ed1543 which was removed
in 4b1297b328, refs D2363.
The LoadGlobalScript and LoadGlobalScriptFile functions don't throw
these errors unless that JS code calls broken C++ code throwing that.
In that case catching the error and continuing like nothing happened
leads to subsequent segfaults and similarly severe errors caused by C++,
not XML.
Differential Revision: https://code.wildfiregames.com/D2366
Tested on: clang 9.0.0, gcc 9.2.0, Jenkins/vs2015
Accepted By: nani
This was SVN commit r23068.
Delete CGUI::UpdateObjects and don't recreate the entire object
hierarchy by recursing through the existing one each time when inserting
one GUI Object.
Change CGUI::AddObject to only insert the one relevant pointer into the
map hierarchy, return success value and delete the child upon failed
insertion in the caller instead of leaking it.
Defer GUIM_LOAD and UpdateCachedSize recursion until all XML files
linked in the page XML file were loaded.
Delete related ERROR_TYPE NameAmbiguity, ObjectNeedsName, and unrelated
JSOpenFailed and in consistency with the rest, do the LOGERROR in the
scope where the error occurs.
Delete ERROR_TYPE InvalidSetting from 90f6641c1d unused following
85a622b13a, 1a49ccb294, ERROR_TYPE OperationNeedsGUIObject from
90f6641c1d unused following d3e56f0f57, see also e1014aad3b, refs #128.
This was SVN commit r23067.
Includes dilomacy colors, tribute buttons, spy request buttons, attack
request buttons, minimap panel, idle worker button, ceasefire counter.
Differential Revision: https://code.wildfiregames.com/D2365
Use hotkey release event from 78bc56f33e to remove input.js state and
evil global nested closure hackery from cb890ad876, refs #1839, #3194.
Fixes masstribute selecitonchange issue subject of D1191.
This was SVN commit r23065.
Set global hotkeys in JS instead of empty XML objects from
f192d4a2fa/D2260.
Differential Revision: https://code.wildfiregames.com/D2355
This was SVN commit r23062.
Reported by @stan
Change running animation speed to match the movement ingame.
Rotate spear while running for the hoplite/run_relax.dae animation.
This was SVN commit r23051.
Replace std::deque by std::vector
Replace some casts by cpp casts
Move the class and struct declaration to a separate file for clarity.
Fixes db864f10c3 by removing offending function
Refs #5288
Refs D1681
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1682
This was SVN commit r23029.
The name is in accordance with its JS classname, member names and
setting names.
Differential Revision: https://code.wildfiregames.com/D2341
Tested on: clang 8.0.1, Jenkins/vs2015
This was SVN commit r23023.
Remove workaround in 3d07327837 / D2136, the pointer from IGUIObject to
IGUITextOwner that avoided the dynamic_cast.
Have the GUIObject implementing class take responsibility of calling the
virtual methods in the base classes.
Leaves the code in a clean state that can serve as an example for new
GUI object classes, such as D1346, refs #4683.
Differential Revision: https://code.wildfiregames.com/D2325
Comments By: Vladislav on IRC 2019-07-30, 2019-08-22, 2019-09-20-23
Tested on: clang 8.0.1, Jenkins
This was SVN commit r23020.
Use C++11 featured shared_ptr to avoid conditional deletion in multiple
locations.
Drops C compatibility(?) of Loader.h.
Differential Revision: https://code.wildfiregames.com/D2331
Tested on: clang 8.0.1., Jenkins
Comments on IRC #wfg 2005-05-07
Refs 77d3c5d0b5, 5e3b0f06ec, f19d8dafee.
This was SVN commit r23019.
Rename init to RegisterScriptClass.
Differential Revision: https://code.wildfiregames.com/D2339
Tested on: clang 8.0.1., Jenkins/vs2015
This was SVN commit r23018.
- the bonus multiplier would self-multiply with every effect, so an
attack with multiple effect would have a broken multiplier.
- EntitiesNearPoint used IID_Resistance, which is now facultative. To
not miss entities, it now returns all entities owned by enemy players.
For GAIA it checks for Health to avoid returning trees.
This means enemy units have higher priority over missed projectiles, but
that should generally be OK.
This also adds simple tests.
Reported By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2322
This was SVN commit r23012.
Improves performance for Draw calls by 3-5% according to a shady
benchmark.
Improves memory layout, since the values are not on the heap anymore but
in the using class.
Reduces complexity of the implementation and increases type safety.
Allows specifying default values at setting value construction time,
refs D2242.
Inspired by Vladislav introducing members that cached GetSetting values
in c016a74309/D325, refs #4039, ee38f0db37/D763, refs 4225,
a1c4c23ce4/D474, D406, which were formerly proposed to be removed in
D2241.
Differential Revision: https://code.wildfiregames.com/D2313
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins vs2015
Comments By: Vladislav
This was SVN commit r23005.
Remove gui/common/ hack by going through the GUIInterface and fragile
EndGame() hardcoding by saving if and only if a ReplayLogger exists
following 7470e88624, refs #4020.
Refs D2211, D2213.
Differential Revision: https://code.wildfiregames.com/D2197
Based on patch by: irishninja
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22991.
Uses simple event subscription to make the classes independent of each
other.
Removes all globals except two variables and one function (that may be
avoided in the future too).
Allows the reader to focus on the relevant aspect of the implementation
(encapsulation, information hiding) and makes implementation more
modifiable and extensible.
Differential Revision: https://code.wildfiregames.com/D2310
This was SVN commit r22985.
Also in this patch:
- reorder workshop training queue to ram, boltshooters, stonethrowers,
siege towers
- remove all siege units and technologies from all fortresses
- list champions before heroes in the production queues of fortresses
- update tooltips of fortresses accordingly.
Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1761
This was SVN commit r22984.
Following D1881 which introduced a common parent, palisade templates can
be moved:
- other/palisades_rocks_* to structures/palisades_*
- other/palisades_*_spike* to structures/palisades_spike*
Map scripts were updated accordingly.
Patch By: Nescio
Reviewed By: wraitii
Refs #4770
Differential Revision: https://code.wildfiregames.com/D2234
This was SVN commit r22982.
Following d592bf9cb6, paths were computed at the end of turn N, and then
messages were sent at the beginning of turn N+1. However, the path
requests were removed at the end of turn N and so weren't serialised,
and neither were computed paths. This meant rejoiners would OOS when the
game was serialised with pending path results.
To fix this in preparation for threading, the architecture needs to
change slightly so that requests are kept and serialised correctly, and
rejoiners can compute the paths after deserialisation, in order to send
the messages at the beginning of turn N+1.
Fixes#5604
Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2317
This was SVN commit r22979.
Enabled by f69261d37b (refs d412b2010b / D2314, 7bb0f2ea69 / D2318).
Helps structuring the GUI so that AddSetting and GetSetting are in the
same file, which defragments code and may allow for future optimizations
(setting values as class members for Draw calls), refs D2313.
Differential Revision: https://code.wildfiregames.com/D2320
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22975.
Moves the AddSetting sound calls from CButton and CCheckbox to
IGUIButtonBehavior, since the latter is the only class to use them.
Moves ChooseColor from IGUIButtonBehavior to CButton, since that's the
only class to use it and the only class registering the dependent
Settings following b1422137e5 (refs d412b2010b / D2314)
Initialize m_PressedRight in the constructor to prevent undefined
behavior in possible future code following 0d204037b6, refs #1028.
Remove unused soundPath variable following 0e26503cc6 / D2209.
Differential Revision: https://code.wildfiregames.com/D2318
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22969.
D274 introduced a silent change that modifications would only have one
effect per value-path, which was an unnoticed regression.
Detected following the comments from SonarQube reported here:
e16c4c4800#inline-4214
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D2315
This was SVN commit r22967.
Remove the false misleading default.cfg z value that is always
overwritten by CGUI::Xeromyces_ReadObject, both introduced in
e21ebb37f5.
Remove multiline property since its redundant with the default C++
boolean, making the default style more agnostic of final GUI Object
classes.
Close advanced locale dialog correctly upon cancel following 86c151ebaa
/ D1684.
Don't switch the background image when closing the credits dialog
following bcf2c75513, refs #3744.
This was SVN commit r22966.
The commit moved files but did not apply the changes.
Further, this sets eol-style native to these files.
Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D2316
This was SVN commit r22965.
This deletes custom-code and shows how to use this system component for
triggers.
Differential Revision: https://code.wildfiregames.com/D1011
This was SVN commit r22964.
The code could be improved by using more modern code.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2295
This was SVN commit r22963.
Remove question by brian in single_details_area.xml from b66d1716e7
which is answered by "because the style set it".
Delete BuildNameText style, because it specifies ghost="true" in both
style and sole object using the style.
Don't touch progressbar and structree styles, because there is more to
clean.
Differential Revision: https://code.wildfiregames.com/D2292
This was SVN commit r22957.
None of the GUI object types implemented in the past two decades owns
children, only the CGUI page.
Differential Revision: https://code.wildfiregames.com/D2311
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22943.
Merged all the old helmets files including meshes, textures and actors
to another sub folder called "old"
Added a better visual rome gallic helmet as replacement of the one i've
did before.
Replaced thracian helmet on spartan pikeman.
Replaced pers neckguard with one animated working like a cape.
Added the new persian conical helmet.
Added another pilos helmet for the persian cavalry.
Added another crest for the persian pilos helmet.
This was SVN commit r22933.
Before cc1ea7cca0, the promotion code would carry the UnitAI
IsGarrisoned flag, which the Transform helper incorrectly didn't do.
However, this was missed when merging the two code paths.
This fixes an issue for example when units are promoted while atop
walls.
Reported By: faction02
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2303
This was SVN commit r22929.
This way the save dialog gains the sortable list and details section
feature from 10b49f9c18 / D246 by removing a folder of code, refs #4413.
Fixes a style warning about the old dialog using a style for an 'olist'
type for a 'list' type, refs be963ec9b7 / D2232.
Subsequently move the gui/common/ helper file to the page code, meaning
it's not loaded for every GUI page needlessly anymore.
Fix map preview aspect ratio.
Use object-oriented code for the moved savegame code, refs #5387, but
conserve the rest of the code to limit the changes for auditability.
Differential Revision: https://code.wildfiregames.com/D2290
Tested on: Jenkins
This was SVN commit r22923.
Simply pass the JS value to the Save functions instead of letting those
obtain the data later from the topmost GUI page.
The JS hack incidence appears to be unused since 4b1297b328.
Differential Revision: https://code.wildfiregames.com/D2302
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22922.
Don't write XMB files for XML files that failed the validation,
otherwise the XML validation error will not be reported on consecutive
program starts anymore (as the XMB is loaded, skipping validation).
This had resulted in invalid XML going unnoticed and committed in
credentials.xml in 80dbd1f2a3.
Differential Revision: https://code.wildfiregames.com/D1574
Reported by: gameboy
Comments By: bb
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22921.
Avoid redundant map lookups by caching the iterator.
Remove c-style casts by using type specific printf parameters, and
static_cast elsewhere.
Use references while at it, and typedef -> using.
Differential Revision: https://code.wildfiregames.com/D1567
Comments by: Vladislav
Tested on: clang 8.0.1, gcc 9.1.0
This was SVN commit r22916.
Fixed:
Replaced the Phrygian b helmet with b1 following the name schema of the
rest as well as adding 2 variants more of the same.
Added:
Add bronze specular for the bronze helmets.
Added Phrygian B12
Added Thracian B8 and B9
Added Celt Monte Bibele
Added Illyrian Helmets (B1; B2; B3)
Added new face mask's
Reworked:
Reworked Corinthian Helmet B1 and B2 with a more historically accurate
one.
Reworked the helmet's Crest's adding a better visual ones.
Reworked Phryian Face Mask's with better visual ones.
Renamed:
Renamed Apulo roman helmet to Apulo Itallic.
Renamed Phryian b to b1.
Renamed Thracian b to b1.
This was SVN commit r22913.
Following e16c4c4800, the ModifierManager no longer sends
ValueModificationMessages when an entity changes owner to/from
INVALID_ENTITY. This happens in particular when the entity is renamed.
For now, components must check on their own in OwnershipChanged.
Reported By: Freagarach
Patch By: Angen
Reviewed By: wraitii
Fixes#5588
Differential Revision: https://code.wildfiregames.com/D2286
This was SVN commit r22912.
This is a semi-revert of 78bc56f33e and a correct fix for #3194.
The core issue is that the GUI handler must come behore the hotkey
handler, otherwise typing in boxes can set off hotkeys, and the hotkey
handler is repsonsible for updating the hotkey state.
Thus the GUI handler never has an up-to-date hotkey state, since that's
done later. 78bc56f33e fixed that by calling HotkeyInputHandler
manually, but that was still broken in some (unused) cases and was hacky
(indeed, it even looked hacky as noted by elexis).
The simplest fix is to split the 'hotkey creator' handler from the
'hotkey state change' handler, and run the 'hotkey state change handler'
before any other handler. Thus the gui handler remains in front of the
'hotkey creator' handler, but it has a correct hotkey state at any time.
Differential Revision: https://code.wildfiregames.com/D1839
This was SVN commit r22909.
libc and libstd differ on how they parse strings. This has a remote
chance of breaking mods and 0 A.D. code, and it broke tests on MacOS.
Add a workaround to ensure they are consistent.
Comments by: vladislavbelov
Fixes#2780
Differential Revision: https://code.wildfiregames.com/D1988
This was SVN commit r22908.
Summary: This patch corrects two occurrences of -ise into -ize in the
quotes, because US spelling.
Test Plan: Ought to be unproblematic.
Reviewers: Gallaecio
Reviewed By: Gallaecio
Subscribers: Itms, Stan, Freagarach, O8 JS GUI
Differential Revision: https://code.wildfiregames.com/D2246
This was SVN commit r22907.
Summary:
This patch standardizes the tooltips of gather technologies, per
https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Stats
Flavour text strings are moved from the "tooltip" to the "description"
entry.
Test Plan: Check for mistakes and omissions.
Reviewers: Gallaecio
Reviewed By: Gallaecio
Subscribers: Freagarach
Differential Revision: https://code.wildfiregames.com/D2253
This was SVN commit r22906.
Summary:
This patch rephrases the aura descriptions of hero auras to an uniform
standard, to ensure descriptions follow the actual modifications:
[player] [class] [change] [attributes], e.g. "Spearmen +1 capture attack
strength, +25% melee attack damage." instead of "+25% attack and +1
capture for spear soldiers."
See also D1720, D1806, D1807.
The `formation` and `garrison` type aura descriptions are ugly;
improvement suggestions are welcome.
Test Plan: Check for mistakes and omissions.
Reviewers: Gallaecio, Freagarach
Reviewed By: Gallaecio, Freagarach
Subscribers: Freagarach, elexis, Vulcan
Differential Revision: https://code.wildfiregames.com/D1808
This was SVN commit r22905.
Summary:
Another follow-up to D1719 and D1744. This one does the following:
* [font="sans-14"] (default) at the end of the line that used a
different font, rather than at the beginning of the next line (no net
change, but looks better in the file)
* two spaces for indentation of hotkeys (looks better in game)
* ` – ` (space en-dash space) instead of `: ` (colon space) to separate
hotkey and description, for better visibility and consistency.
* `6400px by 4800px` → `6400×4800 pixels`
* removed Alt+W entry (superseded by Alt+Shift+W above)
* inserted Esc entry under save game for completeness
* rephrased several descriptions
Before: {F1014718}
After: {F1014719}
Test Plan: Launch the game and open the manual.
Reviewers: O7 Catchall, Gallaecio, elexis, Itms
Reviewed By: Gallaecio
Subscribers: Freagarach, O8 JS GUI, Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2110
This was SVN commit r22904.
This moves the "async" pathfinding computations to a worker, preparing
the architecture for threading.
Tested By: Kuba386, Stan`
Differential Revision: https://code.wildfiregames.com/D1918
This was SVN commit r22902.
This fixes status effects following 16b452cf91 where the GiveStatus name
change broke them.
This lets status effects deal all types of damage, capture, or inflict
other status effects, like any attack.
This further adds some basic GUI spport to status effects, by showing up
to 5 icons in the top-right of the portrait, and including status
effects in the tooltips.
Status effects can specify a custom icon.
Differential Revision: https://code.wildfiregames.com/D2218
This was SVN commit r22901.
I.e. don't dereference NULL if the user of the glooxwrapper library
reads from the provided room argument.
A step towards being able to use XmppClient with multiple rooms.
Differential Revision: https://code.wildfiregames.com/D2287
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22898.
Make that function static, so that it can be used for these functions
without slowly having to obtain the ScriptInterface instance using
GetScriptInterfaceAndCBData just to get the JSContext again.
Remove few redundant conversions for CreateObject arguments.
Differential Revision: https://code.wildfiregames.com/D2128
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Tedious performance testing in: D2128, D2127
This was SVN commit r22894.
The commit introduced support for arbitrary lobby CreateGUIMessage
JS::Value arguments but didn't transfer wstring_from_utf8 appropriately.
Instead of enlengthening the code by reintroducing utf8_from_wstring
everyhwere, shorten the code and specialize ToJSVal for
glooxwrapper::string and gloox enums.
Avoid string copies for XmppClient getters, refs D1668:
Change GetPresence() and GetRole() to return the pointer to the string
literal instead of copy constructing a std::string each call.
Don't reintroduce the unneeded utf8_from_wstring conversions for the
untranslatable ASCII identifiers returned by GetPresence() and
GetRole().
Change GetSubject() to return a const ref to the member instead of copy
assigning the std::string to an output value.
Change m_Subject to std::wstring to avoid constructing a copy using
wstring_from_utf8 each GetSubject() call.
Change gloox enum to translatable string functions to be static, so as
to use them in the new ToJSVal functions (enabled by not calling
CertificateErrorToString from ConnectionErrorToString anyymore in
92fc34c87c/D2274).
Avoid per-player string copies in m_PlayerMap:
Change m_PlayerMap value type from std::vector<std::string> to a new
PlayerMap struct with named members for readability.
Use gloox enums as PlayerMap values to avoid constructing (performance)
and storing (memory footprint) std::strings.
The JS String is created from the pointer to the ASCII string literal
without intermediaries.
Use glooxwrapper::string for nickname and m_Rating since it's the data
source type received in relevant places, but that might be improved for
performance with std::wstring.
Construct map values in place where possible and post error instead of
silently inserting if an existing value is to be modified.
Avoid repeated std::map lookups on string keys by caching the
PlayerMap::iterator where available.
Remove some glooxwrapper::string to_string() calls redundant with its
operator<< and improve DbgXMPP gloox enum output.
Transfer rating too upon nickchange.
Differential Revision: https://code.wildfiregames.com/D2271
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22891.
Update the list when the data it is built from changes, not only for
presence changes.
Differential Revision: https://code.wildfiregames.com/D2283
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22888.
Perform the freezing for historic messages equally.
Differential Revision: https://code.wildfiregames.com/D2282
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22887.
D1987/99a341f379 introduced logic to predict the target movement, which
fixed unit chasing. However, sometimes fleeing units would then predict
that their target will end up in front of them, so they turned around
towards the attacker.
This is fixed by not anticipating the position when it would cause the
vector towards to target to change direction.
Reported By: Freagarach
Tested By: Freagarach
Fixes#5541
Differential Revision: https://code.wildfiregames.com/D2275
This was SVN commit r22885.
This also allows making the enum to string functions static, refs D2271.
Differential Revision: https://code.wildfiregames.com/D2274
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22880.
This might explain unexpected TLS certificate error strings upon failed
TLS handshake, refs #4705.
Might or might not fix a conditional valgrind conditional jump depending
on uninitialized value error reported in P170 for the XmppClient
constructor (inconsistent test results).
Differential Revision: https://code.wildfiregames.com/D2278
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins
This was SVN commit r22879.
These variables might be used uninitialised in very odd cases that don't
happen in svn.
Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2250
This was SVN commit r22877.
This allows attacks with both capture and damage effects to show both,
and centralises display between regular attack and Splash.
It also reverts a change from e05c8263c5 which incorrectly switched
'Interval' and 'Rate'.
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2138
This was SVN commit r22866.
Local entities being in the destruction queue when serialising is not an
issue since those should not affect the simulation anyways. This stops
the game from crashing in some rare situations.
Fixes#4616
Differential Revision: https://code.wildfiregames.com/D1738
This was SVN commit r22865.
9903fd8a6c introduced a much faster (for a little precision cost)
algorithm to compute distance to shore. However a condition was
incorrectly inverted, which made the algorithm return less-than-sensible
results in many situations.
Further, there was some unused code left behind which is now removed.
Fixes#5580
Reported by: nani (shore bug), elexis (unused code)
Differential Revision: https://code.wildfiregames.com/D2249
This was SVN commit r22862.
It needs to test against the historic role and not the current role,
similar to 8b437a0b1c, refs #3386.
Implements the third GUI message property using the arbitrary lobby GUI
message patch in 9023f4bebb/D2264, refs #4482, 6bf74902a7/D2265.
Differential Revision: https://code.wildfiregames.com/D2266
Tested on: clang 8.0.1
This was SVN commit r22859.
Creates the GUI messages directly as JS::Values and removes the
intermediary rigid struct.
Implementation similar to ScriptInterface::CreateObject from D2080.
Differential Revision: https://code.wildfiregames.com/D2264
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22856.
They were only used to determine whether the playerlist should be
rebuilt, which can be achieved by a boolean member.
So this patch is removing unnecessary indirection from the original
solution in 8b437a0b1c and the reduction in 16b976fc35, refs #3386.
In particular the LobbyClearPresenceUpdates call was ugly and one doesnt
need hundreds of messages with data on it each if one only wants to know
if there was one.
Makes past (e8dfde9ba6) and future (D2264) patches less complex, refs
#4877.
Differential Revision: https://code.wildfiregames.com/D2265
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
This was SVN commit r22855.
Specify menu and submenu buttons title, tooltip, hotkey and actions
comfortably in an extensible JS object and derive the GUI object
settings based on that rather than relying on complex markup alternating
with JS in the same file.
Automatically compute the position and number of submenu items instead
of letting the author manually compute and keep that in sync in various
places of the XML file.
Use object oriented programming, so that there is a strong separation of
concerns, allowing the readers and authors to only involve themselves
with the component relevant to the feature they work on, refs #5387.
Use class keyword instead of prototype keyword for the JS classes,
because that enforces a policy where no globals are inserted between
class members and informs the reader of that as soon as reading the
classes first line, anticipating fragmentation.
Group project information and community links in a more clearly arranged
JS file.
Keep and document splashscreen onTick hack from a684f7646b, #2042,
#5578.
String change: Inform instead of warn (deter) about the state of the
game in the main menu.
Depends on Engine.SetGlobalHotkey from D2260.
Differential Revision: https://code.wildfiregames.com/D2240
Class syntax comments by: Krinkle, bb, Chakakhan, smiley, nani, fpre
Main menu comments by: Krinkle, nani, Stan (and Imarok in D820)
This was SVN commit r22854.
Allows developers and modders to register and unregister hotkeys without
having to specify, change or overwrite XML files.
Also allows implementing the main menu GUI page with only GUI objects
for one submenu, refs #5387 / D2240.
Differential Revision: https://code.wildfiregames.com/D2260
Idea by nani in D2257.
This was SVN commit r22851.
Avoids the CRect copy or stops relying on optimization to avoid the
copy.
Split from D2142.
Differential Revision: https://code.wildfiregames.com/D2259
Tested on: gcc 9.1.0, Jenkins
This was SVN commit r22847.
Allows JS GUI to assign hotkeys to GUI objects from JS instead of XML.
Differential Revision: https://code.wildfiregames.com/D2257
Comments By: nani
Tested By: nani, Jenkins
Tested on: clang, VS2015
This was SVN commit r22845.
Use prototype = Object.create(parent) instead of prototype = new
parent(...) to avoid calling the constructor needlessly (as it is
redundant with the base constructor call in the constructor calls the
parent constructor).
Testfile reference comes from 7c2e9027c2,
"initial terrible AI player scripts" had it since 57e5bb878a,
jubot copied it since 02ed11ac54,
qbot copied it since b146f53d7b
qbot-wc (later aegis) copied it since 45ee419171,
aegis copied it since bcf7115b5c,
petra copied it since 97afd25171.
d23b7deb98 used Object.create correctly for new code in aegis that was
adopted for petra too in 97afd25171.
Differential Revision: https://code.wildfiregames.com/D2238
Patch By: Krinkle
This was SVN commit r22834.
Move updateAutocompleteEntries to g_MiscControls from b4e5858f6d/D322 to
remove a global variable, a global procedure, reduce updateGUIObjects
logic and increase logical grouping.
Rename autoCompleteNick to autoCompleteText since it's not only used for
nicknames following b4e5858f6d.
This was SVN commit r22831.
Inline toggleReady from d1d7afe46c which became a oneline proxy to
setReady in 903803ceec used only in one place.
Inline senderFont and use setStringTags using 3cfb8730a8 from
Freagarachs patch in D2151.
This was SVN commit r22828.
Move rightAlignCancelButton from 565709701e to g_MiscControls from D322
/ b4e5858f6d.
Move civResetButton from 78accf3d97 and teamResetButton from b134047abe
to g_MiscControls, refs #3805.
The constant string and constant function value assignment can be
reverted if performance is valued over code structuring.
This was SVN commit r22827.
Move procedural updateGameDescription and getMapPreview to OOP
g_MiscControls from b4e5858f6d/D322.
Delete unused variable childSize following ac7b5ce861.
Remove host check in launchGame from 1c0536bf08 needless since
d1d7afe46c.
This was SVN commit r22826.
The function was put in an anonymous namespace to avoid linking errors
should another one be defined elsewhere.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2243
This was SVN commit r22825.
Remove Spear class from pikemen templates.
Give Macedonian Gastraphetes Crossbowman class, as it is a special unit.
Give Kushite Clubman the Clubman class, again a special unit.
Make FishingBoat a visible class.
Introduce Bireme, Trireme and Quinquereme visible classes.
Remove Melee class from Maurya Trireme.
Move Organic to template_unit as most units have it, remove it in
appropriate children templates.
List VisibleClasses directly after Classes.
Rename:
- Axe -> Axeman
- Javelin -> Javelinist
- Pike -> Pikeman
- Sling -> Slinger
- Spear -> Spearman
- Sword -> Swordsman
- Catapult -> StoneThrower
Correct other simulation files accordingly.
Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1815
This was SVN commit r22824.
By leveraging custom ordering in std::set, MakeGoalReachable and
FindNearestNavcellInRegions can be optimised and the code simplified.
Differential Revision: https://code.wildfiregames.com/D1882
This was SVN commit r22817.
Units can be stuck in gather states when the target ought to be
collectable from, but it's actually unreachable.
A new FINDINGNEWTARGET intermediate state for GATHER will try and find a
new, different target to collect from. This should generally improve the
behaviour (perfect reachability checks would be required to completely
fix it).
Use this also when the target is knowably unreachable / uncollectible.
Fixes#5529
Differential Revision: https://code.wildfiregames.com/D2120
This was SVN commit r22816.
In some rare cases, units could be stuck in the special state of 3
failed path computations, making them always compute long paths instead
of trying short paths again. This can happen when they compute a long
path successfully, but the unit cannot actually move as it gets
obstructed right away.
Make sure this state is never kept for more than one turn to fix this
problem.
Refs #5569 (probable fix but kept open for further investigating).
Differential Revision: https://code.wildfiregames.com/D2239
This was SVN commit r22815.
Iterating over attack effects incorrectly returned instead of continuing
when the target did not have a receiver.
Polar Sea triggers used Attack instead of Attacking.
Reported By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2235
This was SVN commit r22814.
Modifiers affecting the player entity itself were not applying
correctly.
The reason was that the cache was not correctly reset.
Adds a regression test.
Reported By: Minohaka
Tested By: Minohaka
Refs #5572 (probably fixed but kept open for verifiation).
Differential Revision: https://code.wildfiregames.com/D2236
This was SVN commit r22813.
Mechanical was a union of Siege and Ship and not very used.
The '_mechanical' part of template names was removed in d3a73f0611.
Replace its usage with Ship and/or Siege where relevant.
Reviewed By: wraitii
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2201
This was SVN commit r22810.
Usage of these classes was inconsistent, and CitizenSoldier is a
non-visible class so should not be used in data files.
Reviewed By: wraitii
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2200
This was SVN commit r22809.
The objective of 3362c591f5 to have only one global for multiple AIs is
still achieved by not changing the resulting object structure.
The advantage of not using the pattern is to have less parental scopes,
i.e. more localization and separation of concerns.
This resembles the successful simulation script component system.
The stated benefits of the Augmentation pattern were never used, because
there are (luckily) no such private variables or globals passed as
arguments.
Fixes an ESLint warning about using PETRA before it is defined, refs
#5524, D1993.
Fixes the missing level of indentation if indentation should represent
scoping proportionally.
Remove superfluous, thus misleading name PetraBot in PETRA.PetraBot
assignment.
Differential Revision: https://code.wildfiregames.com/D2103
Patch By: Krinkle
Related comments by: Yves, wraitii, Philip, leper on #0ad-dev on
December 2013, see #2322
Source was:
http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
This was SVN commit r22803.
Remove PSERROR codes from SetSetting (let std::map throw an out_of_range
if a caller wants to Set a setting that doesn't exist without having
checked with SettingExists, equal to GetSetting from 92b6cdfeab).
That also simplifies std::function SetSettingWrap construct from
0a7d0ecdde to void IGUIObject::SettingChanged.
Don't trigger debug_warn or exceptions in GUITooltip::ShowTooltip if the
XML author specified wrong tooltip input, and dodge another
dynamic_cast.
Rename existing IGUIObject::SetSetting to
IGUIObject::SetSettingFromString and comment that it is purposed for
parsing XML files.
Remove SetSetting default value, so that authors are made aware
explicitly of the need to decide the function broadcasting a message,
refs d87057b1c0, 719f2d7967, ...
Change const bool& SkipMessage to const bool SendMessage, so that a
positive value relates to a positive action.
Clean AddSettings whitespace and integer types.
Differential Revision: https://code.wildfiregames.com/D2231
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Comments By: Philip on IRC on 2010-07-24 on GUIUtil being ugly, in case
that one counts
This was SVN commit r22796.
Unify the two IGUIObject::LoadStyle functions and remove CGUI argument
that is always identical to the member.
Differential Revision: https://code.wildfiregames.com/D2232
Tested on: gcc 9.1.0., clang 8.0.1, Jenkins
This was SVN commit r22792.
659a9ea57a introduced the call rightfully in ShowTooltip since
CTooltip::SetupText() depends on the just changed _mousepos setting.
But then 0382cdd9b1 moved that _mousepos SetSetting call, resulting in
the message becoming redundant; and it inserted the second redundant
message in HideTooltip.
These were the only redundant SGUIMessage HandleMessage calls.
This was SVN commit r22790.
1c0536bf08 introduced a disableGraphics bool with a default value and
relied on the default being reasonable except for the few needed cases.
be93b31411 introduced the replayLog argument with a default value and
relied on the default being reasonable except for the few needed cases.
5747619c39 fixed a bug in that commit because the default value hadn't
actually been considered to be correct for all CGame constructor calls
and was wrong for two.
By requiring callers to specify the value, authors are forced to
establish thought which value is the correct one, as opposed to hoping
that a default value will be good by default.
As you can see in the diff, it also makes it easier to compare what
values changed if they are always defined in the caller.
Use CRenderer::IsInitialised() to determine if this is a non-visual
CGame,
for the purpose of removing less transparent proxy functions that are
unneeded as long as there are about 30 other calls testing for
CRenderer::IsInitialised() to determine if the Game should be rendered.
Supersedes:
* CGame constructor argument bool disableGraphics from 1c0536bf08.
* CGame::IsGraphicsDisabled() proxy from a533fff883 to the proxy from
1c0536bf08 and two local nonVisual = args.Has("autostart-nonvisual")
variables in GameSetup.cpp from a533fff883.
Call the Renderer destructor instead of calling delete on the
non-pointer (SAFE_DELETE would not be supported for instance).
Started as a preparation for D2197, but actually independent.
Differential Revision: https://code.wildfiregames.com/D2211
This was SVN commit r22785.
HasSetting from 3dfa23cd25 is actually redundant with
IGUIObject::SettingExists.
GetSettingPointer from 8f4f8e240f is superseded by GetSetting reference
following 3dfa23cd25 and 040624acff.
Deregister copying SetSetting variants for CStr and CStrW following copy
removal in 040624acff.
The default template <typename T=int> from c2a71e41bf can be removed
following FallBackSprite/FallBackColor removal in 9985fcf5bd and
RecurseObject unification in d4d5187c9d.
Delete all unused GUI includes, refs D1478.
Remove GUIUtil friend class following something.
Differential Revision: https://code.wildfiregames.com/D2225
Tested on: gcc 9.1.0, Jenkins
This was SVN commit r22779.
The warning seems to be a false positive and happens with clang but not
gcc.
Differential Revision: https://code.wildfiregames.com/D2223
Reviewed By: Vladislav
This was SVN commit r22777.
Remove duplicated actors from carthaginian civ folder due to redundance
of having twice the same infantry in two folders.
carthaginians/infantry_slinger_e.xml > iberians/infantry_slinger_e.xml
carthaginians/infantry_swordsman_e.xml > gauls/infantry_swordsman_e.xml
Also include a fix for an unsync frame of the idle_ready_shieldsmall.dae
animation.
This was SVN commit r22775.
createDefault returns a new pointer to be deleted, getGMT returned a
pointer to an icu variable not to be deleted.
Differential Revision: https://code.wildfiregames.com/D2220
Reviewed By: Vladislav
This was SVN commit r22773.
The old name was unnecessary long, but also potentially misleading:
stoas are Greek, but not necessary royal, and there are no other stoas
in game. Just “stoa” is clearer, more correct, and more consistent with
other `template_structure_*.xml` names.
Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2036
This was SVN commit r22770.
e16c4c4800 expects player-wide modifications to invalidate entity
caches.
However, this requires the entity to have an owner when calling
ApplyModifiers.
ResourceGatherer caches its gather rates at Init, when entities do now
yet have their correct owner, and thus this fails.
Since OnOwnershipChanged also caches gather rates however, this call is
redundant (and needlessly slow) so it can just be deleted.
Differential Revision: https://code.wildfiregames.com/D2217
This was SVN commit r22768.
The ModifiersManager system component provides an interface to add and
remove modifiers, and get modified stats.
The goal is to merge all the different stat-modifying systems 0 A.D. has
implemented over the years.
This commit makes technologies and auras use ModifiersManager. Some
cheats and AI bonuses also have a similar stat-modifying effect that
have not yet been updated.
Further, this system component makes it possible for e.g. triggers to
easily add modifiers, enabling the writing of Castle Blood Automatic,
RPG or Tower Defense maps without the need for mods or hacks.
The 'Modifier' name was preferred over 'Modification' as it is shorter
and more readable, along with the logic that 'modifiers' store
'modifications' and this stores modifiers. Renaming of other functions
and classes has been left for future work for now.
Internally, this uses a JS data structure. If performance issues arise
with it in the future, this data structure or the whole component could
be moved to C++.
The performance has been tested to be about as fast as the current
implementations (and specifically much faster for global auras with no
icons). Testing showed that sending value modification messages was by
far the slowest part.
Comments by: leper, Stan, elexis
Differential Revision: https://code.wildfiregames.com/D274
This was SVN commit r22767.
Avoids one or two dozen unoptimizable string copies and two CPos copies,
mostly in SetupText.
The reference return allows to mark values as const where the previous
one prevented that.
This also reveals unused variables where the previous code hid them.
Thus use unused variable "buffer_zone" in the otherwise unused (since
b1422137e5, refs 0f807c643a) CCheckBox::SetupText() from b5f6d19332 and
use the unused variable "scrollbar" in CInput GUIM_MOUSE_PRESS_LEFT from
4113aa0a36.
Refs unintentionally copied DrawCall cache due to GetSetting copying in
c19f3608a5, fixed in 8f4f8e240f.
Differential Revision: https://code.wildfiregames.com/D2215
This was SVN commit r22765.
The class didn't leak the m_Wrapped gloox Jingle for this program since
it's not set to owned, and it's not set to owned because gloox deletes
it.
It would have leaked if some other app would have used glooxwrapper with
owned = true, if gloox has a situation for that.
Differential Revision: https://code.wildfiregames.com/D2090
This was SVN commit r22764.
Use references instead of copies for obtaining the font in SetupText().
Differential Revision: https://code.wildfiregames.com/D2214
This was SVN commit r22761.
carthaginians/elephantry_c_r.xml
ptolemies/elephantry_c_r.xml
Also add new variants for the ptolemaic cavalry.
ptolemies/cavalry_spearman_e_r.xml
ptolemies/hero_cavalry_swordsman_ptolemy_IV_r.xml
This was SVN commit r22760.
Stops copying the CStrW each time a sound is played by using the
reference GetSetting variant.
Differential Revision: https://code.wildfiregames.com/D2209
This was SVN commit r22756.
This moves most of what was in the Damage system component to a helper,
and renames that component DelayedDamage.
It also introduces a new global script with all possible attack effects.
Comments Taken From: Freagarach, Stan, bb
Differential Revision: https://code.wildfiregames.com/D2092
This was SVN commit r22754.
Unifies the four copies of the function while making it more versatile.
Supersede the hardcoded GUIRR enum and CheckIfRestricted function with a
flexible member function pointer.
Replace the custom IGUIObject iterator with a casually iterable
GetChildren getter, so that it is more obvious what it iterates on.
Implement TODO from e21ebb37f5, i.e. RecurseObject not iterating over
the base object.
Differential Revision: https://code.wildfiregames.com/D2204
Tested on: gcc 9.1.0, clang 8.0.1, VS2015
This was SVN commit r22744.
Remove the remaining of such checks after d3e56f0f57 removed 21 of them
already.
2c47fbd66a initialized the pointer at construction time rather than at
random conditional events later.
Differential Revision: https://code.wildfiregames.com/D2205
Comments By: Vladislav, wraitii
Tested on: gcc 9.1.0, clang 8.0.1
This was SVN commit r22741.
Following a56c81a79c
front_left_walk.dae Exported all scene instead of the animation and the
mesh.
Note: Committed as two because HTTP Request timeout won't let me
This was SVN commit r22736.
following the next committs:
1 - Animations re-export 9ef5e274c7
2 - Aspis Remake c0b562f79b
3 - Greaves ff8fadcd22
4 - Peltast Remake 5ae660300e
5 - Special formations 95a9ecf99e
6 - Preparation of infantry textures for the use of Greaves ebf907534a
This was SVN commit r22730.
This property is defined as a boolean for every IGUIObject.
If GUIObjects were empowered to make up their own hidden property, then
they should also be empowered to use custom boolean hidden properties
that don't trigger ResetStates.
This was SVN commit r22695.
Avoid color copies for rendering Draw calls in
GUIRenderer::UpdateDrawCallCache, CButton::Draw, CChart::DrawAxes,
CDropDown::Draw, CList::DrawList, COList::DrawList, refs #1984,
8f4f8e240f, 3028551b91, a905fbbc98.
Avoid color copies during XML loading in CGUI::Xeromyces_ReadImage,
CGUI::Xeromyces_ReadEffects, COList::HandleAdditionalChildren.
Add CGUI::HasPreDefinedColor and mark m_PreDefinedColors,
CGUI::GetPreDefinedColor, IGUIButtonBehavior::ChooseColor() as const for
consistency with the other "databases", refs 3028551b91.
Mark CGUIColor as NONCOPYABLE to add compiler errors if there is an
unexplicit copy, refs 3028551b91.
Explicit ugly copy in CGUI::Xeromyces_ReadColor and
CGUIColor::ParseString.
Deregister copying <CGUIColor>GetSetting functions, refs 8f4f8e240f.
Uses the const ref GetSetting from 3dfa23cd25.
This was SVN commit r22694.
- Removed bashisms
- Removed the call to SVN update which is usually done beforehand in CI
- Removed the git alternative which is never used
- Fixed the call to poediff which seems to fail with latest poediff
Tested on Jenkins since the revamp.
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2078
This was SVN commit r22690.
Makes GUI text construction 30x faster for empty strings, otherwise less
than 1% faster.
Split the constructor into smaller helper functions to reduce nesting
and improve readability.
Change m_GeneratedTexts from pointer to reference, so that one doesn't
have to keep track to delete it correctly in several places, without
having to resort to copy or move assignments but constructing in place.
Mark CGUIText as NONCOPYABLE and MOVABLE which is already implicitly the
case due to the CGUISpriteInstance members, refs 0a7d0ecdde/D2133,
D2163/3028551b91.
Differential Revision: https://code.wildfiregames.com/D2168
Prepared by the GUIText.h file split in 838889ab12 / D2167.
Comments By: Vladislav
Tested on: gcc 9, clang 8, VS2015, Jenkins
Inlining tested using: clang -Rpass=inline and gcc -Winline
This was SVN commit r22679.
Fixes an occurring leak indicated by the reported clang unused variable
compiler warning, refs #5294, #5550,
by adding the missing glooxwrapper::Jingle::Session::Session destructor
.
Fix two leaks that would have occurred if the according code had been
used:
Delete unused glooxwrapper::Jingle::ICEUDP::ICEUDP instead of adding the
missing destructor.
Delete unused glooxwrapper::Jingle::Content::Content instead of adding
the missing destructor.
Explain why glooxwrapper::Client::registerStanzaExtension doesn't leak
the new StanzaExtensionWrapper.
Explain why glooxwrapper::Jingle::Session::sessionInitiate doesn't leak
the new gloox::Jingle::Content, nor the new gloox::Jingle::ICEUDP.
Explain why glooxwrapper::SessionManager::registerPlugins doesn't leak
the new gloox::Jingle::Content and new gloox::Jingle::ICEUDP.
Explain why glooxwrapper::SessionManager::createSession doesn't leak the
gloox::Jingle::Session.
I will not leak memory in the glooxwrapper.
I will not leak memory in the glooxwrapper.
I will not leak memory in the glooxwrapper.
Use references in the StunClient and glooxwrapper to anticipate any
confusion as to whose obligation it is to delete variables when they are
passed around across several files.
Use static_cast and reinterpret_cast instead of C-style casts in the
StunClient.
Differential Revision: https://code.wildfiregames.com/D2094
Refs D2093 for the reported leaks.
Reviewed By: Josh
Comments By: fcxSanya, Vladislav for D2094, and echotangoecho, leper in
61261d14fc
This was SVN commit r22678.
Allows coding the GUI without global functions which break
prototype-oriented coding, refs #5322, fixing the concern in 4b1297b328.
Supports stacked message boxes and removes the according workaround.
Change structree / civinfo switch-dialog code from 760a47335d to perform
the callback for page that actually registered the callback.
Ensure the parent that the callbackhandler is always called if the page
is closed.
Merge PopGuiPage and PopGuiPageCB following that choice, incidentally
leaving cleaner code.
Differential Revision: https://code.wildfiregames.com/D1684
Comments by: Yves, Vladislav, wraitii, leper
This was SVN commit r22676.
std::thread crashes when destroyed without being joined or detached.
Joining would wait on the UPnP thread, which can take upwards of 10
seconds, so detach instead.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2181
This was SVN commit r22674.
Silences a GCC 9 warning and the logic was faulty.
Reported by: elexis
Differential Revision: https://code.wildfiregames.com/D2180
This was SVN commit r22670.
Rename close() to closePage() for structree / template viewer / civ info
for global consistency.
Remove a splashscreen proxy and move splashscreen closing from XML to
closePage() in JS.
This was SVN commit r22669.
This reworks wind-speed computation to not use a blurred-heightmap
approach but rather a slightly more wind simulation approach. It fixes
issues near the edges of some maps.
Differential Revision: https://code.wildfiregames.com/D1721
This was SVN commit r22668.
This removes pthread mutexes/threads from:
- vfs
- the resource handler manager
- timer
- the network server.
This allows removing it from our general posix include header.
Differential Revision: https://code.wildfiregames.com/D1920
This was SVN commit r22666.
Instead encourage developers to create a custom GUI page for their
needs, since that is cheap and since they won't be stuck with this
inextensible page.
0da7e822ff reused the manual page to display userfeedback terms.
dfacf5358c moved more values to the calling pages and introduced a Title
string that is never displayed.
da49aa1541 stopped using the manual page to display terms, because one
could actually not reuse the page to do something more than just
displaying text and using one website link.
refs D1684
This was SVN commit r22665.
It is wrong because the predefined colors should be loaded from the GUI
page that requests to have the color parsed, which may be different from
the topmost page.
Similar to FindObjectByName removed in f9b529f2fb.
Achieve this by implementing the CGUISetting<CGUIColor>::FromJSVal
specialization, moved from ScriptInterface::FromJSVal<CGUIColor>,
instead of adding a CGUI pointer to CGUIColor.
Mark ScriptInterface::FromJSVal<GUIColor> and inherited
CColor::ParseString explicitly as deleted, so that people get a compile
error if they forget to check for predefined colors when parsing a
color.
Refs #5387, D1746 > D1684 > this > f9b529f2fb, 9be8a560a9, 415939b59b,
2c47fbd66a, 85a622b13a.
Differential Revision: https://code.wildfiregames.com/D2108
Tested on: clang 8, VS2015
This was SVN commit r22663.
The special/ folder is determined by the TemplateLoader to not store
entities placeable in Atlas.
Differential Revision: https://code.wildfiregames.com/D2083
Patch by: Nescio
Reported by: fatherbushido
This was SVN commit r22657.
than having a stray function in gui/common/ that refers to page specific
names and logic with a try-catch block to shield against reference
errors, refs #3396, 6e80288d30, 25e6136786.
Incidentally fixes ESLint no-empty hint triggered for empty catch
blocks, refs #5524, D2146.
This was SVN commit r22654.
Optimise MakeGoalReachable using global regions, by leveraging the fact
that we can easily know which goal regions we can reach. Particularly
for point-goals, it becomes almost instant.
This does not change hashes.
Differential Revision: https://code.wildfiregames.com/D1835
This was SVN commit r22653.
MapGenerator, TextureConverter, and some other files used pthread.
Differential Revision: https://code.wildfiregames.com/D1917
This was SVN commit r22649.
A call to SelectAnimation("idle") was left over.
Reported by: elexis
Fixes#5552
Differential Revision: https://code.wildfiregames.com/D2169
This was SVN commit r22648.
In eab4f9fdde the `gender`-tag was replaced with `phenotype`. the
checkrefs script however was not updated and complained.
b637fdbae9 introduced a map that checkrefs did not validate.
Based on a patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2141
This was SVN commit r22647.
Improves separation of concerns and makes the code less error prone,
since the IGUIObject classes can't break CGUI private members without
CGUIs help anymore.
This is achieved by making CGUI GetFocusedObject, UpdateObjects public,
by introducing public CGUI GetBaseObject, GetMousePos, GetMouseButtons,
HasStyle, GetStyle getters,
and by removing the pointless IGUIObject GetMousePos proxy.
Delete GetGUI() checks that are either always or never true following
2c47fbd66a.
Use const references instead of copies for some mouse positions.
Differential Revision: https://code.wildfiregames.com/D2166
This was SVN commit r22641.
That is CChartData, CGUIList, CGUISeries, COListColumn, GUITooltip,
SGUIMessage, SSpriteCall, STextCall, SFeedback, IGUISetting,
CGUISetting, GUI, IGUIObject, IGUIScrollBar.
Drop copying GetSetting and SetSetting template functions for CGUIList,
CGUISeries, CClientArea, CGUIString.
Stop copying COListColumn.
Drop copying GUI<CClientArea>::GetSetting call in
IGUIObject::UpdateCachedSize() and four copying
GUI<CGUIString>::GetSetting calls in SetupText() functions.
Delete unused GUIRenderer IGLState class from 849f50a500 obsolete since
1f5b8f1c9a.
Differential Revision: https://code.wildfiregames.com/D2164
This was SVN commit r22638.
Introduce MOVABLE idiom indicating that a class can use move semantics.
Make values of CGUI struct maps holding XML data const to ensure at the
root that the data is not modified.
Use NONCOPYABLE and MOVABLE for SGUIIcon and SGUIStyle to enforce the
non-copy policy on the compiler level (until someone changes the GUI
design to make modifications needed).
As indicated by that:
Replace copy operations by in place move operations for these CGUI
struct maps in the CGUI Xeromyces XML loading functions.
Replace copy operations by const references for CSize and SGUIIcon in
CGUIString::GenerateTextCall and CGUI::GenerateText.
This avoids copying of non primitive members, such as the strings and
containers of strings.
Further related cleanup to be kept separated for auditability.
Differential Revision: https://code.wildfiregames.com/D2163
Few comments on IRC by: wraitii, Itms
Tested on: gcc 9, Jenkins, partially VS2015
Refs #1984,
NONCOPYABLE CGUISpriteInstances: 0a7d0ecdde, 8f4f8e240f, c19f3608a5
NONCOPYABLE Image, Sprite: fb8032043b
NONCOPYABLE GUI page: 94c57085e9
NONCOPYABLE GUIManager: 7c2e9027c2
NONCOPYABLE macro: 16ccae10cd
This was SVN commit r22637.
Summary: Patch by smiley fixing 8585040f27
Test Plan:
Check that is the correct fix.
Measure how badly it affected performance.
Reviewers: O14 Maps, elexis, Stan
Reviewed By: O14 Maps, elexis
Subscribers: smiley
Trac Tickets: #4992
Differential Revision: https://code.wildfiregames.com/D2010
This was SVN commit r22635.
This breaked a SM assertion, which was only caught in debug mode. It
could have led to subtle bugs during the compilation of JS scripts.
Still set the flag to its default value, because SM devs wanted to
change the default in the future.
This was SVN commit r22629.
Add vowel lengths, add and correct some names, expand some hero names.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1999
This was SVN commit r22620.
This removes the trigger for an unidentified VS2015 bug revealed by the
IGUIObject::AddSetting / CGUISetting constructor in 85a622b13a
(unset GUIObject color settings didn't hold the color assigned in the
inherited default constructor, so hovered button text appeared black
instead of white on Windows).
The code in the two commits seems correct, but VS2015 doesn't seem to
implement it correctly (and claims to support C++17) while clang and gcc
behave as intended.
Fix whitespace.
Reported By: gameboy, Angen
Refs
https://wildfiregames.com/forum/index.php?/topic/26694-strange-font-color/
This was SVN commit r22617.
As reported by Freagarach in D2141, when using datatype="tokens" in
children templates, the list of tokens gets expanded instead of
replaced.
This means women randomly switched to male voices.
Patch by: Freagarach
This was SVN commit r22611.
This moves the renderer options into their own class to:@
- allow one to only include the rendering options, not the whole
renderer header, when one wants access to rendering options.
- centralise rendering changes and their side-effects.
- clean up code.
Tested by: historic_bruno, Freagarach
Commented by: historic_bruno
Differential Revision: https://code.wildfiregames.com/D1929
This was SVN commit r22610.
Use the "pretend correct path" behaviour for short goals too. This is a
fix for #5545, since the position check now works correctly without
needing to add a tricky check for path-vs-path distance.
Simplify HandleObstructedMove to use ComputePathToGoal more. This means
we occasionally compute a long path when stuck, which fixes two cases of
stuck units reported in #5547.
Move some common calls into functions for convenience.
Make sure the short-path-waypoint-range-relaxing introduced in
32e8ed51aa doesn't happen for the last waypoint, which caused units to
occasionally never get in range of the last waypoint.
Clear short path waypoints when computing a long path.
This won't fix all instances of unit dancing, but it should improve most
of them.
Fixes#5545, Fixes#5547
Differential Revision: https://code.wildfiregames.com/D2135
This was SVN commit r22609.
Use std::thread and thread_local instead of pthread specific calls.
Differential Revision: https://code.wildfiregames.com/D1916
This was SVN commit r22608.
Since ead8436b3d, the sides of tree leaves are extremely bright. The
reason is that they overwrite the value of the depth buffer, and thus
they show the skybox in the water calculation.
The simplest fix for this is to show the skybox only at lower
transparency values. A better fix would require handling alpha blending
completely differently.
Refs #5125.
Differential Revision: https://code.wildfiregames.com/D2143
This was SVN commit r22607.
The function was located in the wrong file, because it is not logically
related to IGUIObject settings.
The separate file allows the various users to include it without
including the GUIRenderer.
This was SVN commit r22605.
This means the type information is available for all methods operating
with the setting type, which is easier for the authors, allows for
compile-time checks and optimizations.
Remove the enum that was used to indirectly obtain the setting type at
runtime.
Revises SGUISetting and enum from e326ebae46 (5122b0f906),
std::function from 82f1d2718b.
Differential Revision: https://code.wildfiregames.com/D2145
Tested on: gcc, clang, VS2015, Jenkins
This was SVN commit r22604.
Revise 53b335f5ae in CInput::UpdateBufferPositionSetting to use the
SkipMessage argument from 4113aa0a36 to prevent the infinite loop
instead of hijacking the pointer.
This was SVN commit r22603.
Retract IGUIObject override keyword from that commit, because clang
recommends to use it for either every or no overriding class member
(which then should be done consistently for all classes inheriting
IGUIObject, refs D2144).
This was SVN commit r22602.
Better texture for brit_battersea shield
Fix celtic shield bosses using 3rd texture variant instead of 1st
Added brass and golden variant for shields props 02 and 03
replaced gold texture with 03 texture variant for have less texture
files.
This was SVN commit r22600.
JSI_IGUIObject should not contain functions that work only for some GUI
Object types, refs #5442.
Deduplicate the shuffled copy of CText::SetupText.
Avoid the 80 times slower dynamic_cast mandated by the virtual class
inheritance by adding an ugly overridable pointer to the base class
pointing at this derived classes, as bargained with Vladislav and
proposed by wraitii in D1781 id=8426.
This may be improved by refactoring the IGUIObject and JSInterface
classes to use templates and / or eliminating its virtual inheritance.
Implement and use FromJSVal / ToJSVal CSize specialization.
Remove the JS::CallArgsFromVp call.
Differential Revision: https://code.wildfiregames.com/D2136
Comments By: wraitii, Vladislav
This was SVN commit r22596.
Remove the comment from 53bcba3368 that allures the reader to believe
there is a memory leak which is not and has not been the case, refs
D1700.
Remove the useless JSAutoRequest from GetJSObject if the object was
constructed already (performance improvement), following cx assignment
in 4b1297b328, following JSAutoRequest addition in e9e05f4efc (that also
had removed other useles JSAutoRequest calls but not this one).
Don't change JS::PersistentRooted to JS::Heap until SpiderMonkey is
updated, refs D1700.
Provide access to GUI, ScriptHandlers and JSObject for inheriting
classes.
This was SVN commit r22593.
Reported by Jenkins, but not gcc, clang, VS2015.
Take the opportunity following 2c47fbd66a to make the CGUI pointer held
by IGUIObject constant (the address, not the value).
Differential Revision: https://code.wildfiregames.com/D2139
This was SVN commit r22589.
Call JS_AddExtraGCRootsTracer and JS_RemoveExtraGCRootsTracer depending
on JS::Heap use instead of on CGUI page link setup.
GUIObjects should be able to access the GUI page independent of the
scripting (for example to obtain PredefinedColors, refs D2108).
Refs: D2108, c02a7e1a7b
Comments By: wraitii
This was SVN commit r22587.
A random phenotype can be chosen by giving multiple tokens to the
template.
This allows giving different looks to the same template.
Comments By: stan, vladislav, elexis
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1955
This was SVN commit r22586.
Mentioned by @elexis
Also fix traders two_wheel carts from staying static while dead.
(temporary fix until i place an animation for death in the
two/four_wheel_cart.
This was SVN commit r22583.
Remove mask from boeotian helmets B3/B4
Remove hele_su3 from macedonians/infantry_javelinist_e.xml.
Add missing checkguard from hele_phrygian_bronze.png
(following 0257f1ca79)
This was SVN commit r22581.
This fixes units always using capture attack on a building, since
rp22569 forgot to eliminate Capture from the attack types when not
allowed.
Reported by: minohaka
Patch by: Freagarach
Reviewed by: wraitii
Fixes#5544
Differential Revision: https://code.wildfiregames.com/D2134
This was SVN commit r22575.
Make CGUISpriteInstance non-copyable to further harden Philips
protection from 8f4f8e240f against unintentional copies of its DrawCall
cache such as in c19f3608a5.
Remove its copy constructor from 849f50a500, make it movable, and until
it becomes otherwise necessary, force move assignment when sprites are
assigned.
Improves the fixes of the compiler warnings about deprecated implicit
copy constructors in 8a32b0b3d4 by avoiding the copies instead of
copying explicitly.
Add ToJSVal, FromJSVal for CGUISprinteInstance to make
JSI_IGUIObject::getProperty and setProperty more consistent.
Rename Sprite operator= to SetName to reduce ambiguity.
Pass CRect by reference in CGUISpriteInstance::Draw.
Differential Revision: https://code.wildfiregames.com/D2133
Comments By: wraitii
This was SVN commit r22570.
BeginPathing renamed to ComputePathToGoal, as that is what this function
does.
IsMoving renamed to IsMoveRequested, as the function returns true when
the unit has a move request going on, not when it is actually moving
across the map, which was misleading.
UpdateMovementState's implementation moved closer to where it is used.
PathIsShort and WAYPOINT_ADVANCE_MAX are currently unused, thus deleted.
Differential Revision: https://code.wildfiregames.com/D2067
This was SVN commit r22568.
Fixes for 5568bd4c16:
- units could occasionally ignore range checks when attacking.
- attacking a formation wouldn't pick new targets correctly.
While testing, I also think the walk then walk and fight behaviour
should be changed to just walk and fight or units might just run towards
enemies and not attack them, which looks rather odd.
Reported By: Angen
Fixes#5530
Differential Revision: https://code.wildfiregames.com/D2119
This was SVN commit r22567.
This helps with #3144 and units not going idle when ordered to clump
together.
By rejecting paths that would not take the unit closer to the goal than
it is, we can avoid the case where a unit at A finds a short path to B,
goes there, gets stuck, finds a new short path to A, etc. ad infinitum.
It doesn't completely fix the problem since two units moving might still
occasionally become stuck against one another, but it makes it rarer
(unit pushing would probably finish solving this).
This assumes that being as close as possible to the goal is the best
behaviour when trying to move somewhere, even when it is unreachable.
Refs #3144
Differential Revision: https://code.wildfiregames.com/D2075
This was SVN commit r22566.
This improves hunting behaviour, as targets may still be in FOW on the
second try, and the unit would go idle - instead it'll now gather near
position, which is more likely to find a proper resource.
Differential Revision: https://code.wildfiregames.com/D2071
This was SVN commit r22565.
Delete GetSetting/SetSetting variants that operate on a GUI page other
than the one that the setting is defined in; introduced in c2a71e41bf,
obsolete since f0d9806b3f.
Delete CInternalCGUIAccessorBase::GetObjectPointer as these variants
were the only caller for that.
Delete CInternalCGUIAccessorBase::HandleMessage from a08cbd2f74 as it's
an unnecessary proxy.
Delete CInternalCGUIAccessorBase::QueryResetting from 953f72a91c by
making ResetStates public, equal to UpdateCachedSize from 90bbd48a14
(public required for VS2015 but not gcc 9).
Move ResetStates to implementation file.
Tested on: gcc 9, VS2015
This was SVN commit r22563.
JS_ReportError was passed a CStr, which it doesn't support.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2131
This was SVN commit r22561.
The type differs from the Color type, because contrary to Color, it can
be created from a color predefined in the GUI page (such as "yellow").
Move this predefined color check to the new class instead of hardcoding
it in FromJSVal / ToJSVal, GUIUtil, JSInterface_IGUIObject and to
straighten the latter.
Delete fov_wedge_color from Minimap, unused since introduction in
5275dc862b.
This was SVN commit r22558.
Move EAlign and EVAlign JS<->C++ conversions to FromJSVal and ToJSVal
for consistency.
Remove alternative / british spelling "centre".
Use i32 instead of int since at least and at most 32 bits are intended
there, refs 1e07787e76.
This was SVN commit r22556.
Following 3a839517ce, SparseGrid::Reset() replaces the value of m_Data
(a C-style dynamically sized array) with a new value-initialised array,
by using the new operator. Previous code simply did a memset.
This means that when m_Data was not null, it leaked memory as the
previous array was not deleted.
SparseGrid::Reset is called when destroying the sparse grid, and a
SparseGrid is used by the long pathfinder when computing JPS paths. As
that is called rather often, it resulted in a relatively serious memory
leak that could make very long games use several GB of memory.
This fixes the leak by using placement new, which re-uses the memory,
effectively doing the same as the previously existing memset.
Profiling by historic_bruno and elexis showed that performance from
value-initialising with placement new was at worst similar to memset,
and testing shows this was compiled in a memset call in several cases
anyways.
Reviewed By: elexis
Fixes#5522
Differential Revision: https://code.wildfiregames.com/D2121
This was SVN commit r22545.
- ca9109be75 moved SwapBuffers inside Render - this makes Atlas call it
twice in a row which might behave oddly (did not seem to though) and
anyways was wasteful.
- ca9109be75 moved IdleTask from the sound manager outside of Render.
This means atlas never called IdleTask, and this broke sounds after a
few seconds.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2029
This was SVN commit r22544.
When units are hunting, they push an attacking order in front.
That attacking order keeps track of the target's last known position to
efficiently hunt. However, if the unit goes out of LOS,
ShouldAbandonChase triggers and the unit goes back to the gather order -
which hby then as a hopelessly out of date "LastPos".
By updating the LastPos of the gather order as well, Gather can recover
efficiently.
Differential Revision: https://code.wildfiregames.com/D2072
This was SVN commit r22543.
Consistently warn instead of using implicit conversion when not passing
a boolean, for consistency and callers being more cautious with passed
values.
This was SVN commit r22538.
* JSI_GUIColor::construct and JSI_IGUIObject::setProperty hunk are
duplicates of FromJSVal, getProperty of ToJSVal, following 7c2e9027c2.
* The constructor, it's fallback magenta and toString have never been
used by JS.
* A JS color class providing some methods (such as found in color.js,
refs #5387, and the unused toString redundant with rgbToGuiColor, see
also eee8217b45) is more inviting to changes and maintenance if defined
in JS and can still be instantiated in C++, like the Vector2D (see also
65b02395b3).
* PredefinedColors (such as "red" or "green") can be obtained from the
prototype without defining the class in C++.
* Minimize ugliness by removing macrosity, refs 8ceb41212d.
Rename alpha to a in guiToRgbColor from eee8217b45 for consistency with
the C++ conversions (opaqueness had been skipped in the only callers of
this JS function yet).
Delete unused GUISTDTYPE Mouse in header forgotton in 8734efca94.
This was SVN commit r22534.
This fixes a regression introduced by 055c848c1a: when an entity is
ordered to move to a target within short path distance (or direct path
distance), it no longer computed at least one long path, which meant it
could be stuck forever if the target was not actually reachable (such as
behind a wall).
To fix this, compute a long path after 3 failed computations, which
should result in a delay of 1-3 turns. The previous code did this after
1 failed try - the decision to make it 3 is mostly based on the idea
that in most cases, being stuck means we ran into units, not that we
were ordered somewhere close. Should there be complaints, it could be
lowered to 2 or 1.
This fixes a second issue, reported in #4473: units sometimes get stuck,
particularly when trying to garrison a turret from 'inside' the walls.
The issue is that the turret is not accessible via the inside as its
obstruction + garrison range is blocked by the surrounding walls.
However, as introduced by 6e05a00929, TryGoingStraightToTargetEntity
ignores all entities with the obstruction group of the target (the
reason for this being that otherwise it would never succeed, since the
line towards the target would likely go through the target).
For walls and formations, this means ignoring possibly too many
entities, and in the case of #4473, ignoring wall pieces. The unit thus
mistakenly thought it could direct-path to the turret, and got stuck.
To fix this, we can ignore specifically the targeted entity's
obstruction tag. This can be considered a fix to 6e05a00929.
temple accepted an earlier version of this patch (specifically elexis'
version).
Fixes#4473
Based on a patch by: elexis
Differential Revision: https://code.wildfiregames.com/D1424
This was SVN commit r22533.
The constructor is invalid, because one cannot create or obtain and pass
an IGUIObject C++ class instance pointer via JS, only triggering a crash
when doing something with it.
If there was a use case, the GUIObject should be created with a
GUIObject type specific constructor.
Remove obsolete getProperty comments.
From D1699, refs #5369 and wraitiis equivalent:
Differential Revision: https://code.wildfiregames.com/D1933
This was SVN commit r22530.
725aa8a686 introduced a DamageTypes.js global script similar to the
resources one. However, we never actually need to refer to this script
since we can always use the damage types provided by the
template/context/object we are looping over/...
There is one exception to this for AI weighting of damage types.
However, since damage types are not stored in files, this is strictly
equivalent to hardcoding them in the global script and was deemed
acceptable.
Patch By: freagarach
Reviewed By: wraitii
Refs #4801 (by invalidating it for now, though such helper files might
be useful in the future if damage types require more metadata).
Differential Revision: https://code.wildfiregames.com/D1938
This was SVN commit r22527.
As reported by #5521, Ordering units to walk to a point in a forest can
lag terribly, as units will end up computing long short paths in the
forest, which can result in `ComputeShortPath` calls that individually
take upwards of 80ms.
This can be alleviated by allowing units to stop a bit earlier. A23
handled this in UnitMotion directly, but it's better to handle this in
UnitAI to avoid surprises and to make it customisable on a per-state
level.
This diff further speeds up using the short pathfinder by starting with
a smaller search range, limiting the max-range more and moving the range
slightly towards the goal.
This also refactors UM sending messages to UnitAI so that we may in the
future push more information (in particular, the entity_id that a unit
was obstructed by could be interesting for COMBAT).
This doesn't fix the possibility of lag, but it reduces its occurrence
to levels that should be similar to A23 and thus acceptable enough.
Tested By: Freagarach
Fixes#5521
Differential Revision: https://code.wildfiregames.com/D2105
This was SVN commit r22526.
Removes a few non-behavioral workarounds for older versions.
Refs #5502, #2891.
Accepted By: asterix
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2076
This was SVN commit r22508.
Units right now try going to their next long waypoint using the
short-range pathfinder. This works, but it tends to leads to units
clumping together when shuttling for example.
By switching to short paths earlier, and by scrapping the long waypoints
when doing so, we can make movement more natural until we have unit
pushing.
Some cleanup in how the short-path domain range gets handled, and
increase the max-range by one tile to improve rare cases.
Differential Revision: https://code.wildfiregames.com/D2095
This was SVN commit r22507.
This restores A23 formation behaviour, changed by 4ca448a686. Units will
now start attacking nearby enemies when the formation goes idle (such as
when the abort order button is clicked).
This introduces a change that formation units that actually go idle will
try to move back in formation shape, so it looks more like they're still
in formation.
Fixes#5519.
Differential Revision: https://code.wildfiregames.com/D2097
This was SVN commit r22506.
Calls to FaceTowardsTarget were missed in the REPAIRING, GATHERING and
GUARDING unitAI state, leading occasionally to units pointing the wrong
way. This was not an issue prior to 0c20afdfda, which called
MoveToTargetRange, which itself called FaceTowardsTarget when it was
already in range, but it now needs to be explicitly handled in unitAI.
Attacking and Healing already handled this correctly.
Fixes#5518
Differential Revision: https://code.wildfiregames.com/D2096
This was SVN commit r22505.
Port the script to Python 3, fix some bigs in it, and remove whitespace
from the output.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1810
This was SVN commit r22499.
While at it clean some obstruction and footprint sizes in stables and
workshops
Add a specific name for some workshops
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2049
refs: #4849
This was SVN commit r22497.
Entities may never get to a distance of "0" when trying to reach other
entities, as that would mean they are right next to each other, or even
overlapping, which can fail.
Always give some leeway to distance when trying to move to a target with
no specified max-range.
This fixes WalkToTarget orders which resulted in units being stuck on
mines or on dropsites occasionally.
Reported by: elexis
Fixes#5510
Differential Revision: https://code.wildfiregames.com/D2087
This was SVN commit r22496.
As reported by @bb in #5512, catapults and other big-range units might
not approach targets correctly when trying to get in range.
To be sure that we will be in range of a square obstruction approximated
as a circle, we need to consider the inscribed circle and not the
circumscribed circle.
Reported by: bb
Fixes#5512
Differential Revision: https://code.wildfiregames.com/D2086
This was SVN commit r22495.
For consistency, long argument lists have been broken into multiple
lines after the first argument, with suitable indentation.
This was SVN commit r22492.
5c642611c4 introduces undefined behaviour: for vertices that are part of
non-AA squares, the value of "quadOutward" is undefined. This fixes that
by again setting it to QUADRANT_ALL by default, as it was pre
5c642611c4. This led to OOS.
Reviewed By: elexis
Fixes#5508
Differential Revision: https://code.wildfiregames.com/D2082
This was SVN commit r22483.
945d1ba2e6 broke formation regression tests because there now needs to
be a timer call after the units become idle for behaviour to trigger.
Differential Revision: https://code.wildfiregames.com/D2077
This was SVN commit r22477.
Add two missing error reports.
Move sanity check prior to the first variable use.
Differential Revision: https://code.wildfiregames.com/D1817
Patch By: Angen
This was SVN commit r22476.
The game currently has several infinite loops, and the stack trace is
always a variation on the same pattern that units go through IDLE as a
default state, immediately try another order (possibly entering a new
state), failing, and goes back to IDLE.
IDLE.Timer is a general workaround for this issue. It wastes a turn
every time a unit goes idle, so should a better solution be found for
the general problem of infinite loops in UnitAI, it should be removed.
This revert 8bab09d37c which was intended as a safety net, but couldn't
protect againt infinite loops between two different states.
Fixes#5460
Differential Revision: https://code.wildfiregames.com/D2041
This was SVN commit r22475.
Three changes:
- Assume a certain incertain based on distance to the target, to avoid
recompute paths every turn when the target is far way and moving.
- Handle cases where the target is unreachable to the long-range
pathfinder and we would be recomputing every turn.
- If we went straight, assume we don't need to recompute a path.
These together make moving entities recompute paths far less often,
speeding up the game.
Differential Revision: https://code.wildfiregames.com/D2066
This was SVN commit r22474.
Compute the outward quadrants once and for all instead of setting them
dynamically, because there is no reason why we should always arrive from
the same quadrant as the first time we see a vertex.
Don't consider quadrants for the start-vertex, because of the edge
expansion (which can put us in illegal quadrants)
These result in (much) better paths, the tradeoff being that we now look
at some more vertices.
Fixes#5476
Differential Revision: https://code.wildfiregames.com/D1908
This was SVN commit r22473.
Units move the InitPos of the heard to the last known position when
going through Order.Gather, which they do multiple times when hunting,
thus making them mistakenly move the herd position and unable to find it
back.
Differential Revision: https://code.wildfiregames.com/D2073
This was SVN commit r22471.
Since m_ExpectedPathTicket.m_Type is uninitialised before being used,
serialisation could fail with an out of bouds error. This fixes it by
giving it an (arbitrary) default value.
Reported by: gameboy
Confirmed and debugged by: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2074
This was SVN commit r22470.
Contrary to wxWidgets documentation, wxMenuEvent::GetMenu() can return
NULL when the system menu is accessed on wxMSW, see
https://trac.wxwidgets.org/ticket/18443.
This was SVN commit r22467.
This adds back the "domain" edges to the short/vertex pathfinder.
Without these edges, units could use points far away from the path
search that they inaccurately thought were reachable, leading to some
pathing oddities in rare cases.
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D443
This was SVN commit r22465.
Reorder code flow, handle long paths and short paths in a more explicit
manner, and only fail after a certain number of failed path computations
to avoid going idle too easily.
Make sure WALKING orders in UnitAI stop when the move fails to avoid
units being stuck.
Differential Revision: https://code.wildfiregames.com/D1907
This was SVN commit r22464.
As reported by @Freagarach on #5496, there can be broken behaviour as
UnitMotion::PathResult may call RequestLongPath with an uninitialised
path goal when ComputeGoal fails.
To fix this, check the return value everywhere and react accordingly in
case of failure.
Fixes#5496
Differential Revision: https://code.wildfiregames.com/D2063
This was SVN commit r22458.
m_PathState kept 3 pieces of information that can be deduced using other
variables:
- whether the entity was following a path. This can be better deduced
by checking if the entity has short/long waypoints.
- whether a path is currently being requested. This can be better
deduced by checking the value of m_ExpectedPathTicket
- whether the requested path is long or short. This can be stored
directly alonside the path request ticket number, making it more obvious
why it exists.
With these changes, m_PathState can be removed.
Differential Revision: https://code.wildfiregames.com/D1903
This was SVN commit r22456.
Fixes macOS linker warning "PIE disabled absolute - addressing not
allowed".
Updates nettle to 3.5.1, GnuTLS to 3.6.8, gloox to 1.0.22.
Disables TCP fast open feature of GnuTLS (requires 10.11, no SDK build
support).
Fixes GnuTLS detection of GMP by adding it to LIBS flag.
Disables getaddrinfo on gloox 1.0.22. Lobby connections failed during
server hostname resolution.
Adds --with-pic to GMP build to force consistent PIC usage.
Adds -N flag to patch commands to avoid reapplying them.
Removes unneeded build flags.
Documents --enable-fat configure flag: GMP and nettle detect
CPU-specific features, fat binaries let us build and run them on
different CPUs (see D1772).
Fixes#5453, 5489. Refs #5481.
Tested by: kali0ad, trompetin17
Reviewed by: elexis, trompetin17
Differential Revision: https://code.wildfiregames.com/D2057
This was SVN commit r22455.
It is generally better to use the movement request data as that is our
actual target and goals are just a representation of that at any given
time. Where a PathGoal is required, compute this lazily.
This allow failing easily in MoveToX() functions if the goal cannot be
computed.
Differential Revision: https://code.wildfiregames.com/D1902
This was SVN commit r22452.
Introduced by 70e22e2923. PositionChanged messages sent between
MT_Destroy handling in CmpObstruction and the actual destruction of the
component could re-recreate an obstruction, which would then live
forever in the obstruction manager.
This prevents that by de-activating the obstruction when it is
destroyed, so that further PositionChanged messages do nothing.
Differential Revision: https://code.wildfiregames.com/D2060
This was SVN commit r22451.
MoveToPoint and MoveToTarget both compute a goal from a move request.
They can be combined to reduce duplication and streamline the code.
Differential Revision: https://code.wildfiregames.com/D1984
This was SVN commit r22450.
HandleObstructedMove contains logic to drop long waypoints, should they
be occupied by units (because that can get the pathfinder stuck, since
the long-range pathfinder can find a path, but not the vertex one).
However PathResult already drops waypoints this way, so this code can be
removed for simplification.
Differential Revision: https://code.wildfiregames.com/D1981
This was SVN commit r22448.
This fixes a number of issues with formations:
- Gives the controller an obstruction. This fixes the bug where units in
formations can't gather from a tree.
- Stop special-casing formation members in PathResult. This fixes
formation members being stuck in-place when they run in an obstruction.
- Makes sure units stay in Formation.IDle when they are idle so that
D1337/D1901 can work correctly in the IDLE state.
- Warn if animals enter this state.
- Make sure that formation members that end up in INDIVIDUAL.IDLE go
back to FORMATION.IDLE for sanity and for better housekeeping (refs
#3144 - fixed completely upstream).
Differential Revision: https://code.wildfiregames.com/D2048
This was SVN commit r22447.
Use UpdateMovementState to inform the visual actor of the unit's speed,
which cill update the movement animation accordingly.
The removes the need for UnitAI to handle movement animation using the
special "move" state.
Differential Revision: https://code.wildfiregames.com/D1901
This was SVN commit r22446.
The animation overrides are a little awkward. Instead, use animation
variants, which allow defining different animations (and props and such)
easily for different units in a formation.
This lets us clean up the special C++ code to override the walk
animations.
It continues the work started by 8446b92f1b.
Original Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1337
This was SVN commit r22442.
Following D1899/98f609df1d, we have logic that can handle calling
MoveSucceeded() even if we don't go through the special STATE_STOPPING
state, and following D1898/8ac104b07a we no longer need STATE_STOPPING
for animation sync either.
m_State can therefore be entirely removed as it is redundant with other
information.
Differential Revision: https://code.wildfiregames.com/D1900
This was SVN commit r22441.
- Garrisoning cleanup (return true in some cases in ENTER when we do
change the state)
- Fix animal walking speed until D1901 lands
- Fix trading behaviour which occasionally bugged out.
Differential Revision: https://code.wildfiregames.com/D2045
This was SVN commit r22440.
8a38cfb7cf introduced an issue, as it expected "this.order.data.initPos"
to always exist. But going through `GatherNearPosition` did not set it.
Fix this by setting that variable in `GatherNearPosition`.
Use the opportunity to still fallback to the unit's position if the
variable were to not exist for some reason (defensive programming
against future changes).
Re-enable "return resource" behaviour as the final fallback case - The
GatherNearPosition call previously always passed thus this no longer
triggered.
Possible follow-up: try gathering near the dropsite found.
Differential Revision: https://code.wildfiregames.com/D2039
This was SVN commit r22434.
After the recent UM changes, units sometimes chase/flee forever as they
can never actually get in range.
This is because moving to the current target's position is not enough
when the target is moving.
By accounting for the target movement's in ComputeTargetPosition, the
behaviour is much improved.
Differential Revision: https://code.wildfiregames.com/D1987
This was SVN commit r22431.
This new version compares the final waypoint with the target's
obtruction shape and uses reachability checks to know if we will be in
range or not.
Differential Revision: https://code.wildfiregames.com/D1983
This was SVN commit r22430.
This is a partial revert of 4fda917f46, which skipped the
"MoveToTargetAttackingRange" in APPROACHING. I (incorrectly) assumed
that the original order was still perfectly fine, but in fact the
attacker's max range may have changed as that depends on the relative
elevation between attack and target - and so the original order might
never get us in range!
This was introduced originally in 8c74df2acd.
Add a comment to clarify this.
Further, this makes sure UnitMotion still is aware that it has a target
even if it is in range from the beginning, as that could lead
to stuckiness (and did when chasing sometimes). This was done in D1984
anyways.
Fixes#5478.
Differential Revision: https://code.wildfiregames.com/D2035
This was SVN commit r22429.
This makes it possible to merge the TryGoingStraightTo family of
function.
This means it is now called even for point goals and decreases the
likelihood of stuck units (as we take over from the long-range
pathfinder which brings units to navcell centers, which may not be in
the goal).
Differential Revision: https://code.wildfiregames.com/D1982
This was SVN commit r22426.
In A23, units that are approaching an enemy (Combat.Approaching) will
carry on moving to their last waypoint if the target dies, and then go
idle.
As of 69d3e76fd2, this no longer happens and units stop in their tracks,
staying in attacking forever.
This lets Combat.Approaching explicitly handle the error, deciding what
is best to do:
- go to the next order (for hunting and queued orders)
- find new targets nearby (in case the attack wasn't a forced order)
- walk to the target's last known position and find units to attack
there (in case it was). This is A23 behaviour.
Differential Revision: https://code.wildfiregames.com/D1992
This was SVN commit r22425.
D981/c219ee54b2 changed IsInXChecks to use edge-to-edge distance instead
of centre-to-edge, which broke UnitMotion's min-range movement, which
assumed distance to the center.
Since units are represented as squares, the diagonal point may be closer
to the target than the "real" clearance by a factor √2, so the delta
between minimum range and maximum range should be at least `(√2 - 1) *
clearance` to be safe in all situations (this is generally not a problem
for regular units which have a clearance of 0.8, but could be one for
catapults or elephants).
Differential Revision: https://code.wildfiregames.com/D1969
This was SVN commit r22422.
For now, we use the nearest-edge to nearest-edge distance for min-range
checks (following much discussion on D981).
This was missed when committing it in c219ee54b2.
UnitMotion was already correctly not using opposite edge checks.
Differential Revision: https://code.wildfiregames.com/D2031
This was SVN commit r22416.
Previously, unitMotion had no code that checked particularly if the
target was still in the world.
When the target moved out of the world, unitMotion would follow the path
to its last known position, then send a "MoveSucceeded" message once
there.
Following 98f609df1d, this message was no longer sent. Thus unit would
follow their path to its last waypoint and stay there, unable to carry
on or finish the order. UnitMotion now explcitly sends a "MoveFailed"
message.
This still changes behaviour from A23, requiring further revisions to
UnitAI (see D1992 for one such case).
Minohaka tested an earlier version of this change (which incorporated
D1992) and accepted it.
Differential Revision: https://code.wildfiregames.com/D1979
This was SVN commit r22415.
The reason was that the unit immediately tried gathering nearby instead
of going to the unit's last known position.
Related to D1997.
Differential Revision: https://code.wildfiregames.com/D1996
This was SVN commit r22414.
Due to an issue in 4a15cc3b9f, animals incorrectly tried going towards
the roaming point instead of away from it.
With that fixed, MovementUpdate still did not trigger as the min and max
range were the same.
Use -1 as max range (= infinite) instead since we want to move
arbitrarily away.
Having an infinite max range was broken in c219ee54b2, this
re-implements that.
Further, other calls with equal min and max range have been changed
likewise.
This does not entirely fix whales, which run in other problems because
of their large roaming range.
Differential Revision: https://code.wildfiregames.com/D1980
This was SVN commit r22413.
ea208f19a3 introduced an "IsInjured" function, used in the GUIInterface.
Mirages must mock this function and this was missed in the original
diff.
Tested By: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2018
This was SVN commit r22411.
- put modification each on an own line
- space/tab correct
- space correct objects
- remove trailling 0's
Partially requested by: Stan
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1953
This was SVN commit r22408.
Use the default naming for both libraries (libvorbis instead of vorbis),
and use our default suffix for debug versions of the libs.
This was SVN commit r22406.
It was introduced in d295dacb9b as a way to control behavior of shaders.
Its usage in shaders was completely removed in 05008d190e (before that
in b7888aea52).
Reviewed By: elexis
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2011
This was SVN commit r22403.
It helps to test/debug patches like D1847.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1972
This was SVN commit r22395.
cppformat tests failed on MacOS - the global locale was not set and
defaulted to something unexcpeted.
It is now fixed to US notation.
Patch By: Krinkle
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1978
This was SVN commit r22378.
When adding a batch of unit, these in-training units get added to the
production queue and to the entity limit count.
These in-training units need to be removed from the entity limit counts
when spawning them, or we would be double-counting them. This was done
when creating the cached entities, but this was too early: entities
might fail to spawn, for example when there is no room around the
foundation.
Change that so the entity limit count is now decremented right before
giving spawned entities the correct owner (which triggers EntityLimits
OnGlobalOwnershipChanged, which adds the spawned entities to the entity
limit count).
Additionally, add Init to TrainingRestrictions so that the test setup
doesn't complain. Other components have an empty Init instead of
checking for Init in the test setup (and 61/67 have an Init function) so
it seems more standard this way.
Reported By: elexis
Reviewed By: wraitii
Patch By: Angen
Tests By: wraitii
Differential Revision: https://code.wildfiregames.com/D1879
This was SVN commit r22375.
0c20afdfda made states more caller-independent but did not change some
callsites to be compatible with that. This fixes those.
This does not fix chasing entirely however since unitMotion does not
always recognize that the target moved enough that the entity will never
be in range.
This will be fixed upstream.
Differential Revision: https://code.wildfiregames.com/D1968
This was SVN commit r22367.
UnitMotion will now send hints that a move may be completed if:
- it is a formation member and the formation member has stopped moving.
- it isn't and it is in range from its target.
Differential Revision: https://code.wildfiregames.com/D1899
This was SVN commit r22366.
Units in 0 A.D. exhibited a "gliding" behaviour at the end of a
movement, e.g. they switched to the Idle animation and still moved a
little bit.
The reason for this behaviour is that entities check if they reached
their destination after moving. Other components (unitAI mostly) will
then possibly change animations and such, resulting in a movement over
the turn while the entity is possibly now in another animation state
than "move".
Instead, what should be done is checking if the entity has arrived
before moving, so if UnitAI calls StopMoving, then entity won't move at
all on the same turn, and the gliding effect vanishes.
The STATE_STOPPING state is made un-necessary by this change, since this
off-by-one mistake was the reason for its existence. It can be removed
(see downstream).
Differential Revision: https://code.wildfiregames.com/D1898
This was SVN commit r22365.
Move() is generally 4 parts:
- Moving
- Updating our state
- Handling obstructed moves
- Checking if we are at destination.
These can all be put in their own functions, clarifying logic and making
it harder to make mistakes.
Differential Revision: https://code.wildfiregames.com/D1897
This was SVN commit r22364.
In preparation for D1897, this logic isn't related to the "movement"
part of Move(), and can be called earlier.
Differential Revision: https://code.wildfiregames.com/D1896
This was SVN commit r22363.
The obstruction manager keeps a flag of moving units. This should be
updated in the same location as the entity's current speed, since they
have similar properties.
Differential Revision: https://code.wildfiregames.com/D1895
This was SVN commit r22362.
VisualActor refers to unit motion's `m_CurSpeed` to know what animation
to display in the special walk mode. However that variable was
inconsistently updated. By making sure we reach that codepath in one
place, we remove opportunities for issues.
This should fix most existing instances of moonwalking, another upstream
diff will fix the rest.
Differential Revision: https://code.wildfiregames.com/D1894
This was SVN commit r22361.
FacePointAfterMoving intends for the unit to face the destination once a
move is done. Since 4fda917f46, stopping is the responsibility of UnitAI
(through a call to StopMoving()). Thus we should move that code in that
function, as this ensures we don't forget to do it and removes
duplications.
Differential Revision: https://code.wildfiregames.com/D1889
This was SVN commit r22355.
The variable is not necessary since having a target is equivalent,
removing it thus reduces redundant state.
Differential Revision: https://code.wildfiregames.com/D1888
This was SVN commit r22354.
4fda917f46 introduced mistakes in range checks which sometimes broke
garrisoning and repairing.
Reported By: gameboy
Differential Revision: https://code.wildfiregames.com/D1963
This was SVN commit r22353.
These variables together held the state for the target of UnitMotion, as
set by the MoveTo[X] family of functions.
Wrapping them in a struct reduces the chances that one will accidentally
forget to reset part of the state and makes it explicit in-code that
these are grouped together.
Calling StopMoving() resets this target, which wasn't before and left
the component in an incoherent state.
Differential Revision: https://code.wildfiregames.com/D1887
This was SVN commit r22352.
UnitAI is now solely in charge of moving and stopping, making UnitMotion
behaviour easier to predict, which will ultimately help with unitAI
development. It might temporarily make units more resilient than before
however.
UnitMotion also tells UnitAI that it's arrived with "MoveCompleted"
messages, but these actually could be wrong - unitAI could decide that
we didn't want to stop after all - so change the name for something less
misleading.
Differential Revision: https://code.wildfiregames.com/D1886
This was SVN commit r22351.
"MoveStarted" messages were sent by UnitMotion when the unit started
moving (sort of) or failed to do so. This was used by formations and
guarding but was not really necessary as this can be done in "enter" or
in a timer.
Differential Revision: https://code.wildfiregames.com/D1885
This was SVN commit r22350.
These functions were placed in UnitMotion, which had nothing to do with
range checks and made them available only to moving entities for no
particular reason.
This patch also adds support for square-square range checks and
shape-shape distance checks.
Modified from a patch by bb on top of work from wraitii.
Differential Revision: https://code.wildfiregames.com/D981
This was SVN commit r22345.
ThreadUtil shipped a scope lock and a mutex implementation, which can be
removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through
profiler includes).
Tested By: Angen and Stan
Differential Revision: https://code.wildfiregames.com/D1915
This was SVN commit r22344.
Reuse the timer code in the gathering sub-state to avoid broken
duplication.
Reported By: minohaka
Test By: Angen
Differential Revision: https://code.wildfiregames.com/D1956
This was SVN commit r22342.
0c20afdfda had two issues:
- some of the unitAI code did not return true when switching states in
the "enter" phase
- missed a return false in unitMotion.cpp
This fixes the issue noticed by @bb.
Differential Revision: https://code.wildfiregames.com/D1947
This was SVN commit r22339.
Patch by Angen, based on the previous bat script for the autobuilder
job.
Comments by Stan.
Differential Revision: https://code.wildfiregames.com/D1909
This was SVN commit r22338.
Add the tech to ranges, and make them also pop upin captured barracks
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1941
This was SVN commit r22329.
- Rename civil_centre to civic_center
- Rename the shield prop object to a more explicit name.
- The template and the rubble template should be renamed in another
commit to make sure that do not affect the AI.
This was SVN commit r22327.
Including:
Remove LongWall from gates
Change the ("unused") gate cost component in more reasonable number and
adapt the repairTimeRatio with it to keep the health/second the same
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1794
This was SVN commit r22325.
- Move the * and & to the correct side,
- Add .0 and 0.f to clearly mark the types
- Pass pointers instead of arrays
- Add a newline after forward declaration
- Add spaces between operators
- Use c++ cast
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1934
This was SVN commit r22323.
Including:
moves template_structure_military_barracks_stables.xml to
template_structure_military_stable.xml
updates all its children accordingly
merges values from pers_stable.xml into the new generic template
changes generic name Stable (singular, without s)
standardizes rubble sizes to 5x5 (pers had 4x4)
corrects specific name for Greek factions
adds foundation actor to kush_stable.xml
Patch By: Nescio
Comments By: Angen
Differential Revision: https://code.wildfiregames.com/D1790
This was SVN commit r22322.
There was a setback when I used tinypng to compress the images as it
eliminated necessary image component.
Reviewed by: Stan
This was SVN commit r22318.
Move checks for rendering a frame in Render() to avoid missing calls to
this functions, which can crash on certain systems.
Move the sound manager's idle task out of Render().
Move the buffer swapping in Render() since we do not need to swap
buffers unless we are rendering.
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1495
This was SVN commit r22314.
This also moves the actual "moving" code to states instead of orders,
making states more self-contained and removing the change of errors when
cleaning up a state.
Differential Revision: https://code.wildfiregames.com/D1865
This was SVN commit r22313.
To use:
```
./update-workspaces.sh --prefer-local-libs
```
Then run `make` as usual.
Accepted by: Itms
Differential Revision: https://code.wildfiregames.com/D1747
This was SVN commit r22308.
Fix some decals,
Remove AO suffix,
Rename struct_b to roof
Use stable_elephant as per the art convention
<general>_<civ>_<type>_<extra>_<variation>
This was SVN commit r22306.
Having Async in the name was not really informative and made it awkward
to reuse for non-async code.
Reviewed By: Kuba386
Differential Revision: https://code.wildfiregames.com/D1854
This was SVN commit r22305.
This implements a status effects receiver component (in a similar
fashion to the damage receiver component). The plan is to further extend
this component notably to handle graphical indication of status effects,
and a variety of other effects.
Currently implemented: ranged attacks can inflict status effects that
reduce HP over time.
This can be resisted by armour.
No units currently utilise this in-game but with proper graphics support
that could be changed.
Patch By: Mate-86
Reviewed By: wraitii
References #1912
Differential Revision: https://code.wildfiregames.com/D1252
This was SVN commit r22304.
Expect a 10-25% build time improvement.
Original Patch By: Angen
Reviewed By: Angen
References #5038
Differential Revision: https://code.wildfiregames.com/D1333
This was SVN commit r22303.
Destroying INVALID_ENTITY is valid and should do nothing.
The current code will send MT_Destroy messages when doing this, which is
un-necessary work and feels kind of broken to me.
Early-exit instead.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1736
This was SVN commit r22300.
It improves readability of the code when a function that seems like it
does a simple check actually only does a simple check and the caller is
the one changing state.
Differential Revision: https://code.wildfiregames.com/D1884
This was SVN commit r22299.
This improves refractions around entities close to the surface, such as
fishes, by handling depth better and by clipping the water plane a
little lower.
This uses the skybox for reflections when refractions are enabled but
reflections are disabled, making it possible to play with reflections
disabled without having super-ugly water (arguably a performance
improvement).
Differential Revision: https://code.wildfiregames.com/D359
This was SVN commit r22297.
This uses trigger to create some scientific test cases for unit motion
(the whole unitAI->Motion->Pathfinders stack)
Differential Revision: https://code.wildfiregames.com/D1892
This was SVN commit r22296.
Xcode otherwise defaults to the latest Mac OS version.
Reviewed By: Wraitii
Differential Revision: https://code.wildfiregames.com/D1482
This was SVN commit r22295.
Make all the props in the blacksmith buildings separate
Add three tools, one hammer, two tongs
Use the new briton shields on the blacksmith
Use the new helmets on the blacksmith
Add new crates, and gives it a bit more geometry.
Update the anvil eyecandy prop
This was SVN commit r22290.
Speed up edge update by being clever, only updating dirty tiles instead
of everything (effectively doing to "TODO be clever" here).
This is a substantial speed improvement when an update is necessary.
Differential Revision: https://code.wildfiregames.com/D1834
This was SVN commit r22279.
Following 809f297707, this decouples the hierarchical pathfinder and the
long pathfinder. The long pathfinder was the class owning the
hierarchical pathfinder, which didn't particularly make sense and
resulted in some interface awkwardness.
At the moment, the long pathfinder still needs to hierarchical
pathfinder to compute paths (to make sure they are reachable).
Differential Revision: https://code.wildfiregames.com/D1867
This was SVN commit r22278.
This:
- cleans up a code duplication and clarifies the intent.
- reorders things around for clarity
- improves variable names.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1840
This was SVN commit r22277.
def47cb7ae had an issue where the move speed was not correctly reset
after chasing a unit.
Reported By: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1861
This was SVN commit r22275.
Replace the old spears by new spear models,
Use the eyecandy barrel instead of the one, hence removing useless
underground geometry
Use the eyecandy anvil instead.
Add smoke to the chimney,
Fix the roof UVMapping
Rename to gaul.
This was SVN commit r22274.
Added gather meat position for carthaginian cavalry spearman italic,
they were standing above the horse when gathering meat
This was SVN commit r22269.
*New Horse textures
*New Horse fauna (Breed, Marwari, Lusitano, Celtic)
*Cleaner distribution of animations for riders and horse files
*Better usage of variants to reduce amount of lines in Horse Actors
*Chariot for Kushites Done by @Sundiata
*Single armature for chariots
The missing riders will be added in the next commit.
Patch by: @Alexandermb
Reviewed by: @Lordgood, @Stan
This was SVN commit r22260.
removes <SpecificName> from the generic template_* files
removes <GenericName> from the gaia/ruins/* files
removes <GenericName> from the gaia/treasure/* files
removes <Icon> from the gaia/treasure/* files if it's identical to the
parent template
adds the appropriate actors to their specific children in the cases they
were not yet included there
adds the appropriate specific names to their specific children in the
cases they were not yet included there
use title case for the gaul theatron
<Actor> is still present in the following generic templates:
template_formation.xml
template_unit_catafalque.xml
Reviewed by: @Stan
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1759
This was SVN commit r22256.
Iterating using a for..in over an array returns the indices as string,
not number, which C++ did not accept.
Differential Revision: https://code.wildfiregames.com/D1864
This was SVN commit r22254.
The vertex pathfinder was implemented directly in CCmpPathfinder,
instead of being a separate helper like the hierarchical pathfinder or
the long pathfinder.
This moves it to its own helper VertexPathfinder, which gets us ready
for D14 and pathfinder threading. Some struct definitions need to be
moved around.
Differential Revision: https://code.wildfiregames.com/D1855
This was SVN commit r22253.
Because of the limited precision of our fixed-point numbers, the
timeLeft calculation could sometimes return results above the actual
time left, resulting in units moving a few fixed::epsilons farther than
they should be, which makes them switch to the running animation. This
was rather unstable however, so there was a constant 'flickering'
between walking and running.
If we divide last instead of first in the operation, the errors get
gobbled up by the division and we no longer have this issue.
Reported by: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D1856
This was SVN commit r22249.
Motive behind the change: calls to Profile() currently crash unless they
are triggered from the main thread, but it's somewhat difficult to know
that from the code. It makes more sense to silently ignore those
particularly so we can easily have the same code be threaded or not.
This also removes a few profiling calls that don't make much sense.
Differential Revision: https://code.wildfiregames.com/D1853
This was SVN commit r22248.
Following b56f7f39d4 I dwelled in the fogging code. Some confusion could
have been avoided by some comments.
Also early-exit the loop to avoid doing un-necessary js->c++
transitions.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1737
This was SVN commit r22247.
1x1 is now a 1x1 grid unit for the game 2x2m unit in blender , that you
can see using THE Wireframe mode or the special texture in atlas.
Resize and adapt existing foundations accordingly
Unify construction dust, it only appears when building (scaffold
variant)
Add 64 foundations from 2x1 to 9x9 and corresponding dirt decals
Add three new scaffolds based on Lordgood's for walls
Rename props to use lowercase names as per art conventions and update
the maps accordingly.
Use 0x instead of a b c and d as per the art convention.
Add missing materials tags, and only use special textures when necessary
Template update will be done in the following commit.
This was SVN commit r22239.
Add a missing semi-colon
For future reference on documenting records using JSDoc see the
differential.
Reviewed by: @elexis
Differential Revision: https://code.wildfiregames.com/D1848
This was SVN commit r22229.
Debug variables are kept mutable as one otherwise has to use a complex
system and this is really not worth it.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1491
This was SVN commit r22219.
FindPassableRegions intends to return all passable regions in a chunk,
but did not as it used the number of regions in that chunk. In fact,
regions can have individual IDs higher than the number of regions (as
shown by the test), therefore FindPassableRegions might miss some.
This only affected the JPS pathfinder, when starting on an impassable
cell, which called FindNearestPassableNavcell with then possibly
returned a sub-optimal navcell. This is a limited impact but upcoming
patches will rely on that function more.
Fixed using a vector to store IDs, which also makes for-range loops
usable.
Differential Revision: https://code.wildfiregames.com/D1832
This was SVN commit r22218.
Includes some style normalization.
Refs 60cfd2d16c.
Patch By: Stan
Reviewed By: vladislavbelov, Itms
Differential Revision: https://code.wildfiregames.com/D1845
This was SVN commit r22216.
Use at() over find() as it makes the code neater and the performance
impact is negligible.
This forces an algorithm change in FindReachableRegions as the key
accessed is not guaranteed to exist.
Differential Revision: https://code.wildfiregames.com/D1830
This was SVN commit r22210.
These variously test some simple MakeGoalReachable and
FindNearestNavcell calls, as well as checking edges and regions when
updating the map.
Differential Revision: https://code.wildfiregames.com/D1833
This was SVN commit r22205.
The template tree included 'template_unit_mechanical.xml', which had two
children, '*_ship.xml' and '*_siege.xml'.
This template did little and implied a relevant common ancestor to ship
and siege units. As organic units do not descend from a generic
'Organic', this was not necessary.
This commit removes this template and the '_mechanical' bit from
children templates to simplify.
Additionally, this renames:
- template_unit_mechanical_siege_ballista.xml to
template_unit_siege_boltshooter.xml
- template_unit_mechanical_siege_onager.xml to
template_unit_siege_stonethrower.xml
This helps avoid ambiguity, as our Roman ballista for example throws
stones (even if it is a torsion engine), and 'ballista' refers to a bolt
shooter in Age of Empires 1 (and in AoE 2 for the Elephant Ballista,
confusingly not named a scorpion like other bolt shooters in that game).
Patch By: Nescio
Reviewers: Wraitii
Subscribers: Itms, O14 Maps, wraitii, elexis, Vulcan, Stan
Differential Revision: https://code.wildfiregames.com/D1760
This was SVN commit r22204.
While at it:
- Remove the stone cost/loot from palisades
- Change the gate tooltip to not mention stone walls
- Standartize palisade armour (don't reuse the walls' armour)
- Demand village phase instead of town phase for all palisades
- Remove stone wall classes from palisades
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1796
This was SVN commit r22202.
f0d9806b3f added a problem: Engine.GetGuiObjectByName is unaware of the
caller GUI page.
So GUI pages in the background that still run the onTick and other event
code tried to look on the topmost GUI page, rather than their own GUI
page.
9674c3c0fe added a workaround that has to be copied to any place that
can call JS code.
If developers don't know about the reason for this workaround and add a
new place that can call JS code (#5369), they won't be able to implement
anything.
This removes this workaround by passing the pointer to the correct GUI
page as callback data.
Patch By: elexis
Reviewed By: wraitii
Refs #5369
Trac Tickets: #5369
Differential Revision: https://code.wildfiregames.com/D1701
This was SVN commit r22200.
This changes running speed into a running multiplier (of walk speed).
The advantage is that it simplifies code since you can setup a default
run multiplier at the template level and it'll work for all subsequent
templates, and technologies cannot forget to change it. It makes
specialised unit templates easier to maintain, too.
Formations have a 100 run multiplier which effectively sets their
maximal walking speed at 100
Reviewed By: bb, O2 JS Simulation
Differential Revision: https://code.wildfiregames.com/D438
This was SVN commit r22197.
Do not flag a unit as injured when it receives 0 damage.
Do not flag dead units as injured.
Do not mark units as injured when they are full health and killed at one
shot.
Cleanup Reduce, introducing a separate function to handle deaths.
Patch By: Angen
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1769
This was SVN commit r22196.
while at it, make the classes consistent and remove the cav from the
range
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1791
This was SVN commit r22190.
Following D945, I reckon more things should be moved from Attack/Ranged
to Attack/Ranged/Projectile.
In the long run, I think most things should be moved to the Projectile,
which would let us have several projectiles per attack (for example),
make it easier to abstract away from the Melee/Ranged attack types, and
would also be more coherent. This is the first step, as it adds the
Projectile to all templates.
This also makes the launch point a parameter, though I only add "y" as
implementing the rotation is left as an exercise to the reader.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1171
This was SVN commit r22184.
While add it remove conquestCritical from benches/fences/tables/columns
etc.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1626
This was SVN commit r22182.
Use English names for authors and titles, use American English rather
than British.
Patch By: Nescio
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1818
This was SVN commit r22174.
The variable was introduced in 492e49da38 without being used, neither
did it become used in a later commit. To me it seems that it is a
left-over from a copy paste, as the ".left" functions do use the
variable.
Notice 74c420f658 did cleanup around these lines, but did not remove
this variable
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1813
This was SVN commit r22166.
C4458 in AtlasObjectImpl.cpp line 292 and in AtlasUI/Object.cpp:547
C4456 in MapDialog.cpp:173 and in ScenarioEditor.cpp:742
Reviewed by: @Angen
Accepted by: @Itms
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1741
This was SVN commit r22161.
the variable was removed in 12e2428495. A usage was removed in
9376609ee8.
And since then the usage is useless because we use infinity sky model.
This was SVN commit r22154.
As suggested by Nescio, I’ve actually copied the string from line 66,
which contains
the very same string.
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1801
This was SVN commit r22147.
Usage:
let size = Engine.GetGUIObjectByName({gui_object_name}).GetTextSize()
Returns a JS object containing the height and width of the primary text
field within
the object, taking into account new lines, text wrapping, and font
changes.
Unless the object doesn't contain text, in which case the method will
return undefined.
Commented on by: vladislavbelov
Additional code by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D844
This was SVN commit r22134.
- Var → let
- Simplify some lines
- add break to
Reviewed by: @elexis
Differential Revision: https://code.wildfiregames.com/D1770
This was SVN commit r22075.
As reported by Angen and Gurken Khan on the forums, there is a crash
following a16e7c0a56 caused by an infinite loop in UnitAI. The reason is
that IDLE.enter can order us to attack, which can fail, switching us
right away back to idle.
FinishOrder's behaviour allows us to have IDLE as a default state and
lets us not lose a turn when becoming idle, so to keep this behaviour
explicitely check that we are not already in IDLE before switching
states.
Reported by: Angen, Gurken Khan
Commented by: elexis, Itms
Differential Revision: https://code.wildfiregames.com/D1743
This was SVN commit r22059.
As pointed out by elexis in D1695:
> "font=" strings are superseded by setStringTags()
So while we're doing work in that file, let's fix that.
This was SVN commit r22046.
the skybox at the current camera location, so that the skybox appears
indefinitely far away. Refs #3458.
Reviewed By: wraitii
Tested By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D1683
This was SVN commit r22039.
Add two templates for mapmakers that don't want horses and camels
roaming around. Will be useful for scenarios.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1524
This was SVN commit r22031.
This generally makes this code cleaner and easier to maintain, while
also being more modern and fully tested.
Looked at by: leper
Differential Revision: https://code.wildfiregames.com/D8
This was SVN commit r22029.
When SetNextState is called with the current state, it will leave and
re-enter so that any relevant cleanup will get called and things work as
expected.
It will prevent possibly awkward code issues in UnitAI, which already
called SetNextStateAlwaysEntering in a number of places to work around
them.
This should most likely have been the default behaviour in the first
place.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1488
This was SVN commit r22023.
Fixes an issue on macOS Mojave that was patched in fa1c281e79.
The list of changes can be found under
build/premake/premake5/CHANGES.txt.
This was SVN commit r22021.
This allows heroes to be upgraded
Patch By: smiley
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1694
This was SVN commit r22019.
Add a projectile prop, and a garrisoned prop if someone wants to use it
for garrisoning.
Set the EOL to Native
Reported by: @vladislavbelov
This was SVN commit r22008.
By rendering sides even when they are back-facing, the water shader is
on top of a mesh instead of emptiness and this solves an old
"edge-of-map" graphical issue.
Taken out from D359 with vlad's agreement. See screenshots there for
more information on the exact issue.
This was SVN commit r22007.
The water manager computations for "fancy water effects" have always
been quite slow. I've updated one of the functions to be much faster,
and the other doesn't need to be called (apparently, since I removed
coastal foam, which tbh I don't remember doing).
This should all be redone entirely to be honest, as it's generally
terrible, but in the short-term™ this makes this function almost usable
in real-time.
Differential Revision: https://code.wildfiregames.com/D78
This was SVN commit r22006.
The name of the faction is the dynasty name "Maurya". The plural should
be "Maurya" as well, but "Mauryas" is commonly accepted and less likely
to confuse people. On the other hand, "Mauryan" is the adjective, and
cannot get a plural mark in English.
All instances of "Mauryans" were removed, including in file names and
paths.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1342
This was SVN commit r22005.
This allows using arbitrary 'mul' values with Integer types, instead of
having to switch them to Decimal types.
The ParamNode is not aware of validation (thus types) so a better
solution is incredibly non-trivial.
Differential Revision: https://code.wildfiregames.com/D268
This was SVN commit r22003.
Revelead by the A23 crash when hosting a game in the lobby. We have a
debug_break() call that calls "kill" with SIGTRAP, which generally
doesn't get handled correctly in release versions, particularly on OSX.
Differential Revision: https://code.wildfiregames.com/D1499
This was SVN commit r21998.
It was reported by GunChleoc on Transifex.
Patch by @Gallaecio
Accepted by: bb, Stan
Differential Revision: https://code.wildfiregames.com/D1531
This was SVN commit r21978.
Reported by: Shamann on Transifex
Patch by: Gallaecio
Committing on his behalf because he will be away for some time.
Differential Revision: https://code.wildfiregames.com/D1551
This was SVN commit r21971.
Add blendfile for the boar so that it can be reexported more easily in
the future.
Reduce the boar's max range so it attacks its enemies closer.
Add a feeding animation variant.
This was SVN commit r21947.
2018-12-26 09:04:28 +00:00
17772 changed files with 310409 additions and 261292 deletions
progressdescription=false ; Whether to display the progress percent or a textual description
[gui.session]
camerajump.threshold=40 ; How close do we have to be to the actual location in order to jump back to the previous one?
timeelapsedcounter=false ; Show the game duration in the top right corner
@@ -370,7 +398,13 @@ attackrange = true ; Display attack range overlays of selected de
aurasrange=true ; Display aura range overlays of selected units and structures
healrange=true ; Display heal range overlays of selected units
rankabovestatusbar=true ; Show rank icons above status bars
experiencestatusbar=true ; Show an experience status bar above each selected unit
respoptooltipsort=0 ; Sorting players in the resources and population tooltip by value (0 - no sort, -1 - ascending, 1 - descending)
snaptoedges="disabled" ; Possible values: disabled, enabled.
snaptoedgesdistancethreshold=15 ; On which distance we don't snap to edges
disjointcontrolgroups="true" ; Whether control groups are disjoint sets or entities can be in multiple control groups at the same time.
defaultformation="special/formations/box" ; For walking orders, automatically put units into this formation if they don't have one already.
formationwalkonly="true" ; Formations are disabled when giving gather/attack/... orders.
[gui.session.minimap]
blinkduration=1.7 ; The blink duration while pinging
@@ -411,7 +445,7 @@ extended = true ; Whether to display the chat history
[lobby]
history=0 ; Number of past messages to display on join
room="arena23b" ; Default MUC room to join
room="arena24" ; Default MUC room to join
server="lobby.wildfiregames.com" ; Address of lobby server
tls=true ; Whether to use TLS encryption when connecting to the server.
verify_certificate=false ; Whether to reject connecting to the lobby if the TLS certificate is invalid (TODO: wait for Gloox GnuTLS trust implementation to be fixed)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.