1
0
forked from 0ad/0ad
Commit Graph

21881 Commits

Author SHA1 Message Date
5b33d3a76c Removes ShaderProgramPtr argument from DebugRenderer methods.
This was SVN commit r25329.
2021-04-27 19:23:37 +00:00
cd6a554198 Removes GL matrix stack usages from scene rendering.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3894
This was SVN commit r25328.
2021-04-27 18:43:49 +00:00
4718760754 Fix ugly water color in polynesia.xml
This was SVN commit r25327.
2021-04-27 14:09:57 +00:00
66fbc23f2c De-singletonify CConfigDB, make hooks RAII.
CConfigDB is no longer a singleton, and its members are no longer
static.
This makes it possible to have several instances of it, useful for
testing of if we ever want to have different config profiles.

Also updates hooks to delete themselves on destruction, to fit a more
natural RAII pattern. Long-lived objects must take care to destroy hooks
before ConfigDB is reset.

Differential Revision: https://code.wildfiregames.com/D3866
This was SVN commit r25326.
2021-04-27 07:45:40 +00:00
2698cf8ba2 Fixes missing DrawCameraFrustum argument after 5e12424123.
This was SVN commit r25324.
2021-04-26 21:21:13 +00:00
5e12424123 Removes glBegin from scene rendering, removes GL matrix stack dependency from scene rendering.
This was SVN commit r25323.
2021-04-26 21:11:35 +00:00
67948e4229 Fix flag position for barracks.
Refs: #6160

This was SVN commit r25322.
2021-04-26 15:33:54 +00:00
8963786a76 Improve error message for broken quality levels in Actor files.
Differential Revision: https://code.wildfiregames.com/D3887
This was SVN commit r25321.
2021-04-26 14:59:32 +00:00
ad87f1e295 More actor file validation, preventing crashes.
It's currently possible to trigger ENSUREs in the code if loading empty
groups, which is easy enough with LOD and shouldn't happen.

Recover gracefully from these errors instead.

Differential Revision: https://code.wildfiregames.com/D3888
This was SVN commit r25320.
2021-04-26 14:57:13 +00:00
9957ff1b08 Fix broken garrison flag on the athenian temple.xml
Refs: #6160

This was SVN commit r25319.
2021-04-26 14:56:50 +00:00
2e1545ffc4 Fix unused variable warning in a97f7f3917
This was SVN commit r25318.
2021-04-26 08:47:24 +00:00
2086a66340 Adds circle drawing to DebugRenderer.
This was SVN commit r25315.
2021-04-25 21:55:19 +00:00
e90aaf6348 Adds line drawing to DebugRenderer.
This was SVN commit r25314.
2021-04-25 20:48:44 +00:00
Angen
9977c73eb6 Revert 895182cbcb
This was SVN commit r25313.
2021-04-25 13:42:51 +00:00
Angen
895182cbcb Make player entities more visible on minimap
This patch is increasing contrast of player colours used on minimap in
minimap component instead of changing player colours themselves to not
mess with other cases, when they are used.

Differential revision: D3242
Comments by: @vladislavbelov, @ValihrAnt, @Freagarach
This was SVN commit r25312.
2021-04-25 11:05:41 +00:00
Angen
45805043a1 Use better colour in multiplayer lobby for away status
Colour for away status, makes it hard to spot among busy statuses.
Setting more orange colour for this.

Differential revision: D3856
Ref: #6055
Accepted by: @asterix
Comments by: @Langbart
This was SVN commit r25311.
2021-04-25 10:56:57 +00:00
1ccb85d8d7 Unify damage of arrow-shooting structures
- Arrow shooting structures (towers, CC, fortress, camps...) now deal 10
pierce data per arrow, one arrow every 2 second (i.e. 5 pierce DPS).
- Adjust the count of arrows per building accordingly.

This makes these buildings easier to compare.

Accepted By: #balancing, borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D3668
This was SVN commit r25309.
2021-04-24 13:46:36 +00:00
a97f7f3917 Hotloading fix after 76acc4e146
Emplace does not replace existing element, insert_or_assign does.

While at it:
 - Clean up the 'outdated' logic and reuse it for actors
 - When an actor fails to load, return a placeholder. This improves
hotloading of broken actors, and makes Cunit behaviour more predictable.
 - Some minor cleanup

Reported by: Stan
Fixes #6157

Differential Revision: https://code.wildfiregames.com/D3882
This was SVN commit r25308.
2021-04-24 09:39:33 +00:00
f73fa05542 Cache the model-animation bounds more efficiently.
To render models, we need to know the maximum bounds it takes over the
course of an animation. This depends only on the ModelDef and the
AnimationDef (and thus the SkeletonDef).
Currently, we recompute this data for each model, which is inefficient.
Caching it in ModelDef is faster, particularly avoiding lag spikes at
game start on some maps.
The animations are referred by a unique ID to avoid pointer-related
issues. I would have preferred weak_ptr, but that cannot be stably
hashed for now.

While at it, switch to unique_ptr/vectors.

Differential Revision: https://code.wildfiregames.com/D2967
This was SVN commit r25306.
2021-04-23 14:26:59 +00:00
52258ce48b Use the new "Lod" Feature for reins
* Disable "castshadow" on medium quality
* Disable them on low for performance.
* EOL & Mime Type

This was SVN commit r25305.
2021-04-23 09:38:23 +00:00
f3bc024e79 Draws scrollbar above list to have a correct order for Z sorting after a6cb77a204.
Reported By: nwtour
Tested By: nwtour
Differential Revision: https://code.wildfiregames.com/D3881
This was SVN commit r25303.
2021-04-23 06:56:01 +00:00
6f1644aac3 Some translation fixes.
Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3875
Comment by: @vladislavbelov
This was SVN commit r25301.
2021-04-22 07:41:56 +00:00
f4905066ab Reduces number of allocations during error message formatting.
Differential Revision: https://code.wildfiregames.com/D3871
This was SVN commit r25300.
2021-04-22 06:53:03 +00:00
19e055c6e1 Store build time modifier in template.
Instead of hardcoding it in the component.
Allows modders to easily change the value.

Differential revision: https://code.wildfiregames.com/D3792
Comments by: @Angen, @Nescio, @Stan
This was SVN commit r25299.
2021-04-22 06:18:00 +00:00
56aabc1242 Add note about patience on the chat-button and add FAQ-button.
We have a FAQ, that is now pretty up-to-date, so use it.
Also add note that people may want to be more patient when chatting with
us on IRC.

Patch by: @Langbart
Differential revision: D3499
Comment by: @Stan
This was SVN commit r25298.
2021-04-22 04:52:38 +00:00
8332425142 Use the new "Lod" Feature for handgrips
* Disable "castshadow" as they are never much larger than the shields
* Disable them on medium because they are part of the texture
* Disable them on low for performance.
* EOL & Mime Type
* Add a new materials/basic_trans_norm_spec.xml to disable parallax
(while keeping normal and transparency) when not needed and use it for
the handgrips with transparency.

This was SVN commit r25297.
2021-04-21 09:26:23 +00:00
228a2f49e0 Use the new "Lod" Feature for greaves
- Disable "castshadow" as they are never much larger than the legs
- Disable them on medium because they are part of the texture
- Disable them on low for performance.
- Add a missing mesh reported by @wowgetoffyourcellphone the r variant
was used for the l actor
- EOL & Mime Type

- Add a new materials/no_trans_norm_spec.xml to disable parallax (while
keeping normal) when not needed and use it for the greaves.

This was SVN commit r25296.
2021-04-20 21:27:26 +00:00
e2b43b2fbf Fix no idle alarm sound;
Noticed & Tested by: @Langbart
Tweaks by: @Samulis
This was SVN commit r25294.
2021-04-20 17:15:21 +00:00
8d02102885 Fix triggerhelper for 59d0885d68
59d0885d68 made formation take "formation", not "name". This broke
TriggerHelper.

Reported by: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D3873
This was SVN commit r25293.
2021-04-20 09:36:33 +00:00
80e9f2c517 Fix typo in PetraAI's extended entity.
Called the member instead of the function.
Introduced in ea96e81098. Noticed by @Angen.

Differential revision: https://code.wildfiregames.com/D3870
Reviewed by: @Angen
This was SVN commit r25291.
2021-04-19 06:43:50 +00:00
fe991aaa62 Moves cinematic overlay to GUI.
Differential Revision: https://code.wildfiregames.com/D3869
This was SVN commit r25289.
2021-04-18 16:23:10 +00:00
9450cfcbda Move custom JS data structures to globalscripts.
These don't depend on the simulation and can be useful for e.g. the GUI
(the FSM) or map scripts.
Confer also the vector implementation.

Differential revision: D3863
Comment by: @wraitii (agreed with concept)
This was SVN commit r25288.
2021-04-18 08:31:30 +00:00
fb3e9ad96e Play a sound when there are no idle entities.
If there are no idle units and the idle-unit hotkey is pressed there is
now a sound played.
Beneficial when there are already units selected since selection doesn't
change.

Sound courtesy of @Samualis.

Refs. #5360
Based on a patch by: @cpc
Differential revision: https://code.wildfiregames.com/D1692
Comments by: @asterix, @smiley, @Stan, @vladislavbelov
This was SVN commit r25287.
2021-04-18 08:10:00 +00:00
5c51ce2e2f Removes old ARB state.matrix usages.
This was SVN commit r25285.
2021-04-17 23:08:55 +00:00
769b0426a7 Removes unused debug render from ShadowMap.
This was SVN commit r25284.
2021-04-17 22:16:01 +00:00
b7e6811ea6 Removes fixed shader technique from effects.
This was SVN commit r25283.
2021-04-17 22:07:18 +00:00
fd008e11ad Fix some translations.
- Idle builder hotkey 28bd4f0092.
- "Other hotkey"-catagory.
- Tooltipless hotkeys.

Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3862
This was SVN commit r25282.
2021-04-17 07:47:30 +00:00
518fb7eafa Set a stack quota for JS scripts to prevent crashes from infinite loops.
Infinite loop will instead trigger JS exceptions, which will make error
reports much nicer.

