mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-20 03:54:47 +00:00
fixed smooth movement in modes other than sm::NORMAL
This commit is contained in:
parent
0c2c32c126
commit
6fe07c389c
@ -735,7 +735,7 @@ EX void mainloopiter() {
|
||||
}
|
||||
|
||||
mousepan = cmode & sm::NORMAL;
|
||||
if((cmode & (sm::DRAW | sm::MAP)) && !hiliteclick) mousepan = true;
|
||||
if((cmode & sm::PANNING) && !hiliteclick) mousepan = true;
|
||||
if(cmode & sm::SHOWCURSOR) mousepan = false;
|
||||
mousepan = mousepan && mouseaiming(false) && mouseaim_sensitivity;
|
||||
if(mousepan != oldmousepan) {
|
||||
@ -900,7 +900,7 @@ EX void mainloopiter() {
|
||||
#endif
|
||||
}
|
||||
|
||||
if(smooth_scrolling && !shmup::on && (cmode & sm::NORMAL)) {
|
||||
if(smooth_scrolling && !shmup::on && (cmode & (sm::NORMAL | sm::PANNING))) {
|
||||
rug::using_rugview urv;
|
||||
auto& lastticks = sc_ticks;
|
||||
ld t = (ticks - lastticks) * shiftmul / 1000.;
|
||||
|
@ -5490,6 +5490,7 @@ namespace sm {
|
||||
static const int HEXEDIT = (1<<17);
|
||||
static const int VR_MENU = (1<<18); // always show the menu in VR
|
||||
static const int SHOWCURSOR = (1<<19); // despite MAP/DRAW always show the cursor, no panning
|
||||
static const int PANNING = (1<<20); // smooth scrolling works
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1321,7 +1321,7 @@ EX namespace mapeditor {
|
||||
EX set<int> affected_id;
|
||||
|
||||
EX void showMapEditor() {
|
||||
cmode = sm::MAP;
|
||||
cmode = sm::MAP | sm::PANNING;
|
||||
gamescreen(0);
|
||||
|
||||
int fs = editor_fsize();
|
||||
@ -2001,7 +2001,7 @@ EX namespace mapeditor {
|
||||
|
||||
EX void showDrawEditor() {
|
||||
#if CAP_POLY
|
||||
cmode = sm::DRAW;
|
||||
cmode = sm::DRAW | sm::PANNING;
|
||||
gamescreen(0);
|
||||
drawGrid();
|
||||
if(callhandlers(false, hooks_prestats)) return;
|
||||
|
Loading…
Reference in New Issue
Block a user