1
0
forked from mirrors/0ad
Commit Graph

21228 Commits

Author SHA1 Message Date
vladislavbelov ffcfdddb13 Adds author of the original patch for 25332f9b86 to credits.
This was SVN commit r24555.
2021-01-12 08:24:33 +00:00
vladislavbelov 63975ef977 Fixes include for 25332f9b86, map > unordered_map.
This was SVN commit r24554.
2021-01-12 07:49:48 +00:00
vladislavbelov 25332f9b86 Adds #include directive support to shaders
Comments By: Stan, wraitii
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3030
This was SVN commit r24553.
2021-01-11 23:23:30 +00:00
Freagarach 7a15ee1c21 [Gameplay A24] - Tweak Fortress cost and Health.
- 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.
2021-01-11 20:06:45 +00:00
Stan 205486d6f3 Fix sound errors when no sound card is detected.
Based on a patch by: @Imarok
Refs: #3285

Differential Revision: https://code.wildfiregames.com/D1481
This was SVN commit r24551.
2021-01-11 18:56:33 +00:00
Imarok 687a9335f0 Remove cache detection
Reviewed by: wraitii
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D3165
This was SVN commit r24550.
2021-01-11 17:30:16 +00:00
Angen 7148aa5554 Display gather rates per subtype
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.
2021-01-11 16:03:16 +00:00
Freagarach 1b2ef6988a [Gameplay A24] - Introduce two new technologies at the stable.
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.
2021-01-11 13:54:53 +00:00
Freagarach 2223336ce5 Fix cart super dock production queue.
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.
2021-01-11 13:12:12 +00:00
Freagarach 6013aaebd3 [Gameplay A24] - Change ship technologies.
- +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.
2021-01-11 12:56:41 +00:00
Freagarach c2479d961f [Gameplay A24] - Make fireships unable to attack anything but ships.
Since they're essentially floating bonfires.

Patch by: @Nescio
Differential revision: D2802
Reviewed by: @wraitii
Informally accepted by: @borg-
Comment by: @elexis
This was SVN commit r24545.
2021-01-11 12:43:00 +00:00
Freagarach f7a6aa6f70 [Gameplay A24] - Move Citizen Soldier health increase from phase progression to promotion.
Patch by: @Nescio
Differential revision: D3315
Reviewed by: @borg-, @wraitii
This was SVN commit r24544.
2021-01-11 12:35:24 +00:00
Freagarach d6ff007088 Commit resources at dropsite and add tests.
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.
2021-01-11 11:59:07 +00:00
Freagarach 1c505439f7 Fix some C++-style notes from b5df81af76.
/ b5df81af76

Differential revision: D3096
Reviewed by: @vladislavbelov, @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24542.
2021-01-11 11:26:31 +00:00
Freagarach ebadfe260a [Gameplay A24] - Make unlock_shared_dropsites independent from unlock_shared_los.
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.
2021-01-11 09:42:38 +00:00
Freagarach 9eebd100ff [Gameplay A24] - Increase defensive structure vision range.
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.
2021-01-11 09:24:14 +00:00
Freagarach a46d74b14d [Gameplay A24] - Unify ranged attack ranges.
New values:
- javelineers: 30
- slingers: 50
- crossbowmen: 60
- archers and structures: 70
- archers with archery tradition - 80

