diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2017-04-15 08:31:33 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2017-04-15 08:31:33 +0300 |
commit | 00ad259939fe3537b7e5967598ec09799eec20af (patch) | |
tree | 6dc7cdd9dc396253623a21336f39a2a04546829f /source/blender/makesrna | |
parent | 34ea8058b99a3c5a392dfb1d7d8ab4bd52209a00 (diff) |
Object.raycast: error in previous commit
This is taking longer than I expected.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index b3bc2c72d34..55852139065 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -335,9 +335,11 @@ static void rna_Object_ray_cast( if (isect_ray_aabb_v3_simple(origin, direction, bb->vec[0], bb->vec[6], &distmin, &distmax)) { float dist = distmin >= 0 ? distmin : distmax; if (dist > distance) { + goto finally; } } else { + goto finally; } } @@ -372,6 +374,7 @@ static void rna_Object_ray_cast( } if (*r_success == false) { +finally: zero_v3(r_location); zero_v3(r_normal); *r_index = -1; |