Commit graph

127 commits

Author SHA1 Message Date
Emmanuel Leblond
94fe2dd31e
Fix Godot returned status code on unexpected error 2021-02-25 18:39:29 +01:00
PouleyKetchoupp
d94cd42ccd Added option in project settings to draw Shape2D outlines
Disabling collision outlines can be useful for performance when the game
is running and many collision shapes are displayed.
2021-02-25 07:48:33 -07:00
Hugo Locurcio
aacaad5066
Draw an outline for 2D debug collision shapes
This makes them easier to distinguish, especially when used
in a TileMap.

The default color's opacity has been slightly decreased to account
for the new outline.
2021-02-21 17:55:54 +01:00
Pedro J. Estébanez
745c711289 Implement pause-aware picking
This adds a new project setting (`physics/common/enable_pause_aware_picking`). It's disabled by default.

When enabled, it changes the way 2D & 3D physics picking behaves in relation to pause:
- When pause is set, every collision object that is hovered or captured (3D only) is released from that condition, getting the relevant mouse-exit callback., unless its pause mode makes it immune from pause.
- During the pause. picking only considers collision objects immune from pause, sending input events and enter/exit callbacks to them as expected.
- When pause is left, nothing happens. This is a big difference with the classic behavior, which at this point would process all the input events that have been queued against the current state of the 2D/3D world (in other words, checking them against the current position of the objects instead of those at the time of the events).
2021-02-08 20:48:13 +01:00
Rémi Verschelde
49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Rémi Verschelde
c43b2ab603
Merge pull request #42942 from Calinou/add-viewport-debanding-3.2
Add a debanding property to Viewport for GLES3
2020-10-30 11:47:57 +01:00
Hugo Locurcio
3499799cb3
Improve the font oversampling warning messages to be more descriptive 2020-10-27 12:27:41 +01:00
Hugo Locurcio
2dbc329704
Add a debanding property to Viewport for GLES3
It can be enabled in the Project Settings
(`rendering/quality/filters/use_debanding`). It's disabled
by default as it has a small performance impact and can make
PNG screenshots much larger (due to how dithering works).

As a result, it should be enabled only when banding is noticeable enough.

Since debanding requires a HDR viewport to work, it's only supported
in the GLES3 backend.
2020-10-20 19:07:15 +02:00
Hugo Locurcio
af45c97652
Add fast approximate antialiasing (FXAA) to Viewport
This backports FXAA from the `master` branch.

Co-authored-by: Clay John <claynjohn@gmail.com>
2020-10-20 14:54:52 +02:00
Hugo Locurcio
ad4e80f2fa
Recommend restarting after changing the reflection atlas size or HDR
This closes #42687.
2020-10-10 17:04:00 +02:00
Rémi Verschelde
6472e09a85 SceneTree: Abort change_scene if we're quitting
Otherwise we can have a segmentation fault if we try to call
`add_child` on an already freed node.

Fixes #35323.
2020-01-19 22:08:40 +01:00
Rémi Verschelde
eb89254690 Fix crash when confirming dialogs with Return key
Regression from #34040, apparently making this a const reference
introduces issues (not sure why, but previous code worked fine).

Fixes #34691.

Co-authored-by: dankan1890 <mewuidev2@gmail.com>
2020-01-17 12:47:23 +01:00
Hugo Locurcio
cc626acf45
Add a shorthand for setting the exit code using SceneTree::quit()
This reduces the amount of code required to exit a process with a
non-zero exit code. This pattern is also found in most other
programming languages.
2020-01-03 11:41:46 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Holger Dammertz
1b9c2ec92e Rename External MSAA to AndroidVR MSAA
A new external MSAA setting was introduced in https://github.com/godotengine/godot/pull/33518
that fixed issues on GLES2 and Oculus Mobile VR. To avoid misunderstanding it was suggested
by @BastiaanOlij and discussed on discord to rename it to AndroidVR.
2019-11-16 15:36:43 +01:00
Bastiaan Olij
4e2343160c Add special external MSAA modes for GLES2 Rift S/Quest and OpenXR optimisation 2019-11-11 21:02:06 +11:00
Erik
8b0546d93b Implement game camera override
Implemented uniform API in Viewport class to override 2D and/or
3D camera.

Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.

Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.

Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
2019-10-23 02:51:32 +01:00
PouleyKetchoupp
1a9801f700 Fixed leak on exit when using yield with SceneTreeTimer
Use case:
yield(get_tree().create_timer(2), "timeout")

Some resources were never released because the SceneTreeTimer was keeping a reference to GDScriptFunctionState in its signal connections, while GDScriptFunctionState was holding a reference to the SceneTreeTimer object. Cleaning all signal connections on game exit fixes the issue.

Fixes #29946
2019-10-19 18:45:17 +02:00
qarmin
616ab4fac2 Small fixes to redundand code, copy paste bugs 2019-10-14 11:40:55 +02:00
Rémi Verschelde
7e3dcf54ea
Merge pull request #30919 from nekomatata/timer-update-transform-fix
Fix GPU particle transform delay when created on SceneTree timer timeout
2019-10-01 06:54:09 +02:00
fhuya
a7712cc9e4 Add new events and accompanying logic to notify when the app is paused and resumed on Android devices. 2019-09-19 13:29:49 -07:00
Fabio Alessandrelli
768d637a1b
Merge pull request #31870 from JFonS/add_network_profiler
Add network profiler
2019-09-05 16:34:36 +02:00
jfons
8244f535cd Add network profiler 2019-09-05 09:48:36 +02:00
Tomasz Chabora
892318f5c7 Add autocomplete support for change_scene() 2019-09-02 19:07:02 +02:00
bruvzg
db6d4352ea
[macOS] Add methods to modify global and dock menus. Add ability to open multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu. 2019-08-26 16:45:49 +03:00
Tomasz Chabora
af5e0fff66 Remove ERR_EXPLAIN from scene/* code 2019-08-09 13:54:52 +02:00
merumelu
dcd551bf78 Remove Editor dependency from SceneTree 2019-08-05 19:46:23 +02:00
PouleyKetchoupp
c6b82f108a Update transforms after timers update to make sure changes are made before render
Fixes #29952
2019-07-29 12:44:16 +02:00
qarmin
aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Rémi Verschelde
21a2cd1a04
Merge pull request #23270 from silvanocerza/remote_scene_tree_filter
Implemented remote scene tree filtering
2019-07-19 15:38:07 +02:00
qarmin
01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
Bojidar Marinov
f7dad789e9
Fix various memory leaks and errors 2019-07-02 17:23:54 +03:00
Bojidar Marinov
0c4c36d823
Add default values to the editor help, docs, and generated RST
Also, make spacing of "=" in the editor help a bit more consistent.
Closes #16086
2019-06-27 18:29:35 +03:00
Rémi Verschelde
6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Silvano Cerza
f23e1aab34 Implemented remote scene tree filtering
User can now filter the remote scene tree, like the local one is filtered, while
the game is running
2019-05-27 17:46:57 +02:00
PouleyKetchoupp
3f174c86d0 Fixed scene tree update after changing node name in tool script 2019-05-24 15:27:22 +02:00
Rémi Verschelde
79040656e1
Merge pull request #27869 from jean-dao/scenetree_call_group
Fix: use function in SceneTree::call_group
2019-04-30 10:55:05 +02:00
Aaron Franke
b659e1eb2b
Use approximate equallity methods in many places 2019-04-25 13:20:29 -04:00
Jean Dao
7240701ec9 Fix: use function in SceneTree::call_group
When calling call_group from C++, the function name is not passed on to
call_group_flags, resulting in first argument being mistakenly used
instead of function.
2019-04-09 22:06:33 +02:00
Juan Linietsky
a18989602b Clean up notifications and merge Node and MainLoop ones for clarity, closes #27614 2019-04-04 10:34:41 -03:00
Hugo Locurcio
355d65aa8d
Fix a font oversampling warning being printed when it shouldn't 2019-01-31 19:49:10 +01:00
Juan Linietsky
c2f59de212 Warn of invalid pointer when converting object to RID, closes #19023 2019-01-26 15:41:26 -03:00
Juan Linietsky
b203f80dfc Rewrite how font oversampling is updated more carefully, fixes #24338 2019-01-26 14:57:17 -03:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
bruvzg
4554c682e6
Changes IME input to use notification instead of callback, exposes IME methods to gdscript/gdnative. 2018-11-23 14:07:48 +02:00
Juan Linietsky
80a90ca824 -Send mouse motion events again to CollisionObjects (Area/Body) if they move, even if mouse does not. Fixes #16536 (likely many others should check)
-Add ability for viewports to set input events as handled locally
2018-11-15 13:56:57 -03:00
Juan Linietsky
37c5aa1084 Add a limit of previously known last element to timer timeout traversal in SceneTree, fixes #15559 2018-11-13 20:11:22 -03:00
Superwaitsum
e5041ad0f5 Add some limits on the Editor Settings 2018-10-24 19:46:33 -05:00
Rémi Verschelde
7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00