diff options
author | epoch <epoch@hacking.allowed.org> | 2020-04-03 00:46:54 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2020-04-03 00:46:54 -0500 |
commit | 174e96a02e16f1c4f8d53ad3af45cf7824833077 (patch) | |
tree | ffebbec40bf0d4b61084761216defa6365862b52 | |
parent | 7cbb9ec6d7a869a701dae0a0ae403b2075559a97 (diff) | |
download | hackvr-174e96a02e16f1c4f8d53ad3af45cf7824833077.tar.gz hackvr-174e96a02e16f1c4f8d53ad3af45cf7824833077.zip |
finally got rid of unused shape structs left over from when I was trying to get "flatten" working. also made move command use get_group_relative.
-rw-r--r-- | src/hackvr.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/hackvr.c b/src/hackvr.c index aa9a1f2..764826f 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -151,8 +151,6 @@ int hackvr_handler(char *line) { int len; int j,i,k,l; c3_group_rot_t *gr; - c3_s_t *s; - c3_s_t s2; real tmpx,tmpy,tmpz; char **a; char tmp[256]; @@ -531,12 +529,10 @@ int hackvr_handler(char *line) { } if(!strcmp(command,"move")) {//this is only moving the first group_rot it finds instead of all group_rots that match the pattern if(len > 2) { - for(i=0;global.group_rot[i];i++) {//make this faster. hash table? - if(!strcmp(global.group_rot[i]->id,id)) { - break; - } - } - if(global.group_rot[i] == 0) {//we have ourselves a new grouprot! + gr=get_group_relative(id);//this returns a pointer... + if(gr == 0) {//we have ourselves a new grouprot! + //figure out where the end is anyway. -_- + for(i=0;global.group_rot[i];i++); global.group_rot[i]=malloc(sizeof(c3_group_rot_t)); ht_setkey(&global.ht_group,id,global.group_rot[i]); global.group_rot[i]->id=strdup(id); |