Commit Graph

7306 Commits

Author SHA1 Message Date
kleonc
00ee33b2f9 Fix C# operator *(Transform3D, AABB)
(cherry picked from commit 3bfadeff25)
2024-11-01 18:10:51 -04:00
George L. Albany
a5e575b12a Merge pull request #817 from Spartan322/4.3-fixup/copyright-headers
[4.3] Fix copyright headers referring to Godot
2024-10-27 18:45:17 +00:00
Spartan322
1170ff2a1f Fix copyright headers referring to Godot 2024-10-27 10:42:51 -04:00
Spartan322
9cde444745 Fix GDExtensionAPIDump lacking status_version header
(cherry picked from commit 5fb6d30604)
2024-10-27 09:28:45 -04:00
Spartan322
cb0d3f7aa0 Fix VERSION_FULL_CONFIG ignoring status versioning 2024-10-23 23:23:31 -04:00
Álex Román
03acbef891 Fix Projection::invert on orthogonal projections and others.
Relates to godotengine/godot#68878, specially when using orthographic projection.

Also adds some tests.

Adapted from godotengine/godot#95303

(cherry picked from commit 07730283d3)
2024-10-22 01:48:52 -04:00
Spartan322
834a843c46 Bump version to 4.3-beta.1
Add status_version to version.py
Update Engine.xml example for get_godot_compatible_version_info
2024-10-17 20:44:00 -04:00
Veradictus
bfdef83fbc feat: add maximum traversals to astargrid2d 2024-10-17 15:59:32 -04:00
Spartan322
941a1ad6ae Rebrand preambles to Redot
(cherry picked from commit e8542b06ac)

Credits:
Co-authored-by: Skogi <skogi.b@gmail.com>
Co-authored-by: Spartan322 <Megacake1234@gmail.com>
Co-authored-by: swashberry <swashdev@pm.me>
Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: radenthefolf <radenthefolf@gmail.com>
Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com>
Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com>
Co-authored-by: decryptedchaos <nixgod@gmail.com>
Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com>
Co-authored-by: Mister Puma <MisterPuma80@gmail.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: SingleError <isaaconeoneone@gmail.com>
Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
2024-10-13 15:05:33 -04:00
Trashguy
9901f655fb Rebrand Godot 4.3 to Redot 2024-10-13 15:05:24 -04:00
Pedro J. Estébanez
2c612abdd1 WorkerThreadPool: Fix end-of-yield logic potentially leading to deadlocks
(cherry picked from commit 5dade0e08b)
2024-09-17 09:55:10 +02:00
Pedro J. Estébanez
018f8be3d5 Object: Let debug lock handle callee destruction within call chain gracefully
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
(cherry picked from commit 10e2318bde)
2024-09-17 08:57:45 +02:00
Lisandro Lorea
d92f9017c6 Fix gamepad triggers not working on web exports
Fixes #81758

DisplayServerWeb::process_joypads handles buttons 6 and 7 of the
HTML5 Standard Gamepad as a special case by doing:
`input->joy_axis(idx, (JoyAxis)b, s_btns[b]);`

This doesn't work because there is no JoyAxis 6 or 7 in the enum

To fix this we use JoyAxis::TRIGGER_LEFT and TRIGGER_RIGHT for button 6
and 7

However since we are now lying to input->joy_axis we also need to lie in
the mappings for the standard gamepad in godotcontrollersdb.txt,
otherwise input->joy_axis will try to find a mapping to axis 4(LT) and
axis 5(RT) that's not defined.

Therefore we set lefttrigger to +a4 and righttrigger to +a5 in the
mapping, to match what we are actually sending.

A cleaner, and more involved fix to this would be modifying
input->joy_button so that it can handle analog buttons and map them to
axes preserving their value instead of converting to boolean

(cherry picked from commit 9dd372f316)
2024-09-17 08:57:45 +02:00
Haoyu Qiu
1d790deedb Fix parsing of 4. in Expression
(cherry picked from commit ee9cea521d)
2024-09-17 08:57:44 +02:00
Hristo Iliev
6ab9ec33f2 Add modf function and fix snap behavior
Fixes #96159

(cherry picked from commit fcc8518bce)
2024-09-17 08:57:41 +02:00
MBCX
4acc73dbfa Make sure huf_decompress is only applied to 64-bit x86.
(cherry picked from commit 6b13236956)
2024-09-17 08:57:41 +02:00
Togira
c4351c8d98 Fix RandomPCG::rand_weighted incorrectly returning -1
(cherry picked from commit ab13513403)
2024-09-16 17:23:44 +02:00
voidedWarranties
df522db6f0 Fix virtual binding for ScriptLanguageExtension::_reload_scripts
(cherry picked from commit d65ea6fb9c)
2024-09-16 17:06:44 +02:00
Pedro J. Estébanez
5676d398e0 Avoid potential crash on signal disconnection
(cherry picked from commit 32b7f835d8)
2024-09-16 17:06:19 +02:00
Gergely Kis
bf5907b724 StringName: Use inline static field definitions
Before this change StringName used regular static field
definitions for its mutex, _table, configured and debug_stringname
fields.

Since in the general case the ordering of the static variable and field
initialization and destruction is undefined, it was possible that
the destruction of StringName's static fields happened prior to
the destruction of statically allocated StringName instances.

By changing the static field definitions to inline in string_name.h,
the C++17 standard guarantees the correct initialization and destruction
ordering.

