mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-05 19:22:48 +00:00
rogueviz::seuphorica:: no longer crash when trying to move outside of the map
This commit is contained in:
parent
9922c53655
commit
cfa0ce3266
@ -768,7 +768,7 @@ void seuphorica_screen() {
|
|||||||
sort_hand();
|
sort_hand();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(box_moved == &drawn && current_box == nullptr) {
|
if(box_moved == &drawn && current_box == nullptr && mouseover) {
|
||||||
auto at = mouseover;
|
auto at = mouseover;
|
||||||
if(!board.count(at)) {
|
if(!board.count(at)) {
|
||||||
swap(drawn[tile_boxid], drawn[0]);
|
swap(drawn[tile_boxid], drawn[0]);
|
||||||
@ -776,7 +776,7 @@ void seuphorica_screen() {
|
|||||||
sort_hand();
|
sort_hand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(box_moved == &shop && current_box == nullptr && tile_moved->price <= cash) {
|
if(box_moved == &shop && current_box == nullptr && mouseover && tile_moved->price <= cash) {
|
||||||
auto at = mouseover;
|
auto at = mouseover;
|
||||||
if(!board.count(at)) {
|
if(!board.count(at)) {
|
||||||
buy(tile_boxid);
|
buy(tile_boxid);
|
||||||
@ -784,7 +784,7 @@ void seuphorica_screen() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(uni == '-' && mouseover && !current_box && !holdmouse) {
|
if(uni == '-' && mouseover && !current_box && !holdmouse && mouseover) {
|
||||||
auto at = mouseover;
|
auto at = mouseover;
|
||||||
if(board.count(at)) {
|
if(board.count(at)) {
|
||||||
back_from_board(at); hold_mode = 1; tile_moved_from = mouseover;
|
back_from_board(at); hold_mode = 1; tile_moved_from = mouseover;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user