Commit graph

1221 commits

Author SHA1 Message Date
lawnjelly
adf14bfdde Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 17:28:31 +00:00
Rémi Verschelde
e00a6d2b71
Merge pull request #56748 from albinaask/Fix-for-#56324 2022-01-13 17:05:16 +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
Albin
21ca1c9cd7 Fixed a number of ",or_greater" for the bug #56324
fix to #56324

Note: CPU_Particles_2d is missing ring emitter
2022-01-13 11:51:24 +01:00
Anilforextra
3fad43acad
Path2D: Check points count before rendering.
(cherry picked from commit b770a4d0ac)
2022-01-12 17:34:21 +01:00
Arnav Vijaywargiya
a51f3f2a58
Fixed incorrect property types
(cherry picked from commit 0c46f73b5e)
2022-01-12 17:28:07 +01:00
Rémi Verschelde
1b0ba42ea1
Merge pull request #55268 from Calinou/gpu-particles-macos-performance-warning 2022-01-12 16:51:31 +01:00
Rémi Verschelde
7249e170f7
Merge pull request #56044 from timothyqiu/position-nodes
[3.x] Improve axis awareness and visibility for Position2D and Position3D
2022-01-11 08:54:52 +01:00
Rémi Verschelde
02d9ac1071
i18n: Sync template with current 3.x codebase
Weblate will now track the state of `3.x` to prepare for the 3.5 release.
2022-01-07 13:30:21 +01:00
fabriceci
10e63b8dd6 backport moving_platform_apply_velocity_on_leave 2022-01-07 12:54:49 +01:00
Haoyu Qiu
e97cae86b8 Add missing break in NavigationObstacle2D 2022-01-06 21:23:53 +08:00
Wilson E. Alvarez
4106f95f30
Expose autotile_coord parameter in TileMap.set_cellv 2022-01-05 21:24:35 -05:00
Hugo Locurcio
299d277c9c
Warn when using GPU-based particles on macOS due to low performance
On macOS, Particles rendering is much slower than CPUParticles
due to transform feedback being implemented on the CPU instead
of the GPU.
2022-01-06 00:10:32 +01:00
Jake Young
09bc9eb101
Backport NavigationServer with RVO2 to 3.x
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
Haoyu Qiu
2bff705e13 Improve axis awareness and visibility for Position2D and Position3D
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-12-18 12:53:24 +08:00
Anilforextra
9351bc4b1c
Fixed awkwardly named AnimatedSprite Setters.
(cherry picked from commit 0c06ed98fb)
2021-12-10 17:57:39 +01:00
Raffaele Picca
6dd593d579 Random initial color for all Particle Nodes 2021-12-10 16:35:25 +01:00
Rémi Verschelde
e82091db51
Merge pull request #55782 from RPicster/3.x-gpu-particle-vis-rect 2021-12-10 13:50:45 +01:00
Raffaele Picca
995408b492 GPU Particles (2D + 3D) visibility rect / gizmo optimization for reduced visual clutter 2021-12-10 11:22:44 +01:00
Rémi Verschelde
76ab82526a
Merge pull request #54650 from tinmanjuggernaut/fix_rid 2021-12-09 22:00:24 +01:00
Raffaele Picca
28a6d32971 Fixed texture animation speed when using random lifetime 2021-12-09 19:59:24 +01:00
Cory Petkovsek
3d20218dae Clears RIDs wherever they are freed by VisualServer or PhysicsServer and possibly reused. Fixes #53374 2021-12-10 02:31:30 +08:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Rémi Verschelde
3be0f85e91
Merge pull request #54377 from lawnjelly/faster_editor_lines 2021-11-30 13:30:02 +01:00
Eric
850ee9d4a2
Fix condition on 'jump to limits' logic
This is a fix for: #54856

(cherry picked from commit 7257bb6ad0)
2021-11-29 16:14:04 +01:00
Rémi Verschelde
86fd7da7a3
Merge pull request #54899 from clayjohn/MultiMesh-update 2021-11-22 08:30:49 +01:00
clayjohn
b54d4a93be Update CanvasItem when MultiMesh instance transform changes 2021-11-21 12:27:22 -08:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
BrunoSXS
8fd0fe3d20
Fixes a game crash caused by instantiating Camera2D and sending a notification from it before adding it to the tree.
(cherry picked from commit eb2deabffe)
2021-11-18 12:21:28 +01:00
Rémi Verschelde
6c0afa470e
Merge pull request #54435 from robfram/hidden-tile-map-light-occlusion 2021-11-15 23:29:04 +01:00
PouleyKetchoupp
1560c8b5aa Fix test_move reporting collision when touching another body
Reporting rest collision information is needed for move_and_collide and
move_and_slide so floor detection can be done properly, but in the case
of just testing the motion for collision, it makes sense to return false
if the body is able to move all along the path without being stopped.

