Commit graph

1261 commits

Author SHA1 Message Date
kleonc
f1420c7cbf TileMap::world_to_map Ensure half offset is added according to the returned value
Decide whether half offset should be added based on the value used for calculating the return value of this method.
2021-05-02 23:34:51 +02:00
Rafał Mikrut
efcb097674 Prevent setting too big or too small Collision Mask and Layer 2021-04-30 17:19:04 +02:00
Rémi Verschelde
8247667a3e
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
Rémi Verschelde
3a0cfd3d85
Merge pull request #47960 from smix8/issue_47334_navagent2d_target_reached 2021-04-27 13:34:48 +02:00
smix8
0b87cb5e3d put distance check to target into function
put distance check to target into function
2021-04-27 11:22:37 +02:00
Rémi Verschelde
1a3d60944f
Merge pull request #47485 from rafallus/fix/rigidbody-crash
Fix crash on RigidBody _direct_state_changed
2021-04-23 16:02:26 +02:00
Rémi Verschelde
bd7a92ec23
Merge pull request #48030 from smix8/issue_47337_broken_navagent2d_callback 2021-04-23 10:13:44 +02:00
rafallus
cfa06f0f76 Unexpose _direct_state_changed in PhysicsBody
Removed _direct_state_changed bindings
Affects 2D and 3D nodes
Callbacks now use Callable
Tests were changed accordingly
2021-04-22 23:20:58 -05:00
Marcel Admiraal
071871b787 Move collision layer and mask into CollisionObject. 2021-04-20 10:38:42 +01:00
Rémi Verschelde
aa677865e3
Merge pull request #47991 from LightningAA/regroup-area-inspector-4.0
`Area[X]D`: Put physics override parameters in their own group and document that areas can be used to influence audio
2021-04-20 09:54:07 +02:00
smix8
a491071c24 Fix broken NavigationAgent2D collision avoidance callbacks
Fix broken NavigationAgent2D collision avoidance callbacks
2021-04-20 01:56:04 +02:00
Lightning_A
80b1a29c46 Put physics override parameters in their own group and document that areas can be used to influence audio 2021-04-18 21:27:06 -06:00
smix8
cd24a63da2 Fix NavigationAgent2D not emitting "target_reached" Signal reliably
Fix NavigationAgent2D not emitting "target_reached" Signal reliably
2021-04-16 22:04:02 +02:00
Nathan Franke
2a8c59c171
Use Array for node configuration warnings
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-04-11 23:25:38 -05:00
Rémi Verschelde
77264e346b
Re-allow playing AnimatedSprite2D without frames
Fixes #47578, partial revert of #47064.
2021-04-05 14:42:21 +02:00
Rafał Mikrut
504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Rémi Verschelde
6fa24729ae
Merge pull request #45571 from aaronfranke/node2d-real_t
Use real_t in 2D nodes
2021-03-23 00:10:53 +01:00
Rémi Verschelde
6608d99291
Merge pull request #47001 from madmiraal/rename-sprite_2d-region_enabled
Rename Sprite.region_enabled getter and setter methods to match properties
2021-03-20 18:36:17 +01:00
Aaron Franke
6811a45b59
Use real_t in non-physics 2D nodes 2021-03-19 13:04:45 -04:00
Rémi Verschelde
0615e55b27
Merge pull request #47064 from jmb462/fix-crash-in-uninitialized-AnimatedSprite2d-play
Fix crash on calling play() in a uninitialized AnimatedSprite2D (Fix #46013)
2021-03-17 15:21:34 +01:00
jmb462
324ab63844 Fix crash on calling play() in a uninitialized AnimatedSprite2D
When AnimatedSprite2D::play() was called before SpriteFrames has been initialized, a crach occurred (issue #46013).

Modification : An error message on null check test has been added to prevent crash.

Fix #46013.
2021-03-17 14:57:04 +01:00
Rémi Verschelde
08ca4184f4
Merge pull request #47024 from groud/navigation
Allow Navigation to be more flexible
2021-03-17 09:18:54 +01:00
Aaron Franke
a94cef0ea0
Move SpriteFrames to its own file in the resources folder 2021-03-16 02:00:47 -04:00
Gilles Roudière
ac7073f586 Allow Navigation to be more flexible 2021-03-15 15:58:59 +01:00
Marcel Admiraal
3dcdb84660 Rename Sprite.region_enabled getter and setter to match properties
Also renames Sprite2D.region_filter_clip property and its setter to
region_filter_clip_enabled and set_region_filter_clip_enabled.
2021-03-14 17:31:49 +00:00
Anshul7sp1
91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
Gilles Roudière
ba1344408f Implement Navigation layers 2021-03-10 11:23:06 +01:00
Gilles Roudière
a9dc53d152 Remove Navigation2D/3D nodes, and move the navigation map to the world resource 2021-03-10 11:23:06 +01:00
Rémi Verschelde
c487f1e854
Merge pull request #46643 from YeldhamDev/hide_all_the_things
Hide more options of disabled properties
2021-03-07 15:12:15 +01:00
fabriceci
af041adb06 add responsive arrows when the size is very small + fix a regression: missing a translation on the line 2021-03-05 22:14:06 +01:00
fabriceci
90ca587281 Highlight collision, correct the size and make the arrow a bit less thick for low-res game 2021-03-05 00:32:49 +01:00
Rémi Verschelde
a3dece960f
Merge pull request #46668 from nekomatata/fix-errors-polygon-2d
Fix errors with invalid CollisionPolygon2D
2021-03-04 20:33:22 +01:00
PouleyKetchoupp
2217e477b9 Fix errors with invalid CollisionPolygon2D
Fixed internal errors when the shape is invalid and made warnings more
descriptive.
2021-03-04 10:44:37 -07:00
Michael Alexsander
4be282a269 Hide more options of disabled properties 2021-03-03 20:51:35 -03:00
Rémi Verschelde
d0e62518a8
Merge pull request #46578 from nekomatata/fix-joint-remove-body-regression
Fix Joint2D/Joint3D node path reset on scene switch
2021-03-03 16:41:37 +01:00
PouleyKetchoupp
2dc5ff0caa Fix Joint2D/Joint3D node path reset on scene switch
When one of the bodies exited the tree, the corresponding node path was
reset instead of just resetting the joint from the physics server. That
was causing the node path to be reset on scene switch when one of the
bodies is under the joint in the scene tree.
2021-03-02 08:24:50 -07:00
Rémi Verschelde
e871b07ed6
Merge pull request #36065 from YeldhamDev/camera2d_helper_editor_only
Make Camera2D's editor helper code only be compiled on editor builds
2021-03-02 15:06:54 +01:00
Michael Alexsander
70304f8633 Hide extra options from various nodes if they're not enabled 2021-03-02 09:25:09 -03:00
Michael Alexsander
f70ccbca52 Make Camera2D's editor helper code only be compiled on editor builds 2021-03-01 14:05:45 -03:00
Kyle
821591a95b Refactored cpu_particles_2d.cpp _notification Method
Refactors the _notification method in cpu_particles_2d.cpp to use a switch statement for readability and to bring it inline with other classes like node.cpp and timer.cpp.
2021-02-28 21:59:01 -05:00
Aaron Franke
548de64742
Use a more specific type for Area2D/3D body signals 2021-02-24 00:05:54 -05:00
kleonc
df49fdd189 Line2D::set_point_position Fail if passed index is out of bounds 2021-02-21 13:50:11 +01:00
Rémi Verschelde
04cb7e638c
Merge pull request #46191 from reduz/refactor-process-mode
Refactor Process Mode
2021-02-19 13:46:50 +01:00
Rémi Verschelde
b84f65f13c
Merge pull request #44737 from KoBeWi/touch_shape_screen_centered_button
Fix shape_centered property in TouchScreenButton
2021-02-19 13:45:23 +01:00
reduz
083aa9b95e Refactor Process Mode
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192

* PauseMode is now ProcessMode, containing the following states:
	```
	PROCESS_MODE_INHERIT, // same as parent node
	PROCESS_MODE_NORMAL, // process only if not paused
	PROCESS_MODE_PAUSE_ONLY, // process only if paused
	PROCESS_MODE_ALWAYS, // process always
	PROCESS_MODE_DISABLED, // never process
	```
* NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree).
* Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-18 20:39:55 -03:00
Rémi Verschelde
a23d7480d2
Merge pull request #41644 from Eoin-ONeill-Yokai/collision_2d_shape_visualization_fix
CollisionShape2D 'Disabled' Visualization Correction
2021-02-18 23:42:02 +01:00
Pedro J. Estébanez
8e128726f0 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
Rémi Verschelde
9d84e3b395
Merge pull request #46151 from ellenhp/fix_spatial_player_play
Fix a pop on play() in AudioStreamPlayer2D and 3D
2021-02-18 10:12:13 +01:00
Ellen Poe
5e1442ad55 Fix pops in play() of both spatial audio players 2021-02-17 19:09:42 -08:00
Ellen Poe
15b8480b2c Return setseek position if one exists in get_playback_position. 2021-02-14 20:41:59 -08:00