shmup::vr:: shmup/racing controls for vr
This commit is contained in:
parent
726c2fc871
commit
79bf71ce78
|
@ -800,7 +800,7 @@ EX void mainloopiter() {
|
||||||
DEBB(DF_GRAPH, ("polling for events\n"));
|
DEBB(DF_GRAPH, ("polling for events\n"));
|
||||||
|
|
||||||
#if CAP_VR
|
#if CAP_VR
|
||||||
if(vrhr::active()) {
|
if(vrhr::active() && !shmup::on) {
|
||||||
static int lastticks = ticks;
|
static int lastticks = ticks;
|
||||||
ld t = (ticks - lastticks) * shiftmul / 400;
|
ld t = (ticks - lastticks) * shiftmul / 400;
|
||||||
lastticks = ticks;
|
lastticks = ticks;
|
||||||
|
|
16
shmup.cpp
16
shmup.cpp
|
@ -781,6 +781,22 @@ void movePlayer(monster *m, int delta) {
|
||||||
mdy = (mousey - yb) / (rad/2.);
|
mdy = (mousey - yb) / (rad/2.);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CAP_VR
|
||||||
|
if(vrhr::active()) {
|
||||||
|
if(GDIM == 3) {
|
||||||
|
mouseaim_x += vrhr::vraim_x * delta / 400;
|
||||||
|
mouseaim_y -= vrhr::vraim_y * delta / 400;
|
||||||
|
mdy -= vrhr::vrgo_y;
|
||||||
|
mdx += vrhr::vrgo_x;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
println(hlog, "2dim");
|
||||||
|
mturn -= vrhr::vraim_x + vrhr::vrgo_x;
|
||||||
|
mgo += vrhr::vrgo_y + vrhr::vraim_y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(actionspressed[b+pcOrbPower] && !lactionpressed[b+pcOrbPower] && mouseover && !m->dead) {
|
if(actionspressed[b+pcOrbPower] && !lactionpressed[b+pcOrbPower] && mouseover && !m->dead) {
|
||||||
cwt.at = m->base;
|
cwt.at = m->base;
|
||||||
|
|
Loading…
Reference in New Issue