Patch by: @Nescio
Differential revision: D3297
Reviewed by: @borg-
This was SVN commit r24539.
2021-01-11 09:21:24 +00:00
Freagarach ec26d3ef3f [Gameplay A24] - Deprecate Gaul Tavern.
Taverns only appeared as a consequence of growing Roman influence
(https://wildfiregames.com/forum/topic/24495-celtic-reference/page/6/?tab=comments#comment-399399)
in the first century BC.
Moves fanatics to their temple.

Patch by: @Nescio
Differential revision: D3316
Reviewed by: @borg-
Comments by: @Stan
This was SVN commit r24538.
2021-01-11 09:16:56 +00:00
Freagarach 9b78b4476e Some cleaning in input.js.
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.
2021-01-11 09:10:38 +00:00
s0600204 0bf18827d9 Restore civ-specific buildings to the civinfo page
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.
2021-01-11 00:09:17 +00:00
Angen 2c34cde895 Fix strange character at the end of kush arsenal specific name
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.
2021-01-10 17:52:42 +00:00
wraitii be286d4345 Increase turn rate of most unit types slightly
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.
2021-01-10 13:23:39 +00:00
wraitii c7fac7ee88 Small fixes for status effects
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.
2021-01-10 09:54:12 +00:00
Freagarach fe2e6fd696 Allow mods to insert or delete individual resource icons more easily.
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.
2021-01-10 09:41:00 +00:00
wraitii 5ee8354e99 Fix windows SEH hook when crashing in an std::thread
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.
2021-01-10 08:39:54 +00:00
Freagarach f876db857a Remove duplication from cmpAutoBuildable init.
Differential revision: D3296
Reviewed by: @wraitii
Comment by: @Stan
This was SVN commit r24529.
2021-01-10 07:25:52 +00:00
Freagarach 312dbbea9e [Gameplay A24] - Give all civs rams.
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.
2021-01-10 07:23:45 +00:00
Freagarach 082bd8bd44 [Gameplay A24] - Differentiate domestic animals.
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.
2021-01-10 07:08:12 +00:00
Angen 8aff581691 Update action-gather-fish with new visual
Created by @Stan.

This was SVN commit r24526.
2021-01-09 19:44:14 +00:00
FeXoR 5fbd5fbd95 Avoid an error when calling createObjectGroupsByAreas or createAreasInAreas with areas argument being empty or containing an empty (sub) area.
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.
2021-01-09 18:22:47 +00:00
Angen e48f7f4aa5 Fix wrong technology token
Introduced in eb1163b872.

Differential revision: D3308
Patch by: Nescio
This was SVN commit r24524.
2021-01-09 15:19:38 +00:00
Freagarach eb1163b872 [Gameplay A24] - Unify garrison heal rates.
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.
2021-01-09 06:50:15 +00:00
Freagarach ebcf9b9ff5 Fix promoting entities not reacting to nearby enemies.
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.
2021-01-07 15:30:25 +00:00
Stan 3747b42f02 Add a pipeline to generate test coverage.
Fixes: #5739

This was SVN commit r24520.
2021-01-07 15:05:24 +00:00
Stan a7b74fc41e Delete unused and deprecated scaffolds.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D3019
This was SVN commit r24519.
2021-01-06 17:23:43 +00:00
wraitii 2d40068cd1 Thread the NetClient session.
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.
2021-01-06 15:26:11 +00:00
wraitii 8ae3c09dc0 Fix renderer crash in GCC 7.5.
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.
2021-01-06 14:56:17 +00:00
Freagarach 58d98c9a5f Fix oversights in recent commits.
- Sounds of macemen (2847eb2a20, 85f46d6d66).
- Kushite healer start unit on (most) skirmish maps (2452e3fb97).
- Fortress tooltips (014c2922f2 and c4eeb82d83).
- Rome siege wall foundations (934025b2fb).
- Removed IshtarGate visible class.
- Move Ishtar Gate of Babylon from Persians (it is Neo-Babylonian)
(1a6f155780).
- Rename `barracks.png` -> `military.png` (c4eeb82d83) and
`ishtar_gate.png` -> `bull.png` icons (refs D2551).
- Insert placeholder icons for free and autoresearched technologies
(D3262#145001).
- Update balancing credits (de3ed2cd19).

Patch by: @Nesio
Differential revision: D3292
This was SVN commit r24515.
2021-01-06 06:45:33 +00:00
Freagarach 284bf20d97 [Gameplay A24] - Change Parade of Daphne tech.
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.
2021-01-06 06:18:22 +00:00
Stan b5243cd574 Fix compilation error on FreeBSD. MAP_NO_RESERVE was never implemented, and as such had no effect there.
Reported by: @madpilot
Refs: https://reviews.llvm.org/D7485, #5255

Differential Revision: https://code.wildfiregames.com/D1594
This was SVN commit r24513.
2021-01-05 19:06:36 +00:00
Stan 0221e70e51 Fix two Clang warnings.
This was SVN commit r24512.
2021-01-05 11:49:24 +00:00
wraitii f34fb5614c Improve behaviour of formations stuck within other units.
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.
2021-01-05 10:12:47 +00:00
Freagarach d28a91b83d Deprecate template_helpers folder.
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.
2021-01-04 14:43:44 +00:00
Stan a24c8419c5 [Gameplay A24] - Add a poisoned status effect to the maurya champion infantry archer
Reviewed by: @borg-
Comments by: @Freagarach
Fixes #5768
Refs: https://code.wildfiregames.com/D3276

Differential Revision: https://code.wildfiregames.com/D3279
This was SVN commit r24508.
2021-01-04 13:50:51 +00:00
Stan bc00a6b8df Replace CLOCK_REALTIME by CLOCK_MONOTONIC as suggested by @janwas.
Add sanity checks
Fixes #5760

Tested by: @wraitii, @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3066
This was SVN commit r24507.
2021-01-04 11:08:19 +00:00
Freagarach 8de6d85127 Allow ejecting single entities from non-owned garrisonHolder when allowed to control all.
Found by @wraitii in D1960.

Differential revision: D3065
This was SVN commit r24505.
2021-01-04 06:31:29 +00:00
wraitii d06ff05fc4 Fix hotkey tooltips not showing the correct keys.
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.
2021-01-03 10:14:07 +00:00
Freagarach c79222cfc0 Fix stable not being able to train war dogs and chariots.
When committing c4eeb82d83 a rebase was missed.

Patch by: @borg-
Differential revision: D3282
This was SVN commit r24503.
2021-01-03 05:35:19 +00:00
Freagarach 3851a48298 Store the garrisonHolder in cmpGarrisonable instead of iterating orders.
Refs. f6c9db33d6, 4fadd75ace
Differential revision: D2376
Comments by: @elexis, @Stan, @wraitii
This was SVN commit r24502.
2021-01-02 07:34:52 +00:00
Freagarach 32583008a0 Combine "EntityCommand" and "AllyEntityCommand".
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.
2021-01-02 07:19:17 +00:00