Merge pull request #62098 from akien-mga/3.x-cherrypicks
Cherry-picks for the 3.x branch (future 3.5) - 24th batch
This commit is contained in:
commit
108792a62d
13 changed files with 40 additions and 16 deletions
|
@ -265,11 +265,19 @@ public:
|
|||
}
|
||||
static _ALWAYS_INLINE_ double wrapf(double value, double min, double max) {
|
||||
double range = max - min;
|
||||
return is_zero_approx(range) ? min : value - (range * Math::floor((value - min) / range));
|
||||
double result = is_zero_approx(range) ? min : value - (range * Math::floor((value - min) / range));
|
||||
if (is_equal_approx(result, max)) {
|
||||
return min;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
static _ALWAYS_INLINE_ float wrapf(float value, float min, float max) {
|
||||
float range = max - min;
|
||||
return is_zero_approx(range) ? min : value - (range * Math::floor((value - min) / range));
|
||||
float result = is_zero_approx(range) ? min : value - (range * Math::floor((value - min) / range));
|
||||
if (is_equal_approx(result, max)) {
|
||||
return min;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// double only, as these functions are mainly used by the editor and not performance-critical,
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
<argument index="2" name="method" type="String" />
|
||||
<argument index="3" name="userdata" type="Variant" default="null" />
|
||||
<description>
|
||||
Callback called at the end of the RVO process.
|
||||
Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name.
|
||||
[b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_map" qualifiers="const">
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
<argument index="2" name="method" type="String" />
|
||||
<argument index="3" name="userdata" type="Variant" default="null" />
|
||||
<description>
|
||||
Callback called at the end of the RVO process.
|
||||
Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name.
|
||||
[b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_map" qualifiers="const">
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
</member>
|
||||
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
|
||||
The node's scale. Unscaled value: [code](1, 1)[/code].
|
||||
[b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
|
||||
</member>
|
||||
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
|
||||
Local [Transform2D].
|
||||
|
|
|
@ -402,8 +402,11 @@
|
|||
<member name="debug/gdscript/warnings/void_assignment" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], enables warnings when assigning the result of a function that returns [code]void[/code] to a variable.
|
||||
</member>
|
||||
<member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default=""Please include this when reporting the bug on https://github.com/godotengine/godot/issues"">
|
||||
Message to be displayed before the backtrace when the engine crashes.
|
||||
<member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default=""Please include this when reporting the bug to the project developer."">
|
||||
Message to be displayed before the backtrace when the engine crashes. By default, this message is only used in exported projects due to the editor-only override applied to this setting.
|
||||
</member>
|
||||
<member name="debug/settings/crash_handler/message.editor" type="String" setter="" getter="" default=""Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"">
|
||||
Editor-only override for [member debug/settings/crash_handler/message]. Does not affect exported projects in debug or release mode.
|
||||
</member>
|
||||
<member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
|
||||
Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging. See also [member physics/common/physics_fps].
|
||||
|
|
|
@ -265,6 +265,7 @@
|
|||
</member>
|
||||
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )">
|
||||
Scale part of the local transformation.
|
||||
[b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
|
||||
</member>
|
||||
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
|
||||
Local space [Transform] of this node, with respect to the parent node.
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
<argument index="0" name="scale" type="Vector2" />
|
||||
<description>
|
||||
Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication.
|
||||
[b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="translated">
|
||||
|
|
|
@ -373,6 +373,7 @@ void EditorPropertyArray::update_property() {
|
|||
prop->set_object_and_property(object.ptr(), prop_name);
|
||||
prop->set_label(itos(i + offset));
|
||||
prop->set_selectable(false);
|
||||
prop->set_use_folding(is_using_folding());
|
||||
prop->connect("property_changed", this, "_property_changed");
|
||||
prop->connect("object_id_selected", this, "_object_id_selected");
|
||||
prop->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
@ -1007,6 +1008,7 @@ void EditorPropertyDictionary::update_property() {
|
|||
} else {
|
||||
EditorPropertyResource *editor = memnew(EditorPropertyResource);
|
||||
editor->setup(object.ptr(), prop_name, "Resource");
|
||||
editor->set_use_folding(is_using_folding());
|
||||
prop = editor;
|
||||
}
|
||||
|
||||
|
|
|
@ -411,7 +411,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
ClassDB::register_class<Performance>();
|
||||
engine->add_singleton(Engine::Singleton("Performance", performance));
|
||||
|
||||
GLOBAL_DEF("debug/settings/crash_handler/message", String("Please include this when reporting the bug on https://github.com/godotengine/godot/issues"));
|
||||
GLOBAL_DEF("debug/settings/crash_handler/message",
|
||||
String("Please include this when reporting the bug to the project developer."));
|
||||
GLOBAL_DEF("debug/settings/crash_handler/message.editor",
|
||||
String("Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"));
|
||||
|
||||
MAIN_PRINT("Main: Parse CMDLine");
|
||||
|
||||
|
@ -1249,7 +1252,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
|
||||
GLOBAL_DEF("display/window/ios/hide_home_indicator", true);
|
||||
GLOBAL_DEF("input_devices/pointing/ios/touch_delay", 0.150);
|
||||
GLOBAL_DEF("input_devices/pointing/ios/touch_delay", 0.15);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("input_devices/pointing/ios/touch_delay",
|
||||
PropertyInfo(Variant::REAL,
|
||||
"input_devices/pointing/ios/touch_delay",
|
||||
PROPERTY_HINT_RANGE, "0,1,0.001"));
|
||||
|
||||
Engine::get_singleton()->set_frame_delay(frame_delay);
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ if (
|
|||
file_contents.find("Program crashed with signal") != -1
|
||||
or file_contents.find("Dumping the backtrace") != -1
|
||||
or file_contents.find("Segmentation fault (core dumped)") != -1
|
||||
or file_contents.find("Aborted (core dumped)") != -1
|
||||
or file_contents.find("terminate called without an active exception") != -1
|
||||
):
|
||||
print("FATAL ERROR: Godot has been crashed.")
|
||||
sys.exit(1)
|
||||
|
|
|
@ -171,6 +171,7 @@ Array GDScriptTextDocument::completion(const Dictionary &p_params) {
|
|||
lsp::CompletionItem item;
|
||||
item.label = option.display;
|
||||
item.data = request_data;
|
||||
item.insertText = option.insert_text;
|
||||
|
||||
switch (option.kind) {
|
||||
case ScriptCodeCompletionOption::KIND_ENUM:
|
||||
|
@ -278,12 +279,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
|
|||
item.documentation = symbol->render();
|
||||
}
|
||||
|
||||
if ((item.kind == lsp::CompletionItemKind::Method || item.kind == lsp::CompletionItemKind::Function) && !item.label.ends_with("):")) {
|
||||
item.insertText = item.label + "(";
|
||||
if (symbol && symbol->children.empty()) {
|
||||
item.insertText += ")";
|
||||
}
|
||||
} else if (item.kind == lsp::CompletionItemKind::Event) {
|
||||
if (item.kind == lsp::CompletionItemKind::Event) {
|
||||
if (params.context.triggerKind == lsp::CompletionTriggerKind::TriggerCharacter && (params.context.triggerCharacter == "(")) {
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
item.insertText = quote_style + item.label + quote_style;
|
||||
|
|
|
@ -1004,8 +1004,8 @@ struct CompletionItem {
|
|||
dict["label"] = label;
|
||||
dict["kind"] = kind;
|
||||
dict["data"] = data;
|
||||
dict["insertText"] = insertText;
|
||||
if (resolved) {
|
||||
dict["insertText"] = insertText;
|
||||
dict["detail"] = detail;
|
||||
dict["documentation"] = documentation.to_json();
|
||||
dict["deprecated"] = deprecated;
|
||||
|
|
|
@ -65,8 +65,9 @@ void RvoAgent::dispatch_callback() {
|
|||
return;
|
||||
}
|
||||
Object *obj = ObjectDB::get_instance(callback.id);
|
||||
if (obj == nullptr) {
|
||||
if (!obj) {
|
||||
callback.id = ObjectID(0);
|
||||
return;
|
||||
}
|
||||
|
||||
Variant::CallError responseCallError;
|
||||
|
|
Loading…
Reference in a new issue