Compare commits

...

2 Commits

Author SHA1 Message Date
the me 757034f5b5 Merge branch 'master' of https://git.touhou.dev/shaun_chaky/eastern-flames 2022-08-16 22:05:45 -07:00
the me 926ae79f2a "the fix" 2022-08-16 22:05:33 -07:00
1 changed files with 4 additions and 4 deletions

View File

@ -3,8 +3,8 @@ if select && selectedunit == noone {
var mousex = floor(mouse_x/global.tilesize.x);
var mousey = floor(mouse_y/global.tilesize.y);
log(mousex, mousey);
if mousex < array_length(global.map) {
if mousey < array_length(global.map[mousex]) {
if mousex < array_length(global.map) && mousex >= 0 {
if mousey < array_length(global.map[mousex]) && mousey >= 0 {
var i;
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
if global.map[mousex][mousey].contents[i].object_index == o_unit {
@ -31,8 +31,8 @@ var mousex = floor(mouse_x/global.tilesize.x);
var mousey = floor(mouse_y/global.tilesize.y);
//log(mousex, mousey);
hoveredunit = selectedunit;
if mousex < array_length(global.map) {
if mousey < array_length(global.map[mousex]) {
if mousex < array_length(global.map) && mousex >= 0 {
if mousey < array_length(global.map[mousex]) && mousey >= 0 {
var i;
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
if global.map[mousex][mousey].contents[i].object_index == o_unit {