1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

rogueviz:: highlighting correctly

This commit is contained in:
Zeno Rogue 2019-06-01 17:09:14 +02:00
parent 3102dbd7e7
commit f4f6d2c028
2 changed files with 7 additions and 5 deletions

View File

@ -209,6 +209,7 @@ void createViz(int id, cell *c, transmatrix at) {
vd.m->type = moRogueviz; vd.m->type = moRogueviz;
vd.m->base = c; vd.m->base = c;
vd.m->at = at; vd.m->at = at;
vd.m->isVirtual = false;
} }
void notimpl() { void notimpl() {

View File

@ -3284,8 +3284,12 @@ void turn(int delta) {
})) return; })) return;
if(callhandlers(false, hooks_turn, delta)) return; if(callhandlers(false, hooks_turn, delta)) return;
if(!shmup::on) return;
lmousetarget = NULL;
if(mousetarget && !mousetarget->isVirtual && intval(mouseh, mousetarget->pat*C0) < 0.1)
lmousetarget = mousetarget;
if(!shmup::on) return;
if(!(cmode & sm::NORMAL)) { if(!(cmode & sm::NORMAL)) {
#if CAP_RACING #if CAP_RACING
if(racing::on) { if(racing::on) {
@ -3299,9 +3303,6 @@ void turn(int delta) {
timetowait = 0; timetowait = 0;
passive_switch = (gold() & 1) ? moSwitch1 : moSwitch2; passive_switch = (gold() & 1) ? moSwitch1 : moSwitch2;
lmousetarget = NULL;
if(mousetarget && !mousetarget->isVirtual && intval(mouseh, mousetarget->pat*C0) < 0.1)
lmousetarget = mousetarget;
if(delta > 1000) delta = 1000; if(delta > 1000) delta = 1000;