Compare commits
2 Commits
52643c2469
...
757034f5b5
Author | SHA1 | Date |
---|---|---|
the me | 757034f5b5 | |
the me | 926ae79f2a |
|
@ -3,8 +3,8 @@ if select && selectedunit == noone {
|
||||||
var mousex = floor(mouse_x/global.tilesize.x);
|
var mousex = floor(mouse_x/global.tilesize.x);
|
||||||
var mousey = floor(mouse_y/global.tilesize.y);
|
var mousey = floor(mouse_y/global.tilesize.y);
|
||||||
log(mousex, mousey);
|
log(mousex, mousey);
|
||||||
if mousex < array_length(global.map) {
|
if mousex < array_length(global.map) && mousex >= 0 {
|
||||||
if mousey < array_length(global.map[mousex]) {
|
if mousey < array_length(global.map[mousex]) && mousey >= 0 {
|
||||||
var i;
|
var i;
|
||||||
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
|
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
|
||||||
if global.map[mousex][mousey].contents[i].object_index == o_unit {
|
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);
|
var mousey = floor(mouse_y/global.tilesize.y);
|
||||||
//log(mousex, mousey);
|
//log(mousex, mousey);
|
||||||
hoveredunit = selectedunit;
|
hoveredunit = selectedunit;
|
||||||
if mousex < array_length(global.map) {
|
if mousex < array_length(global.map) && mousex >= 0 {
|
||||||
if mousey < array_length(global.map[mousex]) {
|
if mousey < array_length(global.map[mousex]) && mousey >= 0 {
|
||||||
var i;
|
var i;
|
||||||
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
|
for (i=0; i<array_length(global.map[mousex][mousey].contents); i++) {
|
||||||
if global.map[mousex][mousey].contents[i].object_index == o_unit {
|
if global.map[mousex][mousey].contents[i].object_index == o_unit {
|
||||||
|
|
Loading…
Reference in New Issue