summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_folding.cpp18
-rw-r--r--modules/gdscript/gdscript_parser.cpp4
-rw-r--r--modules/vhacd/SCsub4
-rw-r--r--scene/animation/animation_blend_tree.cpp1
-rw-r--r--scene/animation/animation_tree.cpp14
-rw-r--r--scene/animation/skeleton_ik.cpp2
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--thirdparty/vhacd/src/btConvexHullComputer.cpp13
8 files changed, 38 insertions, 20 deletions
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 77c0f7491e..783a2ce74b 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -112,14 +112,16 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
List<PropertyInfo> plist;
p_node->get_property_list(&plist);
for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
- if (E->get().type == Variant::OBJECT) {
- RES res = p_node->get(E->get().name);
- if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
-
- PoolVector<String> res_unfolds = _get_unfolds(res.ptr());
- resource_folds.push_back(res->get_path());
- resource_folds.push_back(res_unfolds);
- resources.insert(res);
+ if (E->get().usage & PROPERTY_USAGE_EDITOR) {
+ if (E->get().type == Variant::OBJECT) {
+ RES res = p_node->get(E->get().name);
+ if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
+
+ PoolVector<String> res_unfolds = _get_unfolds(res.ptr());
+ resource_folds.push_back(res->get_path());
+ resource_folds.push_back(res_unfolds);
+ resources.insert(res);
+ }
}
}
}
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index ddf880d36c..6ef906b98d 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3500,6 +3500,10 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
_set_error("'class_name' is only valid for the main class namespace.");
return;
}
+ if (self_path.empty()) {
+ _set_error("'class_name' not allowed in built-in scripts.");
+ return;
+ }
if (tokenizer->get_token(1) != GDScriptTokenizer::TK_IDENTIFIER) {
_set_error("'class_name' syntax: 'class_name <UniqueName>'");
diff --git a/modules/vhacd/SCsub b/modules/vhacd/SCsub
index e89a64a68e..11cd5f4743 100644
--- a/modules/vhacd/SCsub
+++ b/modules/vhacd/SCsub
@@ -27,6 +27,10 @@ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_vhacd.Append(CPPPATH=[thirdparty_dir+"/inc"])
env_vhacd.Append(CPPFLAGS=["-DGODOT_ENET"])
+# upstream uses c++11
+if not env.msvc:
+ env_vhacd.Append(CCFLAGS="-std=c++11")
+
env_thirdparty = env_vhacd.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 11ce866690..e9b38ae990 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -363,6 +363,7 @@ AnimationNodeOneShot::AnimationNodeOneShot() {
fade_out = 0.1;
autorestart = false;
autorestart_delay = 1;
+ autorestart_random_delay = 0;
mix = MIX_MODE_BLEND;
sync = false;
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 2f209ed946..13b8ebe12d 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -1302,9 +1302,17 @@ void AnimationTree::_notification(int p_what) {
_clear_caches();
if (last_animation_player) {
- Object *old_player = ObjectDB::get_instance(last_animation_player);
- if (old_player) {
- old_player->disconnect("caches_cleared", this, "_clear_caches");
+ Object *player = ObjectDB::get_instance(last_animation_player);
+ if (player) {
+ player->disconnect("caches_cleared", this, "_clear_caches");
+ }
+ }
+ } else if (p_what == NOTIFICATION_ENTER_TREE) {
+ if (last_animation_player) {
+
+ Object *player = ObjectDB::get_instance(last_animation_player);
+ if (player) {
+ player->connect("caches_cleared", this, "_clear_caches");
}
}
}
diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp
index 88fb2d5bfc..4da3e6ee28 100644
--- a/scene/animation/skeleton_ik.cpp
+++ b/scene/animation/skeleton_ik.cpp
@@ -335,7 +335,7 @@ void SkeletonIK::_validate_property(PropertyInfo &property) const {
if (skeleton) {
- String names;
+ String names("--,");
for (int i = 0; i < skeleton->get_bone_count(); i++) {
if (i > 0)
names += ",";
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 2524af9cfb..05c183275a 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3222,7 +3222,7 @@ Viewport::Viewport() {
gui.tooltip_timer = -1;
//gui.tooltip_timer->force_parent_owned();
- gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.7);
+ gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5);
ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::REAL, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
gui.tooltip = NULL;
diff --git a/thirdparty/vhacd/src/btConvexHullComputer.cpp b/thirdparty/vhacd/src/btConvexHullComputer.cpp
index 5ff3ab917e..15956fc0c4 100644
--- a/thirdparty/vhacd/src/btConvexHullComputer.cpp
+++ b/thirdparty/vhacd/src/btConvexHullComputer.cpp
@@ -3,8 +3,8 @@ Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
@@ -21,11 +21,6 @@ subject to the following restrictions:
#ifdef __GNUC__
#include <stdint.h>
-
-//GODOT ADDITION
-namespace VHACD {
-//
-
#elif defined(_MSC_VER)
typedef __int32 int32_t;
typedef __int64 int64_t;
@@ -54,6 +49,10 @@ typedef unsigned long long int32_t uint64_t;
#include <stdio.h>
#endif
+//GODOT ADDITION
+namespace VHACD {
+//
+
// Convex hull implementation based on Preparata and Hong
// Ole Kniemeyer, MAXON Computer GmbH
class btConvexHullInternal {