diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 20 | ||||
-rw-r--r-- | core/bind/core_bind.h | 5 | ||||
-rw-r--r-- | core/command_queue_mt.cpp | 2 | ||||
-rw-r--r-- | core/command_queue_mt.h | 63 | ||||
-rw-r--r-- | core/engine.cpp | 1 | ||||
-rw-r--r-- | core/engine.h | 14 | ||||
-rw-r--r-- | core/io/image_loader.cpp | 4 | ||||
-rw-r--r-- | core/io/image_loader.h | 4 | ||||
-rw-r--r-- | core/io/marshalls.cpp | 7 | ||||
-rw-r--r-- | core/math/math_funcs.h | 10 | ||||
-rw-r--r-- | core/math/matrix3.cpp | 17 | ||||
-rw-r--r-- | core/script_debugger_remote.cpp | 2 |
12 files changed, 97 insertions, 52 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index e28fa16cfd..a547ead5a1 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2534,11 +2534,6 @@ float _Engine::get_frames_per_second() const { return Engine::get_singleton()->get_frames_per_second(); } -String _Engine::get_custom_level() const { - - return Engine::get_singleton()->get_custom_level(); -} - void _Engine::set_time_scale(float p_scale) { Engine::get_singleton()->set_time_scale(p_scale); } @@ -2568,6 +2563,16 @@ bool _Engine::is_in_fixed_frame() const { return Engine::get_singleton()->is_in_fixed_frame(); } +void _Engine::set_editor_hint(bool p_enabled) { + + Engine::get_singleton()->set_editor_hint(p_enabled); +} + +bool _Engine::is_editor_hint() const { + + return Engine::get_singleton()->is_editor_hint(); +} + void _Engine::_bind_methods() { ClassDB::bind_method(D_METHOD("set_iterations_per_second", "iterations_per_second"), &_Engine::set_iterations_per_second); @@ -2578,8 +2583,6 @@ void _Engine::_bind_methods() { ClassDB::bind_method(D_METHOD("set_time_scale", "time_scale"), &_Engine::set_time_scale); ClassDB::bind_method(D_METHOD("get_time_scale"), &_Engine::get_time_scale); - ClassDB::bind_method(D_METHOD("get_custom_level"), &_Engine::get_custom_level); - ClassDB::bind_method(D_METHOD("get_frames_drawn"), &_Engine::get_frames_drawn); ClassDB::bind_method(D_METHOD("get_frames_per_second"), &_Engine::get_frames_per_second); @@ -2588,6 +2591,9 @@ void _Engine::_bind_methods() { ClassDB::bind_method(D_METHOD("get_version_info"), &_Engine::get_version_info); ClassDB::bind_method(D_METHOD("is_in_fixed_frame"), &_Engine::is_in_fixed_frame); + + ClassDB::bind_method(D_METHOD("set_editor_hint", "enabled"), &_Engine::set_editor_hint); + ClassDB::bind_method(D_METHOD("is_editor_hint"), &_Engine::is_editor_hint); } _Engine *_Engine::singleton = NULL; diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 22d1c2f52f..41653c8846 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -648,14 +648,15 @@ public: void set_time_scale(float p_scale); float get_time_scale(); - String get_custom_level() const; - MainLoop *get_main_loop() const; Dictionary get_version_info() const; bool is_in_fixed_frame() const; + void set_editor_hint(bool p_enabled); + bool is_editor_hint() const; + _Engine(); }; diff --git a/core/command_queue_mt.cpp b/core/command_queue_mt.cpp index 823494ff67..c9edd1d47b 100644 --- a/core/command_queue_mt.cpp +++ b/core/command_queue_mt.cpp @@ -55,6 +55,7 @@ CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() { while (true) { + lock(); for (int i = 0; i < SYNC_SEMAPHORES; i++) { if (!sync_sems[i].in_use) { @@ -63,6 +64,7 @@ CommandQueueMT::SyncSemaphore *CommandQueueMT::_alloc_sync_sem() { break; } } + unlock(); if (idx == -1) { wait_for_flush(); diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h index 2e0c478108..c3e44f731f 100644 --- a/core/command_queue_mt.h +++ b/core/command_queue_mt.h @@ -911,12 +911,14 @@ public: template <class T, class M, class R> void push_and_ret(T *p_instance, M p_method, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet0<T, M, R> *cmd = allocate_and_lock<CommandRet0<T, M, R> >(); cmd->instance = p_instance; cmd->method = p_method; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -928,13 +930,15 @@ public: template <class T, class M, class P1, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet1<T, M, P1, R> *cmd = allocate_and_lock<CommandRet1<T, M, P1, R> >(); cmd->instance = p_instance; cmd->method = p_method; cmd->p1 = p1; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -946,6 +950,8 @@ public: template <class T, class M, class P1, class P2, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet2<T, M, P1, P2, R> *cmd = allocate_and_lock<CommandRet2<T, M, P1, P2, R> >(); cmd->instance = p_instance; @@ -953,7 +959,7 @@ public: cmd->p1 = p1; cmd->p2 = p2; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -965,6 +971,8 @@ public: template <class T, class M, class P1, class P2, class P3, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet3<T, M, P1, P2, P3, R> *cmd = allocate_and_lock<CommandRet3<T, M, P1, P2, P3, R> >(); cmd->instance = p_instance; @@ -973,7 +981,7 @@ public: cmd->p2 = p2; cmd->p3 = p3; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -985,6 +993,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet4<T, M, P1, P2, P3, P4, R> *cmd = allocate_and_lock<CommandRet4<T, M, P1, P2, P3, P4, R> >(); cmd->instance = p_instance; @@ -994,7 +1004,7 @@ public: cmd->p3 = p3; cmd->p4 = p4; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -1006,6 +1016,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet5<T, M, P1, P2, P3, P4, P5, R> *cmd = allocate_and_lock<CommandRet5<T, M, P1, P2, P3, P4, P5, R> >(); cmd->instance = p_instance; @@ -1016,7 +1028,7 @@ public: cmd->p4 = p4; cmd->p5 = p5; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -1028,6 +1040,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet6<T, M, P1, P2, P3, P4, P5, P6, R> *cmd = allocate_and_lock<CommandRet6<T, M, P1, P2, P3, P4, P5, P6, R> >(); cmd->instance = p_instance; @@ -1039,7 +1053,7 @@ public: cmd->p5 = p5; cmd->p6 = p6; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -1051,6 +1065,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet7<T, M, P1, P2, P3, P4, P5, P6, P7, R> *cmd = allocate_and_lock<CommandRet7<T, M, P1, P2, P3, P4, P5, P6, P7, R> >(); cmd->instance = p_instance; @@ -1063,7 +1079,7 @@ public: cmd->p6 = p6; cmd->p7 = p7; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -1075,6 +1091,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class R> void push_and_ret(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, R *r_ret) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandRet8<T, M, P1, P2, P3, P4, P5, P6, P7, P8, R> *cmd = allocate_and_lock<CommandRet8<T, M, P1, P2, P3, P4, P5, P6, P7, P8, R> >(); cmd->instance = p_instance; @@ -1088,7 +1106,7 @@ public: cmd->p7 = p7; cmd->p8 = p8; cmd->ret = r_ret; - SyncSemaphore *ss = _alloc_sync_sem(); + cmd->sync = ss; unlock(); @@ -1100,12 +1118,13 @@ public: template <class T, class M> void push_and_sync(T *p_instance, M p_method) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync0<T, M> *cmd = allocate_and_lock<CommandSync0<T, M> >(); cmd->instance = p_instance; cmd->method = p_method; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1117,13 +1136,14 @@ public: template <class T, class M, class P1> void push_and_sync(T *p_instance, M p_method, P1 p1) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync1<T, M, P1> *cmd = allocate_and_lock<CommandSync1<T, M, P1> >(); cmd->instance = p_instance; cmd->method = p_method; cmd->p1 = p1; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1135,6 +1155,8 @@ public: template <class T, class M, class P1, class P2> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync2<T, M, P1, P2> *cmd = allocate_and_lock<CommandSync2<T, M, P1, P2> >(); cmd->instance = p_instance; @@ -1142,7 +1164,6 @@ public: cmd->p1 = p1; cmd->p2 = p2; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1154,6 +1175,8 @@ public: template <class T, class M, class P1, class P2, class P3> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync3<T, M, P1, P2, P3> *cmd = allocate_and_lock<CommandSync3<T, M, P1, P2, P3> >(); cmd->instance = p_instance; @@ -1162,7 +1185,6 @@ public: cmd->p2 = p2; cmd->p3 = p3; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1174,6 +1196,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync4<T, M, P1, P2, P3, P4> *cmd = allocate_and_lock<CommandSync4<T, M, P1, P2, P3, P4> >(); cmd->instance = p_instance; @@ -1183,7 +1207,6 @@ public: cmd->p3 = p3; cmd->p4 = p4; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1195,6 +1218,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync5<T, M, P1, P2, P3, P4, P5> *cmd = allocate_and_lock<CommandSync5<T, M, P1, P2, P3, P4, P5> >(); cmd->instance = p_instance; @@ -1205,7 +1230,6 @@ public: cmd->p4 = p4; cmd->p5 = p5; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1217,6 +1241,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync6<T, M, P1, P2, P3, P4, P5, P6> *cmd = allocate_and_lock<CommandSync6<T, M, P1, P2, P3, P4, P5, P6> >(); cmd->instance = p_instance; @@ -1228,7 +1254,6 @@ public: cmd->p5 = p5; cmd->p6 = p6; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1240,6 +1265,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync7<T, M, P1, P2, P3, P4, P5, P6, P7> *cmd = allocate_and_lock<CommandSync7<T, M, P1, P2, P3, P4, P5, P6, P7> >(); cmd->instance = p_instance; @@ -1252,7 +1279,6 @@ public: cmd->p6 = p6; cmd->p7 = p7; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); @@ -1264,6 +1290,8 @@ public: template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8> void push_and_sync(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { + SyncSemaphore *ss = _alloc_sync_sem(); + CommandSync8<T, M, P1, P2, P3, P4, P5, P6, P7, P8> *cmd = allocate_and_lock<CommandSync8<T, M, P1, P2, P3, P4, P5, P6, P7, P8> >(); cmd->instance = p_instance; @@ -1277,7 +1305,6 @@ public: cmd->p7 = p7; cmd->p8 = p8; - SyncSemaphore *ss = _alloc_sync_sem(); cmd->sync = ss; unlock(); diff --git a/core/engine.cpp b/core/engine.cpp index c16a2903d3..c8218e47ac 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -121,4 +121,5 @@ Engine::Engine() { _in_fixed = false; _frame_ticks = 0; _frame_step = 0; + editor_hint = false; } diff --git a/core/engine.h b/core/engine.h index 16dfb77593..c46ae1cb64 100644 --- a/core/engine.h +++ b/core/engine.h @@ -39,7 +39,6 @@ class Engine { friend class Main; - String _custom_level; uint64_t frames_drawn; uint32_t _frame_delay; uint64_t _frame_ticks; @@ -51,9 +50,12 @@ class Engine { float _time_scale; bool _pixel_snap; uint64_t _fixed_frames; + uint64_t _idle_frames; bool _in_fixed; + bool editor_hint; + static Engine *singleton; public: @@ -67,8 +69,6 @@ public: virtual float get_frames_per_second() const { return _fps; } - String get_custom_level() const { return _custom_level; } - uint64_t get_frames_drawn(); uint64_t get_fixed_frames() const { return _fixed_frames; } @@ -85,6 +85,14 @@ public: _FORCE_INLINE_ bool get_use_pixel_snap() const { return _pixel_snap; } +#ifdef TOOLS_ENABLED + _FORCE_INLINE_ void set_editor_hint(bool p_enabled) { editor_hint = p_enabled; } + _FORCE_INLINE_ bool is_editor_hint() const { return editor_hint; } +#else + _FORCE_INLINE_ void set_editor_hint(bool p_enabled) {} + _FORCE_INLINE_ bool is_editor_hint() const { return false; } +#endif + Dictionary get_version_info() const; Engine(); diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp index 23719940be..7b5b4a13ea 100644 --- a/core/io/image_loader.cpp +++ b/core/io/image_loader.cpp @@ -43,7 +43,7 @@ bool ImageFormatLoader::recognize(const String &p_extension) const { return false; } -Error ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom, bool p_force_linear) { +Error ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom, bool p_force_linear, float p_scale) { ERR_FAIL_COND_V(p_image.is_null(), ERR_INVALID_PARAMETER); FileAccess *f = p_custom; @@ -62,7 +62,7 @@ Error ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_c if (!loader[i]->recognize(extension)) continue; - Error err = loader[i]->load_image(p_image, f, p_force_linear); + Error err = loader[i]->load_image(p_image, f, p_force_linear, p_scale); if (err != ERR_FILE_UNRECOGNIZED) { diff --git a/core/io/image_loader.h b/core/io/image_loader.h index e528d1423b..f79d9789bf 100644 --- a/core/io/image_loader.h +++ b/core/io/image_loader.h @@ -56,7 +56,7 @@ class ImageFormatLoader { friend class ImageLoader; protected: - virtual Error load_image(Ref<Image> p_image, FileAccess *p_fileaccess, bool p_force_linear) = 0; + virtual Error load_image(Ref<Image> p_image, FileAccess *p_fileaccess, bool p_force_linear, float p_scale) = 0; virtual void get_recognized_extensions(List<String> *p_extensions) const = 0; bool recognize(const String &p_extension) const; @@ -75,7 +75,7 @@ class ImageLoader { protected: public: - static Error load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom = NULL, bool p_force_linear = false); + static Error load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom = NULL, bool p_force_linear = false, float p_scale = 1.0); static void get_recognized_extensions(List<String> *p_extensions); static bool recognize(const String &p_extension); diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index c5d59f786d..e701a89c78 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -807,11 +807,16 @@ static void _encode_string(const String &p_string, uint8_t *&buf, int &r_len) { encode_uint32(utf8.length(), buf); buf += 4; copymem(buf, utf8.get_data(), utf8.length()); + buf += utf8.length(); } r_len += 4 + utf8.length(); - while (r_len % 4) + while (r_len % 4) { r_len++; //pad + if (buf) { + buf++; + } + } } Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_object_as_id) { diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 45509a0808..2ce9a88622 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -153,8 +153,14 @@ public: static _ALWAYS_INLINE_ double rad2deg(double p_y) { return p_y * 180.0 / Math_PI; } static _ALWAYS_INLINE_ float rad2deg(float p_y) { return p_y * 180.0 / Math_PI; } - static _ALWAYS_INLINE_ double lerp(double a, double b, double c) { return a + (b - a) * c; } - static _ALWAYS_INLINE_ float lerp(float a, float b, float c) { return a + (b - a) * c; } + static _ALWAYS_INLINE_ double lerp(double p_from, double p_to, double p_weight) { return p_from + (p_to - p_from) * p_weight; } + static _ALWAYS_INLINE_ float lerp(float p_from, float p_to, float p_weight) { return p_from + (p_to - p_from) * p_weight; } + + static _ALWAYS_INLINE_ double inverse_lerp(double p_from, double p_to, double p_value) { return (p_value - p_from) / (p_to - p_from); } + static _ALWAYS_INLINE_ float inverse_lerp(float p_from, float p_to, float p_value) { return (p_value - p_from) / (p_to - p_from); } + + static _ALWAYS_INLINE_ double range_lerp(double p_value, double p_istart, double p_istop, double p_ostart, double p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); } + static _ALWAYS_INLINE_ float range_lerp(float p_value, float p_istart, float p_istop, float p_ostart, float p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); } static _ALWAYS_INLINE_ double linear2db(double p_linear) { return Math::log(p_linear) * 8.6858896380650365530225783783321; } static _ALWAYS_INLINE_ float linear2db(float p_linear) { return Math::log(p_linear) * 8.6858896380650365530225783783321; } diff --git a/core/math/matrix3.cpp b/core/math/matrix3.cpp index f2f6ff93cf..ec82bd30d4 100644 --- a/core/math/matrix3.cpp +++ b/core/math/matrix3.cpp @@ -365,14 +365,10 @@ Vector3 Basis::get_euler_xyz() const { if (euler.y < Math_PI * 0.5) { if (euler.y > -Math_PI * 0.5) { //if rotation is Y-only, return a proper -pi,pi range like in x or z for the same case. - if (elements[1][0] == 0.0 && elements[0][1] == 0.0 && elements[0][0] < 0.0) { + if (elements[1][0] == 0.0 && elements[0][1] == 0.0 && elements[1][2] == 0 && elements[2][1] == 0 && elements[1][1] == 1) { euler.x = 0; + euler.y = atan2(elements[0][2], elements[0][0]); euler.z = 0; - - if (euler.y > 0.0) - euler.y = Math_PI - euler.y; - else - euler.y = -(Math_PI + euler.y); } else { euler.x = Math::atan2(-elements[1][2], elements[2][2]); euler.z = Math::atan2(-elements[0][1], elements[0][0]); @@ -436,15 +432,10 @@ Vector3 Basis::get_euler_yxz() const { if (m12 < 1) { if (m12 > -1) { - if (elements[1][0] == 0 && elements[0][1] == 0 && elements[2][2] < 0) { // use pure x rotation - real_t x = asin(-m12); + if (elements[1][0] == 0 && elements[0][1] == 0 && elements[0][2] == 0 && elements[2][0] == 0 && elements[0][0] == 1) { // use pure x rotation + euler.x = atan2(-m12, elements[1][1]); euler.y = 0; euler.z = 0; - - if (x > 0.0) - euler.x = Math_PI - x; - else - euler.x = -(Math_PI + x); } else { euler.x = asin(-m12); euler.y = atan2(elements[0][2], elements[2][2]); diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 25f0044cc6..9e4f4380c9 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -142,8 +142,6 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue) ERR_FAIL(); } - OS::get_singleton()->enable_for_stealing_focus(ProjectSettings::get_singleton()->get("editor_pid")); - packet_peer_stream->put_var("debug_enter"); packet_peer_stream->put_var(2); packet_peer_stream->put_var(p_can_continue); |