diff options
author | TwistedTwigleg <beard.noah@gmail.com> | 2017-06-30 14:47:17 -0400 |
---|---|---|
committer | TwistedTwigleg <beard.noah@gmail.com> | 2017-07-03 16:29:03 -0400 |
commit | 44ecfb028d21975944b47b6496712a29f17f3848 (patch) | |
tree | 5d9e8259992ef8ef1690235c540a306e073a36f4 /modules/gdnative | |
parent | cb59236ce938fdf3ffe20b1f77c4f7058ddaadf1 (diff) |
Fixed syntax inconsistency in Vector3.snap and Vector3.snapped
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/godot/godot_vector3.cpp | 5 | ||||
-rw-r--r-- | modules/gdnative/godot/godot_vector3.h | 2 |
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); |