1
0
forked from 0ad/0ad
Commit Graph

23149 Commits

Author SHA1 Message Date
aaa95dc00b Minor cleanup in Future and TaskManager
- Remove redundant std::move() calls
- default ctor/dtor in place of empty {}

Patch by: jprahman
Comments by; phosit

Accepted by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4675
This was SVN commit r26916.
2022-06-02 12:59:25 +00:00
f4128208de Fix text alignment handling of spaces around wrapping.
Follows f8d2927748.

There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we
occasionally need to ignore it when considering line-wrapping, because
we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.

The method introduced here uses the SFeedback structure to properly
report it and generalises the checks.

Note that multiples spaces are not collapsed in 0 A.D., and for
consistency the word-separator-collapsing behaviour is ignored.

Comments by: phosit, vlasdislavbelov
Fixes #6551

Differential Revision: https://code.wildfiregames.com/D4662
This was SVN commit r26915.
2022-06-02 12:56:53 +00:00
b5abab5c79 Don't reset wonder victory timer on ally defeat.
Follows d86148defc.
Resetting the wonder time when an ally to the wonder-owner is defeated
seems like double-punishment, and should not happen.

Resetting on explicit diplomacy change remains in Allied victory mode.

Fixes #6527

Reported by: Langbart
Differential Revision: https://code.wildfiregames.com/D4661
This was SVN commit r26914.
2022-06-01 15:44:53 +00:00
7946def863 Fix maps with conquest CC victory conditions.
Rename the file to be consistent with its title.
Also `centre` -> `center` as per the style guide. Reported by @nwtour at
https://code.wildfiregames.com/D3530#171291.

Reported by: @Langbart
Essentially a patch by: @Langbart
Fixes #6548

This was SVN commit r26913.
2022-05-30 15:13:17 +00:00
1d9e6f30b0 Add a new icon for the han siege tower.
Reported by: @Langbart
Fixes #6549

This was SVN commit r26911.
2022-05-30 07:33:39 +00:00
d4e523e0ea Slightly improve the look of the chinese siege tower. Raise the garrison flag. Remove useless unused materials from the daes.
Fixes #6503
Reported by: @Langbart
This was SVN commit r26910.
2022-05-29 21:41:45 +00:00
b9adbbd8be Fix 557fa0312e by adding the js files to the list of dependencies. They were previously found under the gui folder.
Reported by: @Langbart
Fixes #6542

This was SVN commit r26909.
2022-05-28 17:01:42 +00:00
095838da0a Fixes A8 framebuffer format used for LOS interpolation and enables smooth LOS by default.
Tested By: Langbart, mastoras
Differential Revision: https://code.wildfiregames.com/D4654
This was SVN commit r26906.
2022-05-26 16:36:57 +00:00
68d73e1726 Fixes double shader program reloading after dddd599146.
This was SVN commit r26904.
2022-05-25 17:33:54 +00:00
53033ceaa2 Fixes rendering reflections and refractions in case of empty scissors.
This was SVN commit r26902.
2022-05-24 19:15:26 +00:00
a6f60afdc5 Adds instancing support to backend and enables it for minimap.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4650
This was SVN commit r26901.
2022-05-24 07:11:23 +00:00
7cbe8125f7 Delete some unused techs/ auras
detected by @Langbart
Fixes #6544

Differential revision: https://code.wildfiregames.com/D4663
This was SVN commit r26900.
2022-05-23 13:31:47 +00:00
ddb54bfe84 [Gameplay] Let the mauryan worker elephant build again
and also patch the AI by partly reverting 87ec9457c3

based on a patch by @Langbart
Fixes #6309

accepted by : @Freagarach

conceptual agreement from @chrstgtr @borg- @Stan

Differential revision: https://code.wildfiregames.com/D4249
This was SVN commit r26898.
2022-05-22 07:06:59 +00:00
0f99c79dad Fix issues with han siege tower
reported by @Langbart ; Fixes #6503 , also adjusts the footprint to fit
better to the actor

comments by: @Stan
accepted by : @phosit


Differential revision: https://code.wildfiregames.com/D4655
This was SVN commit r26897.
2022-05-21 14:54:01 +00:00
f03f19cfc5 Fix aura tooltips on panel entities.
Removed from the GUI interface in d8ed8b1462, but its uses weren't
checked (or ignored).
(https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/gui/session/session.js;20965$998)

Reported by @Langbart
Based on a patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4648
Fixes #6387

This was SVN commit r26896.
2022-05-20 10:00:31 +00:00
f3d8f1e797 [Gameplay] - Remove min distance from siege towers
While it may be historically correct, it arguably can lead to very
broken looking behavior where siege towers try to get out of the min
range, but fail since the are attacked and end up shifting and turning
around uselessly, which just looks broken.

And since the min distance for siege towers is very small, I doubt that
it will actually change anything about the gamplay.

accepted by : @chrstgtr

Differential revision: https://code.wildfiregames.com/D4657
This was SVN commit r26894.
2022-05-20 07:13:09 +00:00
efc2d39372 Fix a comment and rename the formation angle function to better reflect what it does
wrong comment noticed by: @Silier
accepted by : @Freagarach

Differential revision: https://code.wildfiregames.com/D4658
This was SVN commit r26893.
2022-05-20 07:02:22 +00:00
9a3ae16087 Make ship and siege immune to poison
reported by @Langbart #6526

accepted by :
@Stan
@asterix

Differential revision: https://code.wildfiregames.com/D4656
This was SVN commit r26892.
2022-05-20 06:44:58 +00:00
b2e093d915 Rename the "Han Chinese" to "Han"
Han Chinese is not wrong per se but unnecessary precise.
See the forum discussion here:
https://wildfiregames.com/forum/topic/51306-thread-for-posting-suggestions-for-alpha-26/page/15/#comment-495849
and the usage of "Han" in an article from the metropilitan museeum:
https://www.metmuseum.org/toah/hd/hand/hd_hand.htm

comments by:
@Langbart

accepted by :
@asterix
@Freagarach

Differential revision: https://code.wildfiregames.com/D4659
This was SVN commit r26891.
2022-05-20 06:36:38 +00:00
bb
f8d2927748 Fix an infinite loop when trying to word-wrap
Comments By: Stan, Phosit, s0600204, Langbart, Silier, marder, vladislav
Reviewed By: wraitii
Differential Revision: D4530
fixes #6451

This was SVN commit r26889.
2022-05-17 12:10:56 +00:00
10554eb5b1 Fix RAM amount detection on BSD and macOS.
Tested by: @Mastoras
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4651
This was SVN commit r26888.
2022-05-17 08:08:14 +00:00
d1775169d2 Removes unused a_tangent stream in model water shaders after 779a33ee30.
This was SVN commit r26887.
2022-05-16 16:36:58 +00:00
c0df9b9883 Fix: Han soilder missing gather animation for non-rice grains
accepted by : @Stan

