summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/math/vector3.cpp10
-rw-r--r--core/script_debugger_remote.cpp6
2 files changed, 7 insertions, 9 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index 8afd73f482..b4a13d8f6d 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -65,13 +65,9 @@ int Vector3::max_axis() const {
void Vector3::snap(float p_val) {
- x+=p_val/2.0;
- x-=Math::fmod(x,p_val);
- y+=p_val/2.0;
- y-=Math::fmod(y,p_val);
- z+=p_val/2.0;
- z-=Math::fmod(z,p_val);
-
+ x=Math::stepify(x,p_val);
+ y=Math::stepify(y,p_val);
+ z=Math::stepify(z,p_val);
}
Vector3 Vector3::snapped(float p_val) const {
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 99d1e22c07..1ac0907967 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -219,7 +219,8 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
if (F->get().get_type()==Variant::OBJECT) {
packet_peer_stream->put_var("*"+E->get());
- packet_peer_stream->put_var(safe_get_instance_id(F->get()));
+ String pretty_print = F->get().operator String();
+ packet_peer_stream->put_var(pretty_print.ascii().get_data());
} else {
packet_peer_stream->put_var(E->get());
packet_peer_stream->put_var(F->get());
@@ -242,7 +243,8 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
if (F->get().get_type()==Variant::OBJECT) {
packet_peer_stream->put_var("*"+E->get());
- packet_peer_stream->put_var(safe_get_instance_id(F->get()));
+ String pretty_print = F->get().operator String();
+ packet_peer_stream->put_var(pretty_print.ascii().get_data());
} else {
packet_peer_stream->put_var(E->get());
packet_peer_stream->put_var(F->get());