(cherry picked from commit 723878bbab)
2024-09-16 17:05:50 +02:00
Joel Croteau
6e78eec37f Fix reload of GDExtension libraries in framework package on macos
`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.

This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.

This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.

(cherry picked from commit f44d6a235f)
2024-09-16 16:55:39 +02:00
Haoyu Qiu
562e583872 Fix split_floats behavior when spaces are used as separators
(cherry picked from commit f483c3aafa)
2024-09-16 16:40:48 +02:00
bruvzg
fac12603ef [.NET] Move search in files extension list definition to be after Scene level module init.
(cherry picked from commit 69d52ed081)
2024-09-16 16:38:08 +02:00
Pedro J. Estébanez
17ea4b405a ResourceLoader: Fix error on querying progress for uncached loads 2024-08-13 12:41:11 +02:00
Mikael Hermansson
613600fa89 Fix use-after-free in FileAccess::exists 2024-08-09 03:33:51 +02:00
bruvzg
f5bb14dceb [ResourceLoader] Add check to prevent double free crashes. 2024-08-06 08:31:03 +03:00
Hilderin
1ed723bd19 Fix global class cache file not present when no class name 2024-07-31 16:57:25 -04:00
Rémi Verschelde
372b3f8437 Merge pull request #94910 from RandomShaper/res_load_unlocked
ResourceLoader: Let resource setup late steps invoke loading in turn
2024-07-31 11:37:41 +02:00
Pedro J. Estébanez
5640e8adc9 ResourceLoader: Let resource setup late steps invoke loading in turn 2024-07-29 18:13:37 +02:00
Alvin Wong
c9f4436073 Fix use-after-free in WorkerThreadPool 2024-07-29 14:26:48 +02:00
A Thousand Ships
8f3e2c96eb [Core] Fix Variant::construct of Object
Variant type was not updated correctly causing leaks in ref-counted
2024-07-25 12:25:29 +02:00
bruvzg
25f78a5eb6 Replace .NET detection code with ClassDB::class_exists("CSharpScript"). 2024-07-23 23:46:14 +03:00
BlueCube3310
0ed45629fd Support 64-bit image sizes for VRAM compression 2024-07-21 21:06:14 +02:00
Hugo Locurcio
0445ccf428 Fix Image CowData crash when baking large lightmaps
This switches to 64-bit integers in select locations of the Image
class, so that image resolutions of 16384×16384 (used by
lightmap texture arrays) can be used properly. Values that are larger
should also work.

VRAM compression is also supported, although most VRAM-compressed
formats are limited to individual slices of 16384×16384. WebP
is limited to 16383×16383 due to format limitations.
2024-07-19 16:04:30 +02:00
Rémi Verschelde
293c0f7646 Merge pull request #94526 from RandomShaper/wtp_rl_prize_prequel
Batch of fixes for WorkerThreadPool and ResourceLoader (safe set)
2024-07-19 11:11:03 +02:00
Pedro J. Estébanez
28a7a95531 ResourceLoader: Fix sync issues with error reporting
This is about not letting the resource format loader set the error code directly on the task anymore. Instead, it's stored locally and assigned only when it is right to do so.

Otherwise, other tasks may see an error code in the current one before it's state having transitioned to errored. While this, besides the technically true data race, may not be a problem in practice, it causes surprising situations during debugging as it breaks assumptions.
2024-07-19 10:00:41 +02:00
Fabio Alessandrelli
31454423ba [Core] Fix TypedArray encoding when full objects is disabled 2024-07-18 09:58:17 +02:00
Rémi Verschelde
0918fd2a21 Merge pull request #94452 from jamie-pate/fix_73374
Fix game window stops responding when debugger pauses
2024-07-17 15:45:14 +02:00
Rémi Verschelde
31f696cf03 Merge pull request #94373 from maiself/fix-library-path-as-abs
Fix to restore `library_path` as absolute path
2024-07-17 12:24:07 +02:00
Rémi Verschelde
59737bf3f0 Merge pull request #94413 from rburing/fix_action_press_tick
Fix physics tick count in `Input.action_press` and `Input.action_release`
2024-07-17 11:44:31 +02:00
Rémi Verschelde
1d13e95e06 Merge pull request #94307 from Bromeon/feature/bitfield-unsigned-docs
GDExtension docs: Advise bindings to use `uint64_t` for bitfields
2024-07-17 11:43:54 +02:00
Rémi Verschelde
ab67408390 Merge pull request #94238 from RandomShaper/ref_is_now_rc
Make errors on `RefCounted.free()` more accurate
2024-07-17 11:43:32 +02:00
Rémi Verschelde
496fd12b17 Merge pull request #94052 from m4gr3d/clean_input_dispatch_settings
Cleanup Android input on render thread settings
2024-07-17 11:42:52 +02:00
Pedro J. Estébanez
5b5cdf2414 Fixup recent changes to threading concerns
ResourceLoader:
- Fix invalid tokens being returned.
- Remove no longer written `ThreadLoadTask::dependent_path` and the code reading from it.
- Clear deadlock hazard by keeping the mutex unlocked during userland polling.

WorkerThreadPool:
- Include thread call queue override in the thread state reset set, which allows to simplify the code that handled that (imperfectly) in the ResourceLoader.
- Handle the mutex type correctly on entering an allowance zone.

CommandQueueMT:
- Handle the additional possibility of command buffer reallocation that mutex unlock allowance introduces.
2024-07-16 11:03:02 +02:00
Ricardo Buring
b41ec93d63 Fix physics tick count in Input.action_press and Input.action_release
The physics tick count was not yet updated there.
2024-07-16 00:31:44 +02:00
Jan Haller
b2a9ea6d22 GDExtension docs: advise bindings to use uint64_t for bitfields 2024-07-15 22:37:33 +02:00
Pedro J. Estébanez
10b543f8a7 WorkerThreadPool: Fix wrong sync logic breaking task map integrity 2024-07-15 12:15:25 +02:00
Pedro J. Estébanez
62d9ce6445 Re-add resource thread-safety measures
These deferring measures were added to aid threaded resource loading in being safe.

They were removed as seemingly unneeded, but it seems they are needed so resources involved in threaded loading interact with others only after "sync points".
2024-07-15 12:15:22 +02:00
Pedro J. Estébanez
76bfe8e0fd Make errors on RefCounted.free() more accurate 2024-07-15 08:51:42 +02:00
Mai Lavelle
16eea2c837 Fix to restore library_path as absolute path 2024-07-14 20:37:38 -04:00