From 8db865190ea515b98d487f954ff0e347dcd8e3df Mon Sep 17 00:00:00 2001 From: epoch Date: Wed, 22 Apr 2020 06:24:15 -0500 Subject: forgot to put the code for applying rotations to globbed groups --- src/hackvr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hackvr.c b/src/hackvr.c index 7779a3c..87d4194 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -524,6 +524,13 @@ int hackvr_handler(char *line) { for(m=global.ht_group.bucket[global.ht_group.keys[i]]->ll;m;m=m->next) { if(!glob_match(id,m->target)) { gr=m->target; + gr->r.x=(degrees){(a[2][0]=='+'?gr->r.x.d:0)+atoi(a[2]+(a[2][0]=='+'))}; + gr->r.y=(degrees){(a[3][0]=='+'?gr->r.y.d:0)+atoi(a[3]+(a[3][0]=='+'))}; + gr->r.z=(degrees){(a[4][0]=='+'?gr->r.z.d:0)+atoi(a[4]+(a[4][0]=='+'))}; + //now to sanitize them into 0 <= degrees < 360 + gr->r.x.d -= (-(gr->r.x.d < 0)+(gr->r.x.d / 360)) * 360; + gr->r.y.d -= (-(gr->r.y.d < 0)+(gr->r.y.d / 360)) * 360; + gr->r.z.d -= (-(gr->r.z.d < 0)+(gr->r.z.d / 360)) * 360; } } } -- cgit v1.2.3