Updated the logic in test_move and clarified the documentation for
test_move and move_and_collide.
2021-11-10 11:07:32 -07:00
PouleyKetchoupp
b93aeec4a2 Fix errors in KinematicBody when floor is destroyed or removed
In all physics servers, body_get_direct_state() now silently returns
nullptr when the body has been already freed or is removed from space,
so the client code can detect this state and invalidate the body rid.

In 2D, there is no change in behavior (just no more errors).

In 3D, the Bullet server returned a valid direct body state when the
body was removed from the physics space, but in this case it didn't
make sense to use the information from the body state.
2021-11-09 15:15:40 -07:00
Pedro J. Estébanez
4dba25b3ff Add property value pinning 2021-11-08 17:42:27 +01:00
PouleyKetchoupp
ec0dc93083
Fix errors with invalid bone node path in Polygon2D
NodePath properties are designed to be relative to the given node, so
validity checks are failing in the editor for Polygon2D nodes, which are
relative to the Skeleton2D node rather than the Polygon2D node.

Fixed by saving bone paths as String properties instead of NodePath.

Shouldn't cause a difference for performance since NodePath properties
are technically saved as String anyway.

(cherry picked from commit 8d9619ad46)
2021-11-03 17:31:10 +01:00
robfram
cf9220b7d5 Only visible TileMaps should add light occluders 2021-10-30 23:15:07 +02:00
lawnjelly
ab76cd6ff2 Faster editor line drawing - Path2D and draw_line
Changes the Path2D drawing to use POLYLINE instead of thick lines.
Add a path to translate thick lines (that are not using anti-aliasing) to draw as polygons instead. This should be faster because polygons can be batched.
2021-10-29 12:40:24 +01:00
Rémi Verschelde
14ef65e49b
Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde
187f293189
Merge pull request #54154 from bjauny/fix_areanotification 2021-10-27 20:38:55 +02:00
Bastien JAUNY
a6ca61797c Checking validity of world reference before using it. Fix #54094. 2021-10-27 19:32:44 +02:00
Zae
a1b282cc16
Fix unexpected crashes in notification
(cherry picked from commit 924c2078da)
2021-10-25 11:16:59 +02:00
Kemikal1
fa2feb9bec
Change the unreacheable return value of shape_find_owner()
(cherry picked from commit 563d3dbf94)
2021-10-23 11:57:10 +02:00
kobewi
f0dabe4ac5
Fix MeshInstance2D rect
(cherry picked from commit 1a347e9cf3)
2021-10-23 11:54:55 +02:00
Maxime Lapointe
f3002c62b7 Improve area/body_shape_entered/exited signals parameter names and doc
Fix some typoed names from the doc
Add _index to "index" parameters of *_shape_* signals, this is both in doc and in the template. This makes the code, signature and doc easier to understand
Add method to get Node from the _index params of those signals. This was not as easy to find as one would expect. Putting this information where it is needed will help.
2021-10-15 11:28:17 -04:00
Haoyu Qiu
0f18f225ee Fix crash when deleting Camera2D and Viewport assigned to it 2021-10-06 13:41:21 +08:00
Rémi Verschelde
bd7bea2087
Merge pull request #53233 from metinc/fix-animated-sprite-precision-error 2021-10-05 15:23:51 +02:00
kobewi
f9720a9bf2 Add Listener2D 2021-10-05 13:29:59 +02:00
kleonc
e2e149f4df Fix rendering centered odd-size texture in AnimatedSprite/AnimatedSprite3D 2021-10-03 14:15:21 +02:00
Metin Celik
edcb7b8129 Add half frame to floor() 2021-09-29 20:03:07 +02:00
Laurenz Reinthaler
aad01cd0c6 Fix VisibilityEnabler2D throwing a signal error when process_parent or physics_process_parent are enabled 2021-09-24 19:03:10 +02:00