Commit Graph

21569 Commits

Author SHA1 Message Date
Freagarach e5ee028313 Only cancel (un)packing when in the correct state.
Differential revision: D3285
This was SVN commit r24955.
2021-02-28 05:51:55 +00:00
Freagarach c33d1192bc Only stop moving when state requests that.
In our current UnitAI implementation, the states are responsible for
whether we are moving or not. If a request to stop moving is made from
outside the state that initiated the moving order that is (mostly)
wrong. This fixes that.

Differential revision: D3289
Comment by: @wraitii
This was SVN commit r24954.
2021-02-28 05:40:08 +00:00
Freagarach e7158ae6b1 Unify UnitAI and AnimalAI.
18b317bc19 (#563) introduced an ANIMAL-state from a separate
AnimalAI-component (introduced in e19146cf25).
This patch merges that separate state and brings the ROAMING and FEEDING
(renamed to LINGERING) under the INDIVIDUAL.IDLE-state.

This enables e.g. city-building mods to have human units that linger and
roam or animals that behave like humans.

The specific values for animals might need tweaking after this.

Differential revision: D2646
Fixes: #1832, #5593
Comments by: @Angen, @Langbart, @Nescio, @Stan, @wraitii
Refs.: #3919

This was SVN commit r24953.
2021-02-27 20:13:40 +00:00
wraitii 113fefeeb7 Netcode: Identify controller client via a secret key
The 'controller' of an MP game (the host in general, though dedicated
servers would change that) is currently whoever first tells the server
that it is. This can be abused since it relies on trusting the clients.

This changes that logic: the server defines a 'controller secret', and
the first client to sent the correct controller secret is the
controller. This is safe assuming the secret is unknowable enough (the
current solution wouldn't pass strict cryptography tests, but it's
likely good enough).

Reverts 1a3fb29ff3, which introduced the 'trust the clients' mechanic,
as a change over 'the first local IP is controller'.

Necessary step towards dedicated server, if we want to use the regular
gamesetup (Refs #3556)

Differential Revision: https://code.wildfiregames.com/D3075
This was SVN commit r24952.
2021-02-27 17:44:59 +00:00
vladislavbelov 32c3f4fb90 Early return in PreprocessorWrapper in case of failed include resolve.
This was SVN commit r24951.
2021-02-27 17:21:02 +00:00
Imarok 2ce0c2b988 Remove unneeded check in JSInterface_GameView.cpp
Differential Revision: https://code.wildfiregames.com/D3608
This was SVN commit r24950.
2021-02-27 16:52:51 +00:00
wraitii bdda96a2e7 Prevent using privileged ports on *nix from the GUI
Ports 1-1023 are privileged and shouldn't be accepted by the GUI.

Patch by: DynamoFox
Differential Revision: https://code.wildfiregames.com/D3574
This was SVN commit r24949.
2021-02-27 16:40:42 +00:00
wraitii 20b1d98a84 Fix compilation following 52fcee9c91
52fcee9c91 broke compilation because spawnedRadius is not an integer.

This was SVN commit r24948.
2021-02-27 11:12:21 +00:00
wraitii e839fc29c7 Fix i18n for common map trigger scripts.
Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3570
This was SVN commit r24947.
2021-02-27 10:34:11 +00:00
wraitii c3f74494b4 Fix GUI hotkey/map/reference strings not being translated.
Fixes ae9ea5b859, a4852c4c01, bbd808349f

Differential Revision: https://code.wildfiregames.com/D3535
This was SVN commit r24946.
2021-02-27 10:27:26 +00:00
wraitii 52fcee9c91 Fix division by 0 error in PickSpawnPoint
The spawn code should not assume that obstructions will never be
0-sized.

Reported by: Zack
Fixes #6039

Differential Revision: https://code.wildfiregames.com/D3583
This was SVN commit r24945.
2021-02-27 10:21:04 +00:00
wraitii c6f50b253f Fix *nix tarballs to extract in a subfolder.
Also incorporate retry improvements by Stan

Reported by: madPilot
Differential Revision: https://code.wildfiregames.com/D3585
This was SVN commit r24944.
2021-02-27 10:19:31 +00:00
wraitii 0363ff112e Fix water wind speed computation
Fixes 2a485c5e3b

(the calculation resulted in mismatched wind speed & wave orientation)

Differential Revision: https://code.wildfiregames.com/D3551
This was SVN commit r24943.
2021-02-27 10:08:00 +00:00
wraitii f902b23255 Add Bellaz89 to the programming credits
For contributions to d07f271d60 notably.

Differential Revision: https://code.wildfiregames.com/D3591
This was SVN commit r24942.
2021-02-27 09:33:26 +00:00
Imarok 4eadb3eb9d The SetCameraTarget script function should not change the orientation
Reviewed by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3569
This was SVN commit r24940.
2021-02-27 09:01:20 +00:00
Stan 68b81f63b1 Bump version to alpha 25.
Last alpha 24 commit was [[SVN:24937]]. [[SVN:24938]] was because the CI
wasn't turned off.

Comments by: @wraitii, @Freagarach, @Nescio,
Differential Revision: https://code.wildfiregames.com/D3571
This was SVN commit r24939.
2021-02-27 08:48:30 +00:00
wraitii 99712c3581 Fix No-PCH build.
ParticleManager uses <list> which has recently become unincluded.

Differential Revision: https://code.wildfiregames.com/D3589
This was SVN commit r24936.
a24
2021-02-21 10:04:39 +00:00
Freagarach ada0229f81 Fix garrison error with formations already in range.
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.
2021-02-21 09:18:05 +00:00
vladislavbelov 03ed891029 Do not generate render data in case CDecal calculated wrong coordinates.
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D3578
This was SVN commit r24932.
2021-02-18 21:09:41 +00:00
wraitii e8fb314996 Fix error when unsetting a hotkey.
Fixes f222dd2d3e.

Reported by: nwtour
Based on a patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3579
This was SVN commit r24931.
2021-02-18 09:01:36 +00:00
wraitii f380ec627d i18n issues: Spanish manual & gamesetup tips text.
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.
2021-02-16 10:59:15 +00:00
Stan 6a3246fe93 Fix variant loading order
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.
2021-02-16 10:51:23 +00:00
Stan 110402eae0 Update credits again. I failed to notice not all languages were included.
- 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.
2021-02-14 14:00:30 +00:00
Stan 98f2510632 Fixes config crash in case of an empty value
Patch by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3567
This was SVN commit r24922.
2021-02-14 02:10:46 +00:00
Stan 9a5d1f3503 Remove useless code in mausoleum.xml
This was SVN commit r24921.
2021-02-13 23:57:29 +00:00
Stan 834edca55d Use the new arrow and variants to reduce duplication for athen
This was SVN commit r24920.
2021-02-13 23:56:51 +00:00
Stan bb59e3a64e Use the new arrow and variants to reduce duplication for celt brit and gaul
This was SVN commit r24919.
2021-02-13 23:56:39 +00:00
Stan 2c9587f857 Use the new arrow and variants to reduce duplication for hele
This was SVN commit r24918.
2021-02-13 23:56:20 +00:00
Stan d138d7d743 Use the new arrow and variants to reduce duplication for iber
This was SVN commit r24917.
2021-02-13 23:55:51 +00:00
Stan 7afebf39a6 Use the new arrow and variants to reduce duplication for kush
This was SVN commit r24916.
2021-02-13 23:53:45 +00:00
vladislavbelov 7a71011149 Refactors smart pointers creation, reduces code duplication and improves exception safety.
This was SVN commit r24915.
2021-02-13 23:53:40 +00:00
Stan 425f19b8ac Use the new arrow and variants to reduce duplication for mace
This was SVN commit r24914.
2021-02-13 23:53:38 +00:00
Stan 5f859a90d2 Use the new arrow and variants to reduce duplication for merc and maurya
This was SVN commit r24913.
2021-02-13 23:53:12 +00:00
Stan 8bd8eb7acb Use the new arrow and variants to reduce duplication for pers
This was SVN commit r24912.
2021-02-13 23:52:56 +00:00
Stan 8c0adac8a4 Use the new arrow and variants to reduce duplication for ptol
This was SVN commit r24911.
2021-02-13 23:52:25 +00:00
Stan e8cfcdb6e4 Use the new arrow and variants to reduce duplication for rome
This was SVN commit r24910.
2021-02-13 23:52:04 +00:00
Stan 3da97821e7 Use the new arrow variants to reduce duplication for spart
This was SVN commit r24909.
2021-02-13 23:51:34 +00:00
Stan 808af6148f Unify sele damage level by using variants. Use the new arrow variant to reduce duplication
This was SVN commit r24908.
2021-02-13 23:50:50 +00:00
Stan 7697615fb4 Unify cart damage level by using variants. Use the new arrow variant to reduce duplication
This was SVN commit r24907.
2021-02-13 23:50:16 +00:00
Stan 1141c060f4 Add a variant for projectiles for bolt artillery and normal arrows.
This was SVN commit r24906.
2021-02-13 23:49:21 +00:00
vladislavbelov 565710d4c9 Fixes UB in shared_ptr usage of an array. Refs #5288
Reported By: PVS-Studio
This was SVN commit r24905.
2021-02-13 23:25:41 +00:00
Imarok 7c2be449de Fix attack notifications with buildings
Differential Revision: https://code.wildfiregames.com/D3566
This was SVN commit r24904.
2021-02-13 21:31:16 +00:00
vladislavbelov fc7da5edd1 Fixes leaking of a file handle in case of an error. Refs #5288
Reported By: PVS-Studio
This was SVN commit r24903.
2021-02-13 17:57:37 +00:00
Stan 0b432e7c9c Replace background color of trees by an average color to remove artifacts on filtering, flickering on some cards (when a background color leaks to the main color).
Script by: @Vladislavbelov
This was SVN commit r24902.
2021-02-13 17:48:29 +00:00
Stan 2c67a569c0 Replace background color of bushes by an average color to remove artifacts on filtering, flickering on some cards (when a background color leaks to the main color).
Script by: @Vladislavbelov
This was SVN commit r24901.
2021-02-13 17:47:55 +00:00
wraitii fc39ff52fc Fix player+AI setup in MP gamesetup
Data race introduced in 612515a163.

Reported by: Langbart
Fixes #6020

Differential Revision: https://code.wildfiregames.com/D3564
This was SVN commit r24900.
2021-02-13 17:34:24 +00:00
vladislavbelov b2310ad70a Makes DynamicArena more cache-friendly and removes useless member.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3560
This was SVN commit r24899.
2021-02-13 17:33:05 +00:00
wraitii 6085d14ca9 Increase the cose of cavalry/infantry levy techs.
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3458
This was SVN commit r24898.
2021-02-13 16:48:17 +00:00
Angen 16fc7bb2de [Petra/AI] Handle permadeaths for heroes hotfix
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.
2021-02-13 11:38:58 +00:00
wraitii fba69b2672 Fix this.capacities not always existing when processing value modification messages.
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.
2021-02-13 10:52:17 +00:00