summaryrefslogtreecommitdiff
path: root/modules/gdnative/godot
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-03 23:43:33 +0200
committerGitHub <noreply@github.com>2017-07-03 23:43:33 +0200
commite54c7d5715e70c4ef08b6a3f7039c2bdf2473045 (patch)
treef782dfef613af8fa5c211d7069e061e380a1f7c2 /modules/gdnative/godot
parent2036273f944084ccbe2483619d4f4b3de48a322c (diff)
parent44ecfb028d21975944b47b6496712a29f17f3848 (diff)
Merge pull request #9457 from TwistedTwigleg/Fixed_Vector3_snap
Fixed syntax inconsistency in Vector3.snap and Vector3.snapped
Diffstat (limited to 'modules/gdnative/godot')
-rw-r--r--modules/gdnative/godot/godot_vector3.cpp5
-rw-r--r--modules/gdnative/godot/godot_vector3.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/gdnative/godot/godot_vector3.cpp b/modules/gdnative/godot/godot_vector3.cpp
index f9942af6e5..adca0d1e2a 100644
--- a/modules/gdnative/godot/godot_vector3.cpp
+++ b/modules/gdnative/godot/godot_vector3.cpp
@@ -90,11 +90,12 @@ godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self) {
return dest;
}
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_real p_by) {
+godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_vector3 *p_by) {
godot_vector3 dest;
const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *snap_axis = (const Vector3 *)p_by;
- *((Vector3 *)&dest) = self->snapped(p_by);
+ *((Vector3 *)&dest) = self->snapped(*snap_axis);
return dest;
}
diff --git a/modules/gdnative/godot/godot_vector3.h b/modules/gdnative/godot/godot_vector3.h
index 8e2aed8173..98d9ddf6ac 100644
--- a/modules/gdnative/godot/godot_vector3.h
+++ b/modules/gdnative/godot/godot_vector3.h
@@ -70,7 +70,7 @@ godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_self);
godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self);
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_real p_by);
+godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_vector3 *p_by);
godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi);