1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

added lmouseover_distant

This commit is contained in:
Zeno Rogue 2021-05-27 12:59:21 +02:00
parent 990b544e7f
commit b879682d82
2 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,7 @@ EX movedir joydir;
EX movedir mousedest; EX movedir mousedest;
EX ld shiftmul = 1; EX ld shiftmul = 1;
EX cell *mouseover, *mouseover2, *lmouseover; EX cell *mouseover, *mouseover2, *lmouseover, *lmouseover_distant;
EX ld modist, modist2; EX ld modist, modist2;
EX int lastt; EX int lastt;

View File

@ -4901,6 +4901,7 @@ EX void drawthemap() {
#if CAP_SDL #if CAP_SDL
const Uint8 *keystate = SDL12_GetKeyState(NULL); const Uint8 *keystate = SDL12_GetKeyState(NULL);
lmouseover = mouseover; lmouseover = mouseover;
lmouseover_distant = lmouseover;
bool useRangedOrb = (!(vid.shifttarget & 1) && haveRangedOrb() && lmouseover && lmouseover->cpdist > 1) || (keystate[SDL12(SDLK_RSHIFT, SDL_SCANCODE_RSHIFT)] | keystate[SDL12(SDLK_LSHIFT, SDL_SCANCODE_LSHIFT)]); bool useRangedOrb = (!(vid.shifttarget & 1) && haveRangedOrb() && lmouseover && lmouseover->cpdist > 1) || (keystate[SDL12(SDLK_RSHIFT, SDL_SCANCODE_RSHIFT)] | keystate[SDL12(SDLK_LSHIFT, SDL_SCANCODE_LSHIFT)]);
if(!useRangedOrb && !(cmode & sm::MAP) && !(cmode & sm::DRAW) && DEFAULTCONTROL && !mouseout() && !dual::state) { if(!useRangedOrb && !(cmode & sm::MAP) && !(cmode & sm::DRAW) && DEFAULTCONTROL && !mouseout() && !dual::state) {
dynamicval<eGravity> gs(gravity_state, gravity_state); dynamicval<eGravity> gs(gravity_state, gravity_state);