From 44ecfb028d21975944b47b6496712a29f17f3848 Mon Sep 17 00:00:00 2001 From: TwistedTwigleg Date: Fri, 30 Jun 2017 14:47:17 -0400 Subject: Fixed syntax inconsistency in Vector3.snap and Vector3.snapped --- modules/gdnative/godot/godot_vector3.cpp | 5 +++-- modules/gdnative/godot/godot_vector3.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/gdnative/godot') 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); -- cgit v1.2.3