Differential Revision: https://code.wildfiregames.com/D3851
This was SVN commit r25280.
2021-04-16 16:49:18 +00:00
89032c4d2b Improvements on 76acc4e146
See 76acc4e146. Follows comments by @vladislavbelov.

Differential Revision: https://code.wildfiregames.com/D3852
This was SVN commit r25279.
2021-04-16 16:04:01 +00:00
924c6ce34e Rework 7ee94f23df
Following comments by @vladislavbelov.

Differential Revision: https://code.wildfiregames.com/D3860
This was SVN commit r25278.
2021-04-16 16:01:30 +00:00
b3e3d1f715 Use a map for the weighted list.
Less object creations at addition time, more intuitive handling.

Differential revision: https://code.wildfiregames.com/D3854
Comments by: @Stan, @wraitii
This was SVN commit r25276.
2021-04-16 07:02:58 +00:00
4329dd90ce Rename Attacking.js-helper to Attack.js and its global to AttackHelper.
16b452cf91#inline-4026

Differential revision: https://code.wildfiregames.com/D3858
Comment by: @wraitii
This was SVN commit r25275.
2021-04-16 06:55:23 +00:00
3184a51787 Add stable to fortress random map.
Replaces a house by a stable.
Since c4eeb82d83 cavalry cannot be trained at the barracks anymore.

Patch by: @Nescio
Differential revision: D3691
This was SVN commit r25274.
2021-04-16 06:26:37 +00:00
2e69526e26 Correct Arthashshastra quotes.
Chanakya was the teacher and minister of Chandragupta Maurya, whereas
Kautilya is the author of the Arthashshastra. While the two are often
equated (out of ignorance or for ideological reasons), they are
different persons, and the first versions of the Arthashshastra were
composed only a few centuries after the Mauryas were gone. See
https://wildfiregames.com/forum/topic/27113-bibliography-and-references-about-ancient-times-book-reviews/?tab=comments#comment-402302
for a more detailed explanation.
This patch therefore:
- changes the author from Chanakya to Kautilya;
- lists the quotes at the correct location in the file (under K instead
of C);
- removes the chapter titles (which depend on the text edition or
translation) and give a more precise location, to make it easier for
people to look up.

For those interested, the Sanskrit is:
KAZ01.4.07 na-iti kauṭilyaḥ | 7 |
KAZ01.4.08 tīkṣṇa.daṇḍo hi bhūtānām udvejanīyo bhavati | 8 |
KAZ01.4.09 mṛdu.daṇḍaḥ paribhūyate | 9 |
KAZ01.4.10 yathā.arha.daṇḍaḥ pūjyate | 10 |
and:
KAZ01.19.01 rājānam utthitam anūttiṣṭhante bhṛtyāḥ | 1 |
KAZ01.19.02 pramādyantam anupramādyanti | 2 |

And the translations in Patrick Olivelle King, Governance, and Law in
Ancient India / Kauṭilya’s Arthaśāstra / A New Annotated Translation
(Oxford 2013) are on p. 69:
7 “No,” says Kauṭilya;
8 “for one who punishes severely terrifies the people,
9 and one who punishes lightly is treated with contempt,
10 whereas one who dispenses appropriate punishment is treated with
respect.
and on p. 92:
1 When the king is energetic, people in his service, in turn, become
energetic;
2 and when he is lethargic, they, in turn, become lethargic.

Patch (and description above) by: @Nescio
Differential revision: https://code.wildfiregames.com/D3598
This was SVN commit r25273.
2021-04-16 06:23:16 +00:00
4a51012442 Adds line drawing to DebugRenderer.
This was SVN commit r25271.
2021-04-15 22:51:25 +00:00
Angen
57e85c195e Fix wrongly placed parameter in 841bf5f2dd
Correctly colour url of invalid mod.

This was SVN commit r25270.
2021-04-15 20:21:47 +00:00
389a5a4379 Removes low-level GL calls from graphics and geometrics primitives and adds DebugRenderer.
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3857
This was SVN commit r25269.
2021-04-15 18:07:01 +00:00
Angen
f1a1cf11d3 Check for replay compatibility when opening summary screen
Summary screen and mainly its statistics can be influenced by mod as
much as replay itself with mod removing or adding classes and trackers
to the game.
Summary screen allows to replay the match without checking
compatibility, that is fine I think if it is prevented to see summary of
incompatible replay in a first place.

Therefore this is adding compatibility check for opening summary of
replay.

Differential revision: D3799
Fixes: #6119
Tested by: @Langbart
This was SVN commit r25268.
2021-04-15 17:19:27 +00:00
Angen
894fc1dd5d Fix EstimateFuturePosition in UnitMotionFlying
Introduced in f737831167

Differential revision: D3855
Fixes: #6141

This was SVN commit r25267.
2021-04-15 17:15:40 +00:00
7ee94f23df Use type_identity to simplify Clamp usage.
Differential Revision: https://code.wildfiregames.com/D3859
This was SVN commit r25266.
2021-04-15 13:01:24 +00:00