1
0
forked from 0ad/0ad
Commit Graph

21574 Commits

Author SHA1 Message Date
2e2ef6f3fe Increase safety of UnitAI formation code
- PushOrderFront could lead to an infinite loop if walking fails.
- Move units in formation before issuing the move order (or the
formation may not exist).

Differential Revision: https://code.wildfiregames.com/D3411
This was SVN commit r24961.
2021-02-28 10:11:30 +00:00
0e6cf11d86 Resupport more garrisoned slots per entity.
Basically removed in 3521c8f51e, now brought back :) (But split from the
population space.)

Differential revision: D2056
Comments by: @Angen, @Nescio, @Stan, @wraitii
This was SVN commit r24960.
2021-02-28 10:02:03 +00:00
41a5650a62 Allow garrisoned entities to upgrade.
Since its introduction in b2f4b0f494 garrisoned entities were not
allowed to upgrade (b2f4b0f494#inline-4821) but that is not needed (at
least since 4fadd75ace).

Changing templates to anything not being able to garrison will still
fail (#5906) but that can also be done with this code.

Differential revision: D3251
Comment by: @bb
This was SVN commit r24958.
2021-02-28 06:47:36 +00:00
f4c9305eee Move some functionality from GarrisonHolder to Garrisonable.
Take some responsibility from GarrisonHolder to where it belongs
(Garrisonable).

Differential revision: D3223
Comments by: @Stan, @wraitii
This was SVN commit r24957.
2021-02-28 06:37:05 +00:00
d038b3c4f2 Properly discard orders.
Instead of manually calling FinishOrder(). Also, `{ "discardOrder": true
}` is changed to a const `false`.

Differential revision: D3283
Fixes: #5771
Comments by: @Angen, @Stan, @wraitii
This was SVN commit r24956.
2021-02-28 06:29:53 +00:00
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
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
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
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
32c3f4fb90 Early return in PreprocessorWrapper in case of failed include resolve.
This was SVN commit r24951.
2021-02-27 17:21:02 +00:00
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
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
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
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
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
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
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
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
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
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
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
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.
2021-02-21 10:04:39 +00:00
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
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
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
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
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
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
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
9a5d1f3503 Remove useless code in mausoleum.xml
This was SVN commit r24921.
2021-02-13 23:57:29 +00:00
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
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
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
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
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
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
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
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
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
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
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
3da97821e7 Use the new arrow variants to reduce duplication for spart
This was SVN commit r24909.
2021-02-13 23:51:34 +00:00
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
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
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
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
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
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
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
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