Differential revision: https://code.wildfiregames.com/D4649
This was SVN commit r26886.
2022-05-16 15:00:29 +00:00
9528acfb8c Fix description of water weeding.
Reported by: @azayrahmad at the forums
(https://wildfiregames.com/forum/topic/77911-water-weeding/)
Patch by: @smiley
(https://wildfiregames.com/forum/topic/77911-water-weeding/#comment-498281)
Fixes #6512

This was SVN commit r26885.
2022-05-16 14:45:26 +00:00
f82fc6431b Fix SM compilation on M1, fix cross-compilation.
Fixes 08e7efc76a.
The SM build script worked on its own, but the mac OS libraries script
passes it an unexpected value.
This also fixes cross-compilation arm -> x86.
Harfbuzz is explicitly not used when compiling freetype to avoid
pkgconfig using it.

Reorganize the logic a little bit around architecture handling.

Differential Revision: https://code.wildfiregames.com/D4647
This was SVN commit r26882.
2022-05-15 21:22:49 +00:00
08e7efc76a Allo native builds on Mac OS M1 / Apple Silicon
- Update GMP to a version that supports arm64 darwin
- Patch spidermonkey 78 to build and run on arm64 darwin
- Choose the correct architecture dynamically in build scripts
- Include python workaround that fixes python related errors on
spidermonkey build

Based on a patch by: kumikumi
Based on a patch by: Langbart
Fixes #6474

Differential Revision: https://code.wildfiregames.com/D4607
This was SVN commit r26881.
2022-05-15 06:45:53 +00:00
364894287d Fix 557fa0312e
Forgot to re-add the GUI autostart script after moving it.

This was SVN commit r26880.
2022-05-15 06:36:27 +00:00
557fa0312e Fix non-visual autostart, as well as client/host autostart.
Follows 8eecc39e71.

Piping the autostart through a GUI page is easy but requires using the
GUI in non-visual mode, which is problematic since it's not initialized.
The GUI is not needed, only its ability to load scripts, so this diff
fixes the problem by adding an 'entrypoint' script in the new
`autostart` folder that gets called with this unique ability, setting
things up properly. The mod mod gets a placeholder.

Other changes:
- Fix some issues with networked autostart:
  - Players were not assigned slots.
  - The host didn't actually wait for other players.
- Move gamesettings from `gui/gamesettings/` to `gamesettings/`. This
moves attributes as well.
- Move autostart files from `gui/autostart/` to ` autostart/`. Note that
`gui/autostart/` still exists as it's used in the tutorial button from
the main menu.
- Rename the JSI_VFS functions to be explicitly about their function:
the ability to write and the potential restricted folders.
- Don't require `autostart` when using `--autostart-client` in
non-visual mode.

Starting the autostart client/host has poor UX in some situations, but
improving that feature is beyond the scope of this diff.

Suggestions for future work:
- Some files in gui/common should probably be moved elsewhere
- Template loading code is duplicated
- The gamesetup code still needs work for proper UI/logic separation.

Help & comments by: smiley

Reported by: vladislav / Langbart
Fixes #6513

Differential Revision: https://code.wildfiregames.com/D4628
This was SVN commit r26879.
2022-05-15 06:34:17 +00:00
967f9ea7a3 Fix double 'to' in weeding technology.
Noticed by translator @rodrigo.vegas at Transifex.

This was SVN commit r26878.
2022-05-15 05:27:05 +00:00
eb1febd5c1 Some fixes for the Han stone thrower.
A.k.a. Mangonel.
Adds UnitMotion. Refs. #1718
Adjust footprint.
Rearrange parents.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4608
This was SVN commit r26877.
2022-05-15 05:13:39 +00:00
dec727ce8e Fix missing parentheses in formation turning angle calculation
The function that is calculating the difference between the two angles
is missing some parentheses.

Didn't notice it sooner as it works in 95% of all cases without them,
but sometimes you can see the formation doing a wrong turn.

reviewed by : @Freagarach

Differential revision: https://code.wildfiregames.com/D4626
This was SVN commit r26874.
2022-05-11 15:22:54 +00:00
ed4e07e594 Allow setting the passability class depending on formation members.
Improves pathfinding for the general case (no large entities in a
formation).

Differential revision: https://code.wildfiregames.com/D4605
Comments by: @marder, @Stan, @wraitii
This was SVN commit r26873.
2022-05-11 14:47:16 +00:00
13d701e3d0 Fix maps after ea72437739.
Correctly fetch the civ from the player's Identity.
Also remove the notions of the CivChanged message, since it was
effectively deleted already.

Differential revision: https://code.wildfiregames.com/D4486
Reviewed by: @wraitii
Comments by: @bb, @Silier, @smiley, @Stan, @vladislavbelov
Fixes #6444

This was SVN commit r26872.
2022-05-11 06:04:20 +00:00
1f8705d8f7 Avoids drawing text in GUI if it will be clipped.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4640
This was SVN commit r26870.
2022-05-10 16:32:25 +00:00
dddd599146 Fixes shader program and technique reloading.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4641
This was SVN commit r26869.
2022-05-10 12:54:57 +00:00
ee0fcf2b95 Fix map errors from GetTemplate not being available in the sim
Follows ea72437739. Fixes it by providing a convenience function in the
component Manager that matches the API in the GUI / AI

Refs #6444

Differential Revision: https://code.wildfiregames.com/D4630
This was SVN commit r26867.
2022-05-09 18:13:34 +00:00
69c76acabb Fix crash in non-visual autostart from not loading terrain textures
Fixes 410d2e883a

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D4627
This was SVN commit r26866.
2022-05-09 17:31:00 +00:00
2ccd1ba280 UnitMotion - Fix Clearance serialization and only allow changing passability of formation controllers.
Fixes 5de50c447c

Changing the passability class at runtime breaks some UnitMotion
assumptions in unrecoverable ways and will lead to units getting into
impassable terrain.
Formation controllers can tolerate it since units still check their own
obstruction.
Until some code is added to recover from the above bad case,
de-activated changing passability class for non-formation controllers.

This also fixes serialization issues related to clearance & passability
classes following that diff.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D4629
This was SVN commit r26865.
2022-05-09 17:29:15 +00:00
db8d251a8b Adds XML path of GL shader descriptions to file dependencies.
This was SVN commit r26864.
2022-05-09 10:13:19 +00:00
132058bc04 Fixes RenderDoc captures by calling glGetProgramivARB to get constants only for ARB shaders.
This was SVN commit r26863.
2022-05-09 08:22:21 +00:00
ae54282794 Fixes depth texture sampling in ARB shaders after a87cb6c94d. Fixes #6537
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4639
This was SVN commit r26862.
2022-05-09 07:55:40 +00:00
67e8e28006 Fixes dynamic GL buffer orphaning forgotten in cff79b421a. Fixes #6533
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4638
This was SVN commit r26859.
2022-05-08 22:45:54 +00:00
62e589ab76 Adds renderer backend interface and dummy backend.
Comments By: phosit, Stan
Tested By: Langbart, phosit
Differential Revision: https://code.wildfiregames.com/D4636
This was SVN commit r26858.
2022-05-08 22:02:46 +00:00
c5f71d6b87 Fixes grayscaleFactor usage in Canvas2D ARB shader added in 1f192f1593. Fixes #6536
Tested By: Langbart
This was SVN commit r26857.
2022-05-07 20:57:16 +00:00
5c17a11343 Fixes incorrect type of objectColor in overlay line ARB shader introduced in 34fc883317 and appeared after 04bd96cee0. Fixes #6534
This was SVN commit r26856.
2022-05-07 19:48:35 +00:00
27061d7bd4 Fix slow formation movement on spamclick by increasing instant turn angle to the same value as units.
Having a small instant turn angle apparently makes units (not only
formations) lag when spamclicking.

Patch by: @marder
Differential revision: https://code.wildfiregames.com/D4593
Fixes #6440

This was SVN commit r26855.
2022-05-07 04:47:03 +00:00
b808adcc00 Disables writing depth for decals as they follow terrain and water (if floating) shape. Fixes #6494
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4637
This was SVN commit r26852.
2022-05-05 17:25:20 +00:00
3ed4eaf247 Removes ogl_WarnIfError from regular renderer code.
This was SVN commit r26850.
2022-05-02 21:52:21 +00:00
a493a9f07f Removes ARB switch optimization as it triggers slow down. Fixes #6525
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4635
This was SVN commit r26849.
2022-05-02 21:25:13 +00:00
04bd96cee0 Moves uniform and texture binding to CDeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4631
This was SVN commit r26848.
2022-05-02 20:57:22 +00:00