Make Gamepad cursor independant of hardware mouse
The gamepad cursor (inventory, spells etc) no longer relies on warping a real mouse cursor. This should make things work better on platforms that do not support this, like Wayland.
This commit is contained in:
parent
576d946581
commit
b0252b3339
10 changed files with 46 additions and 34 deletions
|
|
@ -1481,7 +1481,7 @@ bool IsPlayerAdjacentToObject(Player &player, Object &object)
|
|||
{
|
||||
int x = abs(player.position.tile.x - object.position.x);
|
||||
int y = abs(player.position.tile.y - object.position.y);
|
||||
if (y > 1 && ObjectAtPosition(object.position + Direction::NorthEast) == &object) {
|
||||
if (y > 1 && object.position.y >= 1 && ObjectAtPosition(object.position + Direction::NorthEast) == &object) {
|
||||
// special case for activating a large object from the north-east side
|
||||
y = abs(player.position.tile.y - object.position.y + 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue