Commit graph

725 commits

Author SHA1 Message Date
dzil123
b3812750da [3.x] PCKPacker Fix error spam 2022-11-16 06:52:47 -08:00
bruvzg
987723b386
[iOS] Fix build with warnings=extra. 2022-10-31 11:59:31 +02:00
Micky
93943bc1b9 Prevent HTTPRequest from polling invalid client
(cherry picked from commit 9e284f68ec)
2022-09-09 14:17:24 +02:00
Haoyu Qiu
7ed2b09bc0 Fix parsing of XML CDATA and add test cases 2022-09-09 10:16:36 +08:00
Francois Belair
d331e5c7ac Fix binary internal cache not being filled 2022-08-14 12:30:59 -04:00
Rémi Verschelde
8cec1c63c2
Merge pull request #63629 from dsnopek/fix-locale-remap-with-binary-resources-3.x
[3.x] Fix locale resource remapping with binary conversion on export
2022-08-08 20:03:56 +02:00
David Snopek
0cf4ba0d84 Fix locale resource remapping with binary conversion on export 2022-08-08 09:38:39 -05:00
Fabio Alessandrelli
ee5eb943f7 [File] Fix FileAccessCompressed::get_buffer return value.
It used to return the write index instead of the written bytes (i.e.
index + 1) when reading until last block.

(cherry picked from commit e8f7b79bb0)
2022-08-08 09:50:41 +02:00
Rémi Verschelde
0dccbcd7ce
Merge pull request #61878 from bruvzg/backport_locale_select
[3.x] Backport locale selection improvements.
2022-08-05 23:45:17 +02:00
Rémi Verschelde
14c9325b5d
Merge pull request #62408 from Razoric480/raz/fix-no-cache
[3.x] Fix nested resources being cached if no-cache argument used
2022-08-05 23:43:54 +02:00
David Snopek
5eaf83f2d7 Add error messages and docs to explain restrictions when calling NetworkedMultiplayerCustom.initialize() 2022-07-29 13:51:44 -05:00
David Snopek
738e76b710 Add error messages and docs to explain allowed transitions in NetworkedMultiplayerCustom.set_connection_status() 2022-07-29 09:02:53 -05:00
Rémi Verschelde
818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
David Snopek
8ad5889c1a Add NetworkedMultiplayerCustom so high-level multiplayer backends can be added from GDScript 2022-07-19 09:16:41 -05:00
Francois Belair
2ceb93bbef Fix custom res caching sub-res even if no-cache
Fixes #59686, fixes #59752
2022-07-13 11:18:26 -04:00
bruvzg
a8eb779ac3
Backport locale selection improvements. 2022-07-04 11:49:20 +03:00
bruvzg
bea7c9be5d [3.x] Improve embedded PCK loading and exporting. 2022-04-28 11:11:48 +03:00
bruvzg
fd2fba7c2c
Add binary MO translation file support. Add brotli decoder and WOFF2 support.
Use smaller .mo files instead of .po, if gettext is available.
Convert editor fonts to .woff2 format.
2022-03-25 19:51:39 +02:00
Hugo Locurcio
292ad704e6
Increase the maximum number of concurrent DNS queries from 32 to 256
This makes the following error message less likely to be printed
when performing many concurrent HTTP requests:

    Condition ' resolving == IP::RESOLVER_INVALID_ID ' is true. returned: ERR_BUG
2022-03-25 17:13:51 +01:00
Haoyu Qiu
878cf8262a Add context support for editor translation 2022-03-16 15:44:30 +08:00
Hugo Locurcio
824eaabd7b Print every file exported with PCKPacker.flush()s verbose parameter
Previously, only one line per 100 files was printed.

This also refactors the print statement to use Godot methods and
make it more informative overall.

(cherry picked from commit 8e57e5dc6a)
2022-03-02 11:00:26 +01:00
Ricardo Subtil
60f9c0fb42 Fix decompression functions not returning errcodes
(cherry picked from commit 61790a03f5)
2022-02-19 15:50:38 +01:00
Max
273abf5225
Fixed variant decoding Segmentation Fault
(cherry picked from commit 6aede992a9)
2022-02-15 12:30:40 +01:00
Rémi Verschelde
7a16bb2ee4
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.

(cherry picked from commit 1bdb82c64e)
2022-02-11 09:50:59 +01:00
Fabio Alessandrelli
aa3ef20fcb
[Net] Simplify IP resolution code, fix caching.
First, we should not insert into cache if the hostname resolution has
failed (as it might be a temporary internet issue), second, the async
resolver should also properly insert into cache.

Took the chance to remove some duplicate code with critical section in
it at the cost of little performance when calling the blocking
resolve_hostname function.

(cherry picked from commit 49297d937c)
2022-01-31 22:54:25 +01:00
Fabio Alessandrelli
822da984bb
[Net] Fix get_response_body_length for large files.
Parsing was fixed, but not the return value for the exposed getter.

(cherry picked from commit 01e5e98312)
2022-01-25 18:23:04 +01:00
Rémi Verschelde
c938104a88
Merge pull request #56630 from Pineapple/replace-find-last 2022-01-18 16:36:52 +01:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Bartłomiej T. Listwon
22750b1c03 Replace String::find_last with rfind where possible (backward compatible with old API) 2022-01-08 22:40:44 +01:00
bruvzg
6f81a8ee2c
Fix multiple missing UTF-8 decoding.
(cherry picked from commit c69e0d16bc)
2022-01-06 21:44:40 +01:00
Cnidarias
e3292633be
Fix http limitation for large "content-length"
When a request was issued to a server that returned "content-length" header
whose value was greater than that of an "int" we ran into overflow
problems. The fix for this was rather simple by increasing the data
type to `int64_t`

(cherry picked from commit 69a532414c)
2022-01-06 00:21:36 +01:00
Haoyu Qiu
1cada6bfa9 Add proxy support for HTTPClient and the editor
* Adds proxy related methods for `HTTPClient` and `HTTPRequest`
* Adds `network/http_proxy/{host,port}` editor settings
* Makes AssetLib and Export Template Manager proxy aware
2021-12-16 19:38:53 +08:00
Haoyu Qiu
de1cdc2102 Fix potential infinite loop when connecting HTTPClient 2021-11-26 23:43:55 +08:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
Rémi Verschelde
1b65550ec7
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Max Hilbrunner
e29126914d
Save all 64 bits of get_ticks_msec() in more cases
(cherry picked from commit 5dc02eb8b0)
2021-10-26 18:23:31 +02:00
Thakee Nathees
46df39d5e5
i18n: Fix parsing of multiple escapes before quotes
See https://github.com/godotengine/godot/pull/37114#issuecomment-601463765

(cherry picked from commit 8c3ad2af93)
2021-10-07 12:48:23 +02:00
Rémi Verschelde
9729432ec0
i18n: Add support for translating the class reference
- Parse `.po` files from `doc/translations/*.po` like already done
  with `editor/translations/*.po`.
- Add logic to register a doc translation mapping in `TranslationServer`
  and `EditorSettings`.
- Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`).
  Strings are automatically dedented and stripped of whitespace to ensure
  that they would match the translation catalog.
- Use `DTR()` to translate relevant strings in `EditorHelp`,
  `EditorInspector`, `CreateDialog`, `ConnectionsDialog`.
- Small simplification to `TranslationLoaderPO`, the path argument was
  not really meaningful.

(cherry picked from commit 4857648a16)
2021-10-07 12:48:23 +02:00
Rémi Verschelde
df69945f1f
Merge pull request #52714 from m4gr3d/provide_getter_for_project_data_dir_3x 2021-10-05 21:02:41 +02:00
Rémi Verschelde
6bdd84b8d5
Fix -Wextra warnings from GCC 11 2021-09-29 15:23:12 +02:00
Pedro J. Estébanez
26edc6cd41 Promote object validity checks to release builds
Extra:
- Optimized the debug-only check about why the object is null to determine if it's because it has been deleted (the RC is enough; no need to check the ObjectDB).
- Because of the previous point. the debugger being attached is not required anymore for giving the "Object was deleted" error; from now, it only matters that it's a debug build.
- `is_instance_valid()` is now trustworthy. It will return `true` if, and only if, the last object assigned to a `Variant` is still alive (and not if a new object happened to be created at the same memory address of the old one).
- Replacements of `instance_validate()` are used where possible `Variant::is_invalid_object()` is introduced to help with that. (GDScript's `is_instance_valid()` is good.)
2021-09-21 10:39:04 +02:00
Fredia Huya-Kouadio
c8b022c165 Provide a getter for the project data directory. 2021-09-15 13:00:25 -07:00
Haoyu Qiu
25bd0c3f72
Try other resolved IPs if one fails to connect
(cherry picked from commit fd52e18d19)
2021-09-14 14:18:18 +02:00
Haoyu Qiu
e46d54ebec
Quote and escape ConfigFile keys when necessary
(cherry picked from commit 597d489a20)
2021-09-14 13:41:27 +02:00
Fabio Alessandrelli
811ea6ad64
[Net] Fix IP address resolution incorrectly locking the main thread.
This seems to be a pretty old bug, older then originally reported (at
least under certain circumstances).

The IP singleton uses a resolve queue so developers can queue hostnames
for resolution in a separate while keeping the main thread unlocked
(address-resolution OS functions are blocking, and could block for a long
time in case of network disruption).

In most places though, the address resolution function was called with
the mutex locked, causing other functions (querying status, queueing
another hostname, ecc) to block until that resolution ended.

This commit ensures that all calls to OS address resolution are done
with the mutex unlocked.

(cherry picked from commit aca5540e13)
2021-08-03 14:33:42 +02:00
Fabio Alessandrelli
ccbd810934
[Net] Fix Marshalls infinite recursion crash.
Variants like dictionaries and arrays can have cyclic references, which
caused `encode_variant` to run an infinite recursion.
Instead of keeping a stack and looking for cyclic references which would
make serialization slower, this commit adds a `MAX_RECURSION_DEPTH`
constant to Variant, and have `encode_variant` keep track of the current
recursion depth, bailing when it's too high since this likely means a
cyclic reference has been encountered.

(cherry picked from commit 324636473a)
2021-08-03 09:33:24 +02:00
Hugo Locurcio
af3f83407f
Expose an ImportOrder enum in ResourceImporter
This avoids using magic numbers in code.

(cherry picked from commit 7f83977f37)
2021-07-26 13:26:58 +02:00
Kyle
f218e9e929
MultiplayerAPI is_network_server Fails Silently
Removes the error message when the network peer is not valid and returns false instead.

This makes it simpler to make games that are both on/offline by replacing server checks of

'''
if is_instance_valid(get_tree().network_peer) and get_tree().is_network_server():
		# Do server things
'''

with

'''
if get_tree().is_network_server():
		# Do server things
'''

Requires no changes to the docs because both the MultiplayerAPI and SceneTree docs don't mention the error.

(cherry picked from commit 74379b15ff)
2021-07-20 13:05:13 +02:00
Haoyu Qiu
958e1e9ae2
Fix decompression with FastLZ when buffer size is less than 16 bytes
(cherry picked from commit ccf292df38)
2021-07-13 12:13:01 +02:00
Haoyu Qiu
9184f58dc7
Fix unicode invalid skip error in AssetLib
(cherry picked from commit 0caaaf4018)
2021-07-13 10:20:03 +02:00