aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@enzo.thebackupbox.net>2021-01-24 13:09:32 -0600
committerepoch <epoch@enzo.thebackupbox.net>2021-01-24 13:09:32 -0600
commit4feb44b2849b9c2779118f58991a295efb0727b9 (patch)
tree564c3589e7f994b130e7a49e61a27eb0d8b880b4 /src
parent03753a8a92e8c3dd25e4f067f13503a7d748a98d (diff)
downloadhackvr-4feb44b2849b9c2779118f58991a295efb0727b9.tar.gz
hackvr-4feb44b2849b9c2779118f58991a295efb0727b9.zip
changed some constants in anonet map generator and swapped from maxdist to mindist in shitdist2()
Diffstat (limited to 'src')
-rw-r--r--src/graphics_c3.c5
1 files changed, 4 insertions, 1 deletions
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.
/*