diff options
-rw-r--r-- | core/dictionary.cpp | 21 | ||||
-rw-r--r-- | core/variant_call.cpp | 8 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 2 | ||||
-rw-r--r-- | doc/classes/Transform.xml | 4 | ||||
-rw-r--r-- | doc/classes/Transform2D.xml | 16 | ||||
-rw-r--r-- | editor/export_template_manager.cpp | 9 | ||||
-rw-r--r-- | editor/project_manager.cpp | 19 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 8 | ||||
-rw-r--r-- | modules/mono/csharp_script.h | 4 | ||||
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 3 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 34 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 3 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 40 | ||||
-rw-r--r-- | scene/2d/camera_2d.cpp | 8 | ||||
-rw-r--r-- | version.py | 4 |
15 files changed, 122 insertions, 61 deletions
diff --git a/core/dictionary.cpp b/core/dictionary.cpp index ae1af86b77..e3f4aa5f28 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -34,15 +34,10 @@ #include "safe_refcount.h" #include "variant.h" -struct _DictionaryVariantHash { - - static _FORCE_INLINE_ uint32_t hash(const Variant &p_variant) { return p_variant.hash(); } -}; - struct DictionaryPrivate { SafeRefCount refcount; - OrderedHashMap<Variant, Variant, _DictionaryVariantHash> variant_map; + OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> variant_map; }; void Dictionary::get_key_list(List<Variant> *p_keys) const { @@ -50,7 +45,7 @@ void Dictionary::get_key_list(List<Variant> *p_keys) const { if (_p->variant_map.empty()) return; - for (OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::Element E = _p->variant_map.front(); E; E = E.next()) { + for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { p_keys->push_back(E.key()); } } @@ -66,7 +61,7 @@ const Variant &Dictionary::operator[](const Variant &p_key) const { } const Variant *Dictionary::getptr(const Variant &p_key) const { - OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::ConstElement E = ((const OrderedHashMap<Variant, Variant, _DictionaryVariantHash> *)&_p->variant_map)->find(p_key); + OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); if (!E) return NULL; @@ -75,7 +70,7 @@ const Variant *Dictionary::getptr(const Variant &p_key) const { Variant *Dictionary::getptr(const Variant &p_key) { - OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::Element E = _p->variant_map.find(p_key); + OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.find(p_key); if (!E) return NULL; @@ -84,7 +79,7 @@ Variant *Dictionary::getptr(const Variant &p_key) { Variant Dictionary::get_valid(const Variant &p_key) const { - OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::ConstElement E = ((const OrderedHashMap<Variant, Variant, _DictionaryVariantHash> *)&_p->variant_map)->find(p_key); + OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); if (!E) return Variant(); @@ -177,7 +172,7 @@ Array Dictionary::keys() const { return varr; int i = 0; - for (OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::Element E = _p->variant_map.front(); E; E = E.next()) { + for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { varr[i] = E.key(); i++; } @@ -193,7 +188,7 @@ Array Dictionary::values() const { return varr; int i = 0; - for (OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::Element E = _p->variant_map.front(); E; E = E.next()) { + for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { varr[i] = E.get(); i++; } @@ -209,7 +204,7 @@ const Variant *Dictionary::next(const Variant *p_key) const { return &_p->variant_map.front().key(); return NULL; } - OrderedHashMap<Variant, Variant, _DictionaryVariantHash>::Element E = _p->variant_map.find(*p_key); + OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.find(*p_key); if (E && E.next()) return &E.next().key(); diff --git a/core/variant_call.cpp b/core/variant_call.cpp index e9f7af3f63..2ca435611b 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1748,10 +1748,10 @@ void register_variant_methods() { ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray()); ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray()); ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray()); - ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, xform, NIL, "v", varray()); - ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, xform_inv, NIL, "v", varray()); - ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform, NIL, "v", varray()); - ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform_inv, NIL, "v", varray()); + ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform, NIL, "v", varray()); + ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform_inv, NIL, "v", varray()); + ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform, VECTOR2, "v", varray()); + ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform_inv, VECTOR2, "v", varray()); ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray()); ADDFUNC0R(BASIS, BASIS, Basis, inverse, varray()); diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index f4d3beab57..7d0856127c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -4,7 +4,7 @@ Contains global variables accessible from everywhere. </brief_description> <description> - Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. + Contains global variables accessible from everywhere. Use "ProjectSettings.get_setting(variable)", "ProjectSettings.set_setting(variable,value)" or "ProjectSettings.has_setting(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. </description> <tutorials> </tutorials> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index c893903b4f..cf1c9ea032 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -143,7 +143,7 @@ <argument index="0" name="v" type="var"> </argument> <description> - Transforms the given vector "v" by this transform. + Transforms the given [Vector3], [Plane], or [AABB] by this transform. </description> </method> <method name="xform_inv"> @@ -152,7 +152,7 @@ <argument index="0" name="v" type="var"> </argument> <description> - Inverse-transforms the given vector "v" by this transform. + Inverse-transforms the given [Vector3], [Plane], or [AABB] by this transform. </description> </method> </methods> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 2a7a8bd97d..e20f48ba14 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -52,18 +52,18 @@ </description> </method> <method name="basis_xform"> - <return type="Transform2D"> + <return type="Vector2"> </return> - <argument index="0" name="v" type="var"> + <argument index="0" name="v" type="Vector2"> </argument> <description> Transforms the given vector by this transform's basis (no translation). </description> </method> <method name="basis_xform_inv"> - <return type="Transform2D"> + <return type="Vector2"> </return> - <argument index="0" name="v" type="var"> + <argument index="0" name="v" type="Vector2"> </argument> <description> Inverse-transforms the given vector by this transform's basis (no translation). @@ -143,21 +143,21 @@ </description> </method> <method name="xform"> - <return type="Transform2D"> + <return type="var"> </return> <argument index="0" name="v" type="var"> </argument> <description> - Transforms the given vector "v" by this transform. + Transforms the given [Vector2] or [Rect2] by this transform. </description> </method> <method name="xform_inv"> - <return type="Transform2D"> + <return type="var"> </return> <argument index="0" name="v" type="var"> </argument> <description> - Inverse-transforms the given vector "v" by this transform. + Inverse-transforms the given [Vector2] or [Rect2] by this transform. </description> </method> </methods> diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 6cbca3f733..c4ecf3c098 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -30,6 +30,8 @@ #include "export_template_manager.h" +#include "core/os/input.h" +#include "core/os/keyboard.h" #include "editor_node.h" #include "editor_scale.h" #include "io/json.h" @@ -422,6 +424,11 @@ void ExportTemplateManager::_http_download_templates_completed(int p_status, int void ExportTemplateManager::_begin_template_download(const String &p_url) { + if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + OS::get_singleton()->shell_open(p_url); + return; + } + for (int i = 0; i < template_list->get_child_count(); i++) { BaseButton *b = Object::cast_to<BaseButton>(template_list->get_child(0)); if (b) { @@ -576,7 +583,7 @@ ExportTemplateManager::ExportTemplateManager() { template_downloader->add_child(vbc); ScrollContainer *sc = memnew(ScrollContainer); sc->set_custom_minimum_size(Size2(400, 200) * EDSCALE); - vbc->add_margin_child(TTR("Select mirror from list: "), sc); + vbc->add_margin_child(TTR("Select mirror from list: (Shift+Click: Open in Browser)"), sc); template_list = memnew(VBoxContainer); sc->add_child(template_list); sc->set_enable_v_scroll(true); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 16605f2ebd..da283b16dc 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -152,7 +152,7 @@ private: return ""; } - } else if (mode == MODE_NEW) { + } else { // check if the specified folder is empty, even though this is not an error, it is good to check here d->list_dir_begin(); @@ -174,13 +174,6 @@ private: get_ok()->set_disabled(true); return ""; } - - } else if (d->file_exists("project.godot")) { - - set_message(TTR("Please choose a folder that does not contain a 'project.godot' file."), MESSAGE_ERROR); - memdelete(d); - get_ok()->set_disabled(true); - return ""; } set_message(""); @@ -531,11 +524,17 @@ public: set_title(TTR("Rename Project")); get_ok()->set_text(TTR("Rename")); name_container->show(); + status_rect->hide(); + msg->hide(); + get_ok()->set_disabled(false); ProjectSettings *current = memnew(ProjectSettings); if (current->setup(project_path->get_text(), "")) { set_message(TTR("Couldn't get project.godot in the project path."), MESSAGE_ERROR); + status_rect->show(); + msg->show(); + get_ok()->set_disabled(true); } else if (current->has_setting("application/config/name")) { project_name->set_text(current->get("application/config/name")); } @@ -543,8 +542,6 @@ public: project_name->call_deferred("grab_focus"); create_dir->hide(); - status_rect->hide(); - msg->hide(); } else { @@ -632,7 +629,7 @@ public: project_path->set_h_size_flags(SIZE_EXPAND_FILL); pphb->add_child(project_path); - // status button + // status icon status_rect = memnew(TextureRect); status_rect->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED); pphb->add_child(status_rect); diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 5bf2a4df35..62f83ee430 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -447,6 +447,7 @@ String CSharpLanguage::_get_indentation() const { Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info() { +#ifdef DEBUG_ENABLED // Printing an error here will result in endless recursion, so we must be careful if (!gdmono->is_runtime_initialized() || !GDMono::get_singleton()->get_api_assembly() || !GDMonoUtils::mono_cache.corlib_cache_updated) @@ -463,8 +464,12 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info() si = stack_trace_get_info(stack_trace); return si; +#else + return Vector<StackInfo>(); +#endif } +#ifdef DEBUG_ENABLED Vector<ScriptLanguage::StackInfo> CSharpLanguage::stack_trace_get_info(MonoObject *p_stack_trace) { // Printing an error here could result in endless recursion, so we must be careful @@ -514,6 +519,7 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::stack_trace_get_info(MonoObjec return si; } +#endif void CSharpLanguage::frame() { @@ -1546,6 +1552,7 @@ bool CSharpScript::_update_exports() { return false; } +#ifdef TOOLS_ENABLED bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p_member, PropertyInfo &r_prop_info, bool &r_exported) { StringName name = p_member->get_name(); @@ -1616,6 +1623,7 @@ bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p return true; } +#endif void CSharpScript::_clear() { diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 3ce8a9b64e..1daa25b74e 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -105,7 +105,9 @@ class CSharpScript : public Script { void _clear(); bool _update_exports(); +#ifdef TOOLS_ENABLED bool _get_member_export(GDMonoClass *p_class, GDMonoClassMember *p_member, PropertyInfo &r_prop_info, bool &r_exported); +#endif CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error); Variant _new(const Variant **p_args, int p_argcount, Variant::CallError &r_error); @@ -335,7 +337,9 @@ public: virtual void *alloc_instance_binding_data(Object *p_object); virtual void free_instance_binding_data(void *p_data); +#ifdef DEBUG_ENABLED Vector<StackInfo> stack_trace_get_info(MonoObject *p_stack_trace); +#endif CSharpLanguage(); ~CSharpLanguage(); diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 37fe52c1d6..62c7a94755 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -1228,8 +1228,7 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf // Generate method { if (p_itype.is_object_type && !p_imethod.is_virtual && !p_imethod.requires_object_call) { - p_output.push_back(MEMBER_BEGIN "private "); - p_output.push_back(p_itype.is_singleton ? "static IntPtr " : "IntPtr "); + p_output.push_back(MEMBER_BEGIN "private static IntPtr "); p_output.push_back(method_bind_field + " = " CS_CLASS_NATIVECALLS "." ICALL_GET_METHODBIND "(" BINDINGS_NATIVE_NAME_FIELD ", \""); p_output.push_back(p_imethod.name); p_output.push_back("\");\n"); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 9e22e8aaac..a2a51f10a7 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1655,7 +1655,7 @@ Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_han PRemoveDllDirectory remove_dll_directory = (PRemoveDllDirectory)GetProcAddress(GetModuleHandle("kernel32.dll"), "RemoveDllDirectory"); bool has_dll_directory_api = ((add_dll_directory != NULL) && (remove_dll_directory != NULL)); - DLL_DIRECTORY_COOKIE cookie; + DLL_DIRECTORY_COOKIE cookie = NULL; if (p_also_set_library_path && has_dll_directory_api) { cookie = add_dll_directory(path.get_base_dir().c_str()); @@ -1663,7 +1663,7 @@ Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_han p_library_handle = (void *)LoadLibraryExW(path.c_str(), NULL, (p_also_set_library_path && has_dll_directory_api) ? LOAD_LIBRARY_SEARCH_DEFAULT_DIRS : 0); - if (p_also_set_library_path && has_dll_directory_api) { + if (cookie) { remove_dll_directory(cookie); } @@ -2211,6 +2211,36 @@ String OS_Windows::get_locale() const { return "en"; } +// We need this because GetSystemInfo() is unreliable on WOW64 +// see https://msdn.microsoft.com/en-us/library/windows/desktop/ms724381(v=vs.85).aspx +// Taken from MSDN +typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS)(HANDLE, PBOOL); +LPFN_ISWOW64PROCESS fnIsWow64Process; + +BOOL is_wow64() { + BOOL wow64 = FALSE; + + fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process"); + + if (fnIsWow64Process) { + if (!fnIsWow64Process(GetCurrentProcess(), &wow64)) { + wow64 = FALSE; + } + } + + return wow64; +} + +int OS_Windows::get_processor_count() const { + SYSTEM_INFO sysinfo; + if (is_wow64()) + GetNativeSystemInfo(&sysinfo); + else + GetSystemInfo(&sysinfo); + + return sysinfo.dwNumberOfProcessors; +} + OS::LatinKeyboardVariant OS_Windows::get_latin_keyboard_variant() const { unsigned long azerty[] = { diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index c24e35e929..7308650695 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -253,6 +253,9 @@ public: virtual String get_executable_path() const; virtual String get_locale() const; + + virtual int get_processor_count() const; + virtual LatinKeyboardVariant get_latin_keyboard_variant() const; virtual void enable_for_stealing_focus(ProcessID pid); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 7a2cbf26bc..eaf72d4dbf 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1862,8 +1862,12 @@ void OS_X11::process_xevents() { e = event; req = &(e.xselectionrequest); - if (req->target == XA_STRING || req->target == XInternAtom(x11_display, "COMPOUND_TEXT", 0) || - req->target == XInternAtom(x11_display, "UTF8_STRING", 0)) { + if (req->target == XInternAtom(x11_display, "UTF8_STRING", 0) || + req->target == XInternAtom(x11_display, "COMPOUND_TEXT", 0) || + req->target == XInternAtom(x11_display, "TEXT", 0) || + req->target == XA_STRING || + req->target == XInternAtom(x11_display, "text/plain;charset=utf-8", 0) || + req->target == XInternAtom(x11_display, "text/plain", 0)) { CharString clip = OS::get_clipboard().utf8(); XChangeProperty(x11_display, req->requestor, @@ -1876,26 +1880,40 @@ void OS_X11::process_xevents() { respond.xselection.property = req->property; } else if (req->target == XInternAtom(x11_display, "TARGETS", 0)) { - Atom data[2]; - data[0] = XInternAtom(x11_display, "UTF8_STRING", 0); - data[1] = XA_STRING; - XChangeProperty(x11_display, req->requestor, req->property, req->target, - 8, PropModeReplace, (unsigned char *)&data, - sizeof(data)); + Atom data[7]; + data[0] = XInternAtom(x11_display, "TARGETS", 0); + data[1] = XInternAtom(x11_display, "UTF8_STRING", 0); + data[2] = XInternAtom(x11_display, "COMPOUND_TEXT", 0); + data[3] = XInternAtom(x11_display, "TEXT", 0); + data[4] = XA_STRING; + data[5] = XInternAtom(x11_display, "text/plain;charset=utf-8", 0); + data[6] = XInternAtom(x11_display, "text/plain", 0); + + XChangeProperty(x11_display, + req->requestor, + req->property, + XA_ATOM, + 32, + PropModeReplace, + (unsigned char *)&data, + sizeof(data) / sizeof(data[0])); respond.xselection.property = req->property; } else { - printf("No String %x\n", - (int)req->target); + char *targetname = XGetAtomName(x11_display, req->target); + printf("No Target '%s'\n", targetname); + if (targetname) + XFree(targetname); respond.xselection.property = None; } + respond.xselection.type = SelectionNotify; respond.xselection.display = req->display; respond.xselection.requestor = req->requestor; respond.xselection.selection = req->selection; respond.xselection.target = req->target; respond.xselection.time = req->time; - XSendEvent(x11_display, req->requestor, 0, 0, &respond); + XSendEvent(x11_display, req->requestor, True, NoEventMask, &respond); XFlush(x11_display); } break; diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index e7e62a197c..d172da5bd9 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -91,8 +91,8 @@ Transform2D Camera2D::get_camera_transform() { if (anchor_mode == ANCHOR_MODE_DRAG_CENTER) { if (h_drag_enabled && !Engine::get_singleton()->is_editor_hint()) { - camera_pos.x = MIN(camera_pos.x, (new_camera_pos.x + screen_size.x * 0.5 * drag_margin[MARGIN_RIGHT])); - camera_pos.x = MAX(camera_pos.x, (new_camera_pos.x - screen_size.x * 0.5 * drag_margin[MARGIN_LEFT])); + camera_pos.x = MIN(camera_pos.x, (new_camera_pos.x + screen_size.x * 0.5 * drag_margin[MARGIN_LEFT])); + camera_pos.x = MAX(camera_pos.x, (new_camera_pos.x - screen_size.x * 0.5 * drag_margin[MARGIN_RIGHT])); } else { if (h_ofs < 0) { @@ -104,8 +104,8 @@ Transform2D Camera2D::get_camera_transform() { if (v_drag_enabled && !Engine::get_singleton()->is_editor_hint()) { - camera_pos.y = MIN(camera_pos.y, (new_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_BOTTOM])); - camera_pos.y = MAX(camera_pos.y, (new_camera_pos.y - screen_size.y * 0.5 * drag_margin[MARGIN_TOP])); + camera_pos.y = MIN(camera_pos.y, (new_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_TOP])); + camera_pos.y = MAX(camera_pos.y, (new_camera_pos.y - screen_size.y * 0.5 * drag_margin[MARGIN_BOTTOM])); } else { diff --git a/version.py b/version.py index 4e502bc318..0eff47acdc 100644 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ short_name = "godot" name = "Godot Engine" major = 3 -minor = 0 -status = "rc3" +minor = 1 +status = "dev" module_config = "" |