summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml55
-rw-r--r--.github/workflows/main.yml20
-rw-r--r--.travis.yml58
-rw-r--r--README.md1
-rw-r--r--core/bind/core_bind.cpp4
-rw-r--r--doc/classes/Control.xml4
-rw-r--r--doc/classes/HTTPClient.xml1
-rw-r--r--doc/classes/HTTPRequest.xml1
-rw-r--r--doc/classes/OS.xml13
-rw-r--r--editor/editor_properties.cpp70
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp14
-rwxr-xr-xmisc/ci/android-tools-linux.sh (renamed from misc/travis/android-tools-linux.sh)0
-rw-r--r--misc/ci/sources.list4
-rwxr-xr-xmisc/travis/ccache-osx.sh43
-rw-r--r--modules/bullet/space_bullet.cpp15
-rw-r--r--scene/gui/tree.cpp8
-rw-r--r--thirdparty/README.md3
-rw-r--r--thirdparty/misc/stb_vorbis.c15
18 files changed, 129 insertions, 200 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644
index 0173657e80..0000000000
--- a/.appveyor.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-image: Visual Studio 2019
-
-platform: x64
-
-environment:
- HOME: "%HOMEDRIVE%%HOMEPATH%"
- PYTHON: C:\Python38
- SCONS_CACHE_ROOT: "%HOME%\\scons_cache"
- SCONS_CACHE_LIMIT: 1024
- OPTIONS: "debug_symbols=no verbose=yes progress=no"
- EXTRA_ARGS: "warnings=all werror=yes"
- matrix:
- - GD_PLATFORM: windows
- TARGET: release_debug
- TOOLS: yes
-# Disabled for performance reasons until master is more stable.
-# - GD_PLATFORM: windows
-# TARGET: release
-# TOOLS: no
-
-matrix:
- fast_finish: true
-
-init:
- - ps: if ($env:APPVEYOR_REPO_BRANCH -ne "master") { $env:APPVEYOR_CACHE_SKIP_SAVE = "true" }
-
-cache:
- - "%SCONS_CACHE_ROOT%"
-
-install:
- - SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- - pip install -U wheel # needed for pip install scons to work, otherwise a flag is missing
- - pip install scons # use stable scons
- - if defined VS call "%VS%" %ARCH% # if defined - so we can also use mingw
-
-before_build:
- - echo %GD_PLATFORM%
- - python --version
- - scons --version
- - set "SCONS_CACHE=%SCONS_CACHE_ROOT%\%APPVEYOR_REPO_BRANCH%"
-
-build_script:
- - scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% %OPTIONS% %EXTRA_ARGS%
-
-after_build:
- - git rev-parse --short=9 HEAD > VERSION_HASH.txt
- - set /P VERSION_HASH= < VERSION_HASH.txt
- - cd bin
- - mv godot.windows.opt.tools.64.exe godot_%APPVEYOR_REPO_BRANCH%-%VERSION_HASH%_win64.exe
- - 7z a -mx9 godot_%APPVEYOR_REPO_BRANCH%-%VERSION_HASH%_win64.zip *.exe
-
-artifacts:
- - path: bin/godot_${APPVEYOR_REPO_BRANCH}-${VERSION_HASH}_win64.zip
- name: Win64 release_debug editor build
- type: zip
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index da597a9706..77554ea0ef 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -87,7 +87,7 @@ jobs:
${{runner.os}}-template
${{runner.os}}
- # Use python 3.x release (works cross platform)
+ # Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
@@ -216,7 +216,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- # install all packages (except scons)
+ # Azure repositories are not reliable, we need to prevent azure giving us packages.
+ - name: Make apt sources.list use the default Ubuntu repositories
+ run: |
+ sudo cp -f misc/ci/sources.list /etc/apt/sources.list
+ sudo apt-get update
+
+ # Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
@@ -267,7 +273,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- # install all packages (except scons)
+ # Azure repositories are not reliable, we need to prevent azure giving us packages.
+ - name: Make apt sources.list use the default Ubuntu repositories
+ run: |
+ sudo cp -f misc/ci/sources.list /etc/apt/sources.list
+ sudo apt-get update
+
+ # Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
@@ -287,7 +299,7 @@ jobs:
${{runner.os}}-template
${{runner.os}}
- # Use python 3.x release (works cross platform)
+ # Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
diff --git a/.travis.yml b/.travis.yml
index 9c085d4ce0..2ade6a1a12 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,6 @@ env:
- SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH
- SCONS_CACHE_LIMIT=1024
- OPTIONS="debug_symbols=no verbose=yes progress=no"
- - secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA="
cache:
directories:
@@ -19,32 +18,6 @@ cache:
matrix:
include:
- - name: Linux editor (debug, GCC 9, with Mono)
- stage: build
- env: PLATFORM=linuxbsd TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes"
- os: linux
- compiler: gcc-9
- addons:
- apt:
- sources:
- - sourceline: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main"
- key_url: "https://raw.githubusercontent.com/travis-ci/apt-source-safelist/master/keys/mono.asc"
- - sourceline: "ppa:ubuntu-toolchain-r/test"
- packages:
- - &gcc9_deps [gcc-9, g++-9]
- - &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
- - &linux_mono_deps [mono-devel, msbuild, nuget]
-
- - name: Linux export template (release, Clang 7)
- stage: build
- env: PLATFORM=linuxbsd TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
- os: linux
- compiler: clang
- addons:
- apt:
- packages:
- - *linux_deps
-
- name: Android export template (release_debug, Clang)
stage: build
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
@@ -55,18 +28,6 @@ matrix:
packages:
- openjdk-8-jdk
- - name: macOS editor (debug, Clang)
- stage: build
- env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra werror=yes"
- os: osx
- osx_image: xcode11.5
- compiler: clang
- addons:
- homebrew:
- packages:
- - scons
- update: true
-
# TODO: iOS MoltenVK support
# - name: iOS export template (debug, Clang)
@@ -80,16 +41,6 @@ matrix:
# packages:
# - scons
- - name: Linux export template (release_debug, GCC 7, without 3D support)
- stage: build
- env: PLATFORM=linuxbsd TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-7 EXTRA_ARGS="disable_3d=yes"
- os: linux
- compiler: gcc
- addons:
- apt:
- packages:
- - *linux_deps
-
- name: JavaScript export template (release, emscripten latest)
stage: build
env: PLATFORM=javascript TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-emcc-latest EXTRA_ARGS="use_closure_compiler=yes"
@@ -113,7 +64,7 @@ install:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH};
java -version;
- misc/travis/android-tools-linux.sh;
+ misc/ci/android-tools-linux.sh;
fi
- if [ "$PLATFORM" = "javascript" ]; then
git clone --depth 1 "https://github.com/emscripten-core/emsdk.git";
@@ -128,9 +79,4 @@ before_script:
fi
script:
- - scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $OPTIONS $EXTRA_ARGS &&
- if [ "$TEST_PROJECT" = "yes" ]; then
- git clone --depth 1 "https://github.com/godotengine/godot-tests.git";
- sed -i "s:custom_template/release=\"\":custom_template/release=\"$(readlink -e bin/godot_server.linuxbsd.opt.tools.64)\":" godot-tests/tests/project_export/export_presets.cfg;
- godot-tests/tests/project_export/test_project.sh "bin/godot_server.linuxbsd.opt.tools.64";
- fi
+ - scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $OPTIONS $EXTRA_ARGS
diff --git a/README.md b/README.md
index f9855beaf6..5cfa10c5dd 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,7 @@ such as text and video tutorials, demos, etc. Consult the [community channels](h
for more info.
[![Travis Build Status](https://travis-ci.org/godotengine/godot.svg?branch=master)](https://travis-ci.org/godotengine/godot)
+[![Actions Build Status](https://github.com/godotengine/godot/workflows/Godot/badge.svg?branch=master)](https://github.com/godotengine/godot/actions)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/bfiihqq6byxsjxxh/branch/master?svg=true)](https://ci.appveyor.com/project/akien-mga/godot)
[![Code Triagers Badge](https://www.codetriage.com/godotengine/godot/badges/users.svg)](https://www.codetriage.com/godotengine/godot)
[![Translate on Weblate](https://hosted.weblate.org/widgets/godot-engine/-/godot/svg-badge.svg)](https://hosted.weblate.org/engage/godot-engine/?utm_source=widget)
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 94da74cbda..2f8b11652b 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1690,7 +1690,7 @@ String _Directory::get_current_dir() {
}
Error _Directory::make_dir(String p_dir) {
- ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
+ ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir(p_dir);
@@ -1701,7 +1701,7 @@ Error _Directory::make_dir(String p_dir) {
}
Error _Directory::make_dir_recursive(String p_dir) {
- ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
+ ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir_recursive(p_dir);
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9dbb843902..1f495bf91a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -856,7 +856,9 @@
The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position.
</member>
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
- The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset].
+ The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
+ [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
</member>
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 76153ae041..7e8f0807ac 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started.
A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
+ [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 0b0d71fccf..61e0d2e2b9 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -64,6 +64,7 @@
add_child(texture_rect)
texture_rect.texture = texture
[/codeblock]
+ [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 105def21ca..238bc970ef 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -112,7 +112,18 @@
<return type="PackedStringArray">
</return>
<description>
- Returns the command line arguments passed to the engine.
+ Returns the command-line arguments passed to the engine.
+ Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments.
+ You can also incorporate environment variables using the [method get_environment] method.
+ You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project.
+ Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments:
+ [codeblock]
+ var arguments = {}
+ for argument in OS.get_cmdline_args():
+ if argument.find("=") > -1:
+ var key_value = argument.split("=")
+ arguments[key_value[0].lstrip("--")] = key_value[1]
+ [/codeblock]
</description>
</method>
<method name="get_connected_midi_inputs">
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index c3f0d1b712..2d50d25ff5 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2980,7 +2980,16 @@ Variant EditorPropertyResource::get_drag_data_fw(const Point2 &p_point, Control
}
bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const {
- String allowed_type = base_type;
+ Vector<String> allowed_types = base_type.split(",");
+ int size = allowed_types.size();
+ for (int i = 0; i < size; i++) {
+ String at = allowed_types[i].strip_edges();
+ if (at == "StandardMaterial3D") {
+ allowed_types.append("Texture2D");
+ } else if (at == "ShaderMaterial") {
+ allowed_types.append("Shader");
+ }
+ }
Dictionary drag_data = p_drag_data;
@@ -2993,9 +3002,9 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const
}
if (res.is_valid()) {
- for (int i = 0; i < allowed_type.get_slice_count(","); i++) {
- String at = allowed_type.get_slice(",", i).strip_edges();
- if (res.is_valid() && ClassDB::is_parent_class(res->get_class(), at)) {
+ for (int i = 0; i < allowed_types.size(); i++) {
+ String at = allowed_types[i].strip_edges();
+ if (ClassDB::is_parent_class(res->get_class(), at)) {
return true;
}
}
@@ -3009,8 +3018,8 @@ bool EditorPropertyResource::_is_drop_valid(const Dictionary &p_drag_data) const
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
if (ftype != "") {
- for (int i = 0; i < allowed_type.get_slice_count(","); i++) {
- String at = allowed_type.get_slice(",", i).strip_edges();
+ for (int i = 0; i < allowed_types.size(); i++) {
+ String at = allowed_types[i].strip_edges();
if (ClassDB::is_parent_class(ftype, at)) {
return true;
}
@@ -3039,24 +3048,49 @@ void EditorPropertyResource::drop_data_fw(const Point2 &p_point, const Variant &
res = drag_data["resource"];
}
- if (res.is_valid()) {
- emit_changed(get_edited_property(), res);
- update_property();
- return;
- }
-
- if (drag_data.has("type") && String(drag_data["type"]) == "files") {
+ if (!res.is_valid() && drag_data.has("type") && String(drag_data["type"]) == "files") {
Vector<String> files = drag_data["files"];
if (files.size() == 1) {
String file = files[0];
- RES file_res = ResourceLoader::load(file);
- if (file_res.is_valid()) {
- emit_changed(get_edited_property(), file_res);
- update_property();
- return;
+ res = ResourceLoader::load(file);
+ }
+ }
+
+ if (res.is_valid()) {
+ bool need_convert = true;
+
+ Vector<String> allowed_types = base_type.split(",");
+ for (int i = 0; i < allowed_types.size(); i++) {
+ String at = allowed_types[i].strip_edges();
+ if (ClassDB::is_parent_class(res->get_class(), at)) {
+ need_convert = false;
+ break;
+ }
+ }
+
+ if (need_convert) {
+ for (int i = 0; i < allowed_types.size(); i++) {
+ String at = allowed_types[i].strip_edges();
+ if (at == "StandardMaterial3D" && ClassDB::is_parent_class(res->get_class(), "Texture2D")) {
+ Ref<StandardMaterial3D> mat = memnew(StandardMaterial3D);
+ mat->set_texture(StandardMaterial3D::TextureParam::TEXTURE_ALBEDO, res);
+ res = mat;
+ break;
+ }
+
+ if (at == "ShaderMaterial" && ClassDB::is_parent_class(res->get_class(), "Shader")) {
+ Ref<ShaderMaterial> mat = memnew(ShaderMaterial);
+ mat->set_shader(res);
+ res = mat;
+ break;
+ }
}
}
+
+ emit_changed(get_edited_property(), res);
+ update_property();
+ return;
}
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 44913abe8b..3c6556a310 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2045,10 +2045,10 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if ((b->get_alt() && !b->get_control()) || tool == TOOL_MOVE) {
List<CanvasItem *> selection = _get_edited_canvas_items();
- // Remove not movable nodes
+ drag_selection.clear();
for (int i = 0; i < selection.size(); i++) {
- if (!_is_node_movable(selection[i], true)) {
- selection.erase(selection[i]);
+ if (_is_node_movable(selection[i], true)) {
+ drag_selection.push_back(selection[i]);
}
}
@@ -2073,7 +2073,6 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
drag_from = transform.affine_inverse().xform(b->get_position());
- drag_selection = selection;
_save_canvas_item_state(drag_selection);
}
return true;
@@ -2395,16 +2394,15 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
// Drag the node(s) if requested
List<CanvasItem *> selection2 = _get_edited_canvas_items();
- // Remove not movable nodes
+ drag_selection.clear();
for (int i = 0; i < selection2.size(); i++) {
- if (!_is_node_movable(selection2[i], true)) {
- selection2.erase(selection2[i]);
+ if (_is_node_movable(selection2[i], true)) {
+ drag_selection.push_back(selection2[i]);
}
}
if (selection2.size() > 0) {
drag_type = DRAG_MOVE;
- drag_selection = selection2;
drag_from = click;
_save_canvas_item_state(drag_selection);
}
diff --git a/misc/travis/android-tools-linux.sh b/misc/ci/android-tools-linux.sh
index 6114551861..6114551861 100755
--- a/misc/travis/android-tools-linux.sh
+++ b/misc/ci/android-tools-linux.sh
diff --git a/misc/ci/sources.list b/misc/ci/sources.list
new file mode 100644
index 0000000000..4d8f94f35c
--- /dev/null
+++ b/misc/ci/sources.list
@@ -0,0 +1,4 @@
+deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
diff --git a/misc/travis/ccache-osx.sh b/misc/travis/ccache-osx.sh
deleted file mode 100755
index 5ce7a80cbc..0000000000
--- a/misc/travis/ccache-osx.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-echo
-echo "Download and install ccache ..."
-echo
-
-echo "Downloading sources ..."
-curl -L -O https://www.samba.org/ftp/ccache/ccache-3.3.4.tar.gz # latest version available here: https://ccache.samba.org/download.html
-
-echo "Extracting to build directory ..."
-tar xzf ccache-3.3.4.tar.gz
-cd ccache-3.3.4
-
-echo "Compiling sources ..."
-./configure --prefix=/usr/local --with-bundled-zlib > /dev/null
-make
-
-echo "Installing ..."
-
-mkdir /usr/local/opt/ccache
-
-mkdir /usr/local/opt/ccache/bin
-cp ccache /usr/local/opt/ccache/bin
-ln -s /usr/local/opt/ccache/bin/ccache /usr/local/bin/ccache
-
-mkdir /usr/local/opt/ccache/libexec
-links=(
- clang
- clang++
- cc
- gcc gcc2 gcc3 gcc-3.3 gcc-4.0 gcc-4.2 gcc-4.3 gcc-4.4 gcc-4.5 gcc-4.6 gcc-4.7 gcc-4.8 gcc-4.9 gcc-5 gcc-6 gcc-7
- c++ c++3 c++-3.3 c++-4.0 c++-4.2 c++-4.3 c++-4.4 c++-4.5 c++-4.6 c++-4.7 c++-4.8 c++-4.9 c++-5 c++-6 c++-7
- g++ g++2 g++3 g++-3.3 g++-4.0 g++-4.2 g++-4.3 g++-4.4 g++-4.5 g++-4.6 g++-4.7 g++-4.8 g++-4.9 g++-5 g++-6 g++-7
-)
-for link in "${links[@]}"; do
- ln -s ../bin/ccache /usr/local/opt/ccache/libexec/$link
-done
-#/usr/local/bin/ccache -M 2G
-cd $TRAVIS_BUILD_DIR
-
-echo
-echo "Done!"
-echo
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 70e137b16d..9dc307c629 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -158,10 +158,6 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
btVector3 bt_motion;
G_TO_B(p_motion, bt_motion);
- if (bt_motion.fuzzyZero()) {
- return false;
- }
-
ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
ERR_FAIL_COND_V(!shape, false);
@@ -180,6 +176,10 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
btTransform bt_xform_to(bt_xform_from);
bt_xform_to.getOrigin() += bt_motion;
+ if ((bt_xform_to.getOrigin() - bt_xform_from.getOrigin()).fuzzyZero()) {
+ return false;
+ }
+
GodotClosestConvexResultCallback btResult(bt_xform_from.getOrigin(), bt_xform_to.getOrigin(), &p_exclude, p_collide_with_bodies, p_collide_with_areas);
btResult.m_collisionFilterGroup = 0;
btResult.m_collisionFilterMask = p_collision_mask;
@@ -982,7 +982,7 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
motionVec->end();
#endif
- for (int shIndex = 0; shIndex < shape_count && !motion.fuzzyZero(); ++shIndex) {
+ for (int shIndex = 0; shIndex < shape_count; ++shIndex) {
if (p_body->is_shape_disabled(shIndex)) {
continue;
}
@@ -1004,6 +1004,11 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
btTransform shape_world_to(shape_world_from);
shape_world_to.getOrigin() += motion;
+ if ((shape_world_to.getOrigin() - shape_world_from.getOrigin()).fuzzyZero()) {
+ motion = btVector3(0, 0, 0);
+ break;
+ }
+
GodotKinClosestConvexResultCallback btResult(shape_world_from.getOrigin(), shape_world_to.getOrigin(), p_body, p_infinite_inertia);
btResult.m_collisionFilterGroup = p_body->get_collision_layer();
btResult.m_collisionFilterMask = p_body->get_collision_mask();
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 47761d724e..eeb7f9430d 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -3419,6 +3419,8 @@ void Tree::scroll_to_item(TreeItem *p_item) {
TreeItem *Tree::_search_item_text(TreeItem *p_at, const String &p_find, int *r_col, bool p_selectable, bool p_backwards) {
TreeItem *from = p_at;
+ TreeItem *loop = nullptr; // Safe-guard against infinite loop.
+
while (p_at) {
for (int i = 0; i < columns.size(); i++) {
if (p_at->get_text(i).findn(p_find) == 0 && (!p_selectable || p_at->is_selectable(i))) {
@@ -3438,6 +3440,12 @@ TreeItem *Tree::_search_item_text(TreeItem *p_at, const String &p_find, int *r_c
if ((p_at) == from) {
break;
}
+
+ if (!loop) {
+ loop = p_at;
+ } else if (loop == p_at) {
+ break;
+ }
}
return nullptr;
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 43cd448a00..392abea85e 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -426,9 +426,8 @@ Collection of single-file libraries used in Godot components.
* License: zlib
- `stb_vorbis.c`
* Upstream: https://github.com/nothings/stb
- * Version: 1.19
+ * Version: 1.20
* License: Public Domain (Unlicense) or MIT
- * Modifications: `f->temp_offset += (sz+3)&~3;` changed to `f->temp_offset += (sz+7)&~7;` (needed until fixed upstream)
## nanosvg
diff --git a/thirdparty/misc/stb_vorbis.c b/thirdparty/misc/stb_vorbis.c
index 52c9c666a2..a8cbfa6c23 100644
--- a/thirdparty/misc/stb_vorbis.c
+++ b/thirdparty/misc/stb_vorbis.c
@@ -1,4 +1,4 @@
-// Ogg Vorbis audio decoder - v1.19 - public domain
+// Ogg Vorbis audio decoder - v1.20 - public domain
// http://nothings.org/stb_vorbis/
//
// Original version written by Sean Barrett in 2007.
@@ -31,9 +31,11 @@
// Phillip Bennefall Rohit Thiago Goulart
// github:manxorist saga musix github:infatum
// Timur Gagiev Maxwell Koo Peter Waller
-// github:audinowho Dougall Johnson
+// github:audinowho Dougall Johnson David Reid
+// github:Clownacy Pedro J. Estebanez Remi Verschelde
//
// Partial history:
+// 1.20 - 2020-07-11 - several small fixes
// 1.19 - 2020-02-05 - warnings
// 1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc warnings etc.
// 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure)
@@ -577,7 +579,7 @@ enum STBVorbisError
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h>
#endif
- #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
+ #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__)
#include <alloca.h>
#endif
#else // STB_VORBIS_NO_CRT
@@ -599,7 +601,9 @@ enum STBVorbisError
#undef __forceinline
#endif
#define __forceinline
+ #ifndef alloca
#define alloca __builtin_alloca
+ #endif
#elif !defined(_MSC_VER)
#if __GNUC__
#define __forceinline inline
@@ -1600,7 +1604,8 @@ static uint32 get_bits(vorb *f, int n)
f->valid_bits += 8;
}
}
- if (f->valid_bits < 0) return 0;
+
+ assert(f->valid_bits >= n);
z = f->acc & ((1 << n)-1);
f->acc >>= n;
f->valid_bits -= n;
@@ -4256,7 +4261,7 @@ static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z)
memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start
if (z) {
p->alloc = *z;
- p->alloc.alloc_buffer_length_in_bytes = (p->alloc.alloc_buffer_length_in_bytes+3) & ~3;
+ p->alloc.alloc_buffer_length_in_bytes &= ~7;
p->temp_offset = p->alloc.alloc_buffer_length_in_bytes;
}
p->eof = 0;