diff options
Diffstat (limited to 'src/hackvr.c')
-rw-r--r-- | src/hackvr.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } } } |