Commit Graph

37 Commits

Author SHA1 Message Date
lawnjelly
78b9753e37 Object::call() prevent debug lock accessing dangling pointer
Self deleting an object within a call was leading to crashes due to referencing freed memory, due to a raw pointer stored in the debug lock.

Co-authored-by: RandomShaper <pedrojrulez@gmail.com>
2024-09-20 09:02:15 +02:00
c7ac1db971 Clang format everything. 2024-07-16 21:23:54 +02:00
0bdb0ccac8 Don't access a Message's memory after calling it's destructor in MessageQueue. (Even though the way the code works currently this was not really a bug, but it can easily become one.) 2024-06-18 10:38:58 +02:00
bruvzg
620b30a86a Backport locale selection improvements. 2024-04-06 12:37:02 +02:00
60eb59ab19 Backpoered from Godot 4: Add is_built_in() method to Resource.
- KoBeWi
e393c2a734
2024-03-08 21:16:16 +01:00
2b57397fa7 Backported PROPERTY_USAGE_ARRAY from Godot 4. Reused one of the old deprecated property usage flags for it.
Original commit:
Implement properties arrays in the Inspector.
- groud
4bd7700e89
2024-03-02 22:35:19 +01:00
bd53556507 Use bitshifts for all property usage flags. 2024-03-02 19:36:29 +01:00
8c06dce33f Now PROPERTY_HINT_BUTTON adds the property's name as the called method's first parameter. 2024-02-25 22:09:25 +01:00
3da74f0703 Added get_global_class_name method to Script. Now GDScriptParser uses this first to determine global class names, instead of parsing the script file again. 2024-02-13 20:09:46 +01:00
Bastien JAUNY
15cccb331f Fix unitialized variables in core 2024-02-08 13:43:25 +01:00
Angad Kambli
341f89b10c Check parameter validity in Object::set_script
Fixes #46120.

(cherry picked from commit 9c6c2f09e07e65f7819920c4954a7fd54b37d3f6)
2023-12-20 22:20:51 +01:00
99621357a0 File copyright header updates pt4. 2023-12-17 22:50:00 +01:00
22ec1be9b3 File copyright header updates pt3. 2023-12-17 22:42:34 +01:00
191e9e152e Added quote_style argument to get_argument_options(). 2023-12-10 16:02:08 +01:00
0a9c9ca15e Ported godot pr: [3.x] Allow exporting custom resources from/to any scripting language (GDScript, VisualScript, C#, NativeScript, PluginScript)
- willnationsdev
https://github.com/godotengine/godot/pull/44879
Using the rebased version from 02d1f70ee5 by Atlinx
2023-09-06 01:45:29 +02:00
65d4c57233 Added translate_to() method to TranslationServer, and trt() method to Object. This let's you transalte strings into specific (noon app wide) locales. 2023-08-29 22:02:31 +02:00
Simon Barkehanai
12eba08f8c Fix infinite loop on EOF in the command line debugger
When using the command line debugger (godot -d) on Unix systems, when
entering an EOF (ctrl+D), the debugger enters an infinite loop.

Adding a check for EOF in the debugger loop exits the debugger when EOF
is entered.

Fixes #50170.

(cherry picked from commit 4ecad8dea30859a5acbac41fe0e647c7bb6a53cc)
2023-08-27 12:14:55 +02:00
834cbe8cef Ported: Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
- lawnjelly
43e181a00a
2023-07-11 16:07:36 +02:00
1a5cba555c Backported godot4 PR: Support threads in the script debugger
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.
This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
- reduz
PR 76582
Will be available here after it's merged:
6b176671c4
2023-06-14 14:43:55 +02:00
d4175f9676 Ported parts of : Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.
This is the first steps towards implementing godotengine/godot-proposals#6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
- reduz
98c655ec8d
- Only got the smaller improvements, and the thread safety for Node and SceneTree. I'm planning to implement a similar system, but I have a different way of doing it in mind.
2023-06-12 21:13:26 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
lawnjelly
176c0adc6a MessageQueue - Fix max usage performance statistic
Fixes to keep track of the maximum usage over time, rather than current usage.
2023-05-01 12:31:43 +02:00
31f61225a2 Ported: Make MessageQueue growable
* Uses simple vector resizing (po2)
* Uses pair of read and write buffers
- lawnjelly
5f1e7e6fbc
2023-04-15 12:06:16 +02:00
c356806ebf Ported: Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
- Paulb23
bc4cee4458
2023-02-21 01:30:59 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
91c50d4bea Never print an error message in Object::get_meta(). 2022-12-22 19:58:58 +01:00
b8009c85f4 Ported: Add vector value linking - KoBeWi and timothyqiu
9499ebecee
2022-12-22 18:50:17 +01:00
Micky
6ca2dc959b Rename set_indexed & get_child's params to be clearer
3.x backport of #67300 and #64463.
2022-11-13 00:27:45 +01:00
lawnjelly
98c32bb3e7 Improve signal already connected error message
The signal already connected message is improved to provide the names of the objects involved.
2022-10-08 16:34:51 +02:00
88d6ef51eb Removed additional direct script rpc mode query when sending rpcs, in order to simplify that codepath as much as possible. Also removed the remote, remotesync etc. keywords from gdscript, as now they won't work anymore. Node's rpc_config() method should be used instead of marking methods with keywords in scripts. 2022-08-19 01:19:33 +02:00
4c4e19223e Added _theme_ infix to the theme helper methods in Control. 2022-08-17 20:57:16 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
686663d3e4 Moved around more classes in core. 2022-08-17 16:01:01 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00