From 4feb44b2849b9c2779118f58991a295efb0727b9 Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 24 Jan 2021 13:09:32 -0600 Subject: changed some constants in anonet map generator and swapped from maxdist to mindist in shitdist2() --- src/graphics_c3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/graphics_c3.c b/src/graphics_c3.c index 0fcee5d..cfd7dde 100644 --- a/src/graphics_c3.c +++ b/src/graphics_c3.c @@ -301,6 +301,7 @@ real shitdist(struct c3_shape *s,c3_t p) {//this function is a killer. :/ int i; real curdist=0; real maxdist=0; + real mindist=0; c3_group_rel_t *gr=get_group_relative(s->id); for(i=0;i< s->len+(s->len==1);i++) { if(gr) { @@ -309,8 +310,10 @@ real shitdist(struct c3_shape *s,c3_t p) {//this function is a killer. :/ curdist=shitdist2(p,s->p[i]);//if there's no gr we're basically just this point. no rotation, not offests. } if(curdist > maxdist) maxdist=curdist; + if(curdist < mindist) mindist=curdist; } - return maxdist; + return mindist; + //return maxdist; //averaging it works ok, but I've decided to now use the farthest to say the distance something is. //why the fuck did we get group rotations each... nevermind. this code just sucks. /* -- cgit v1.2.3