diff options
author | epoch <epoch@hacking.allowed.org> | 2018-02-19 06:08:50 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2018-02-19 06:08:50 -0600 |
commit | 4ce1fe528d5fcf7826487673fb7669977a4cb523 (patch) | |
tree | 695867d0fba32f670080cf5c9bd7531e64dd09d3 /src | |
parent | 1294166d0c216b7deadbf19827de70f7b3aee788 (diff) | |
download | hackvr-4ce1fe528d5fcf7826487673fb7669977a4cb523.tar.gz hackvr-4ce1fe528d5fcf7826487673fb7669977a4cb523.zip |
messed up the relative rotation of the camera
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics_cs_fb.c | 12 | ||||
-rw-r--r-- | src/graphics_cs_x11.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/graphics_cs_fb.c b/src/graphics_cs_fb.c index 0a56e77..c123fee 100644 --- a/src/graphics_cs_fb.c +++ b/src/graphics_cs_fb.c @@ -423,27 +423,27 @@ int graphics_event_handler(int world_changed) { //should calling draw_screen be selfcommand(line); } if(KEY_IS_DOWN(KEY_R)) { - snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,global.camera.r.x.d+ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,ROTATE_STEP); selfcommand(line); } if(KEY_IS_DOWN(KEY_Y)) { - snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,global.camera.r.x.d-ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,-ROTATE_STEP); selfcommand(line); } if(KEY_IS_DOWN(KEY_Q)) { - snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,global.camera.r.y.d+ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,ROTATE_STEP); selfcommand(line); } if(KEY_IS_DOWN(KEY_E)) { - snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,global.camera.r.y.d-ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,-ROTATE_STEP); selfcommand(line); } if(KEY_IS_DOWN(KEY_U)) { - snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,global.camera.r.z.d+ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,ROTATE_STEP); selfcommand(line); } if(KEY_IS_DOWN(KEY_O)) { - snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,global.camera.r.z.d-ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,-ROTATE_STEP); selfcommand(line); } if(KEY_IS_DOWN(KEY_P)) gra_global.split+=.1; diff --git a/src/graphics_cs_x11.c b/src/graphics_cs_x11.c index 3b30d82..df4df49 100644 --- a/src/graphics_cs_x11.c +++ b/src/graphics_cs_x11.c @@ -284,27 +284,27 @@ void x11_keypress_handler(XKeyEvent *xkey,int x,int y) { selfcommand(line); break; case XK_r: - snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,global.camera.r.x.d+ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,+ROTATE_STEP); selfcommand(line); break; case XK_y: - snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,global.camera.r.x.d-ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +%d +0 +0\n",global.user,-ROTATE_STEP); selfcommand(line); break; case XK_q: - snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,global.camera.r.y.d+ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,+ROTATE_STEP); selfcommand(line); break; case XK_e: - snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,global.camera.r.y.d-ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +%d +0\n",global.user,-ROTATE_STEP); selfcommand(line); break; case XK_u: - snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,global.camera.r.z.d+ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,ROTATE_STEP); selfcommand(line); break; case XK_o: - snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,global.camera.r.z.d-ROTATE_STEP); + snprintf(line,sizeof(line)-1,"%s rotate +0 +0 +%d\n",global.user,-ROTATE_STEP); selfcommand(line); break; case XK_p: |