mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 23:11:12 -08:00
Breaking logic change: Coordinates are now tile-based
This commit is contained in:
parent
c99873c823
commit
8043c09e2b
19 changed files with 73 additions and 46 deletions
|
|
@ -7,6 +7,7 @@ import arc.util.*;
|
|||
import mindustry.*;
|
||||
import mindustry.ai.BaseRegistry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.Schematic.*;
|
||||
import mindustry.game.Teams.*;
|
||||
|
|
@ -68,7 +69,7 @@ public class BaseAI{
|
|||
if(pos == null) return;
|
||||
|
||||
Tmp.v1.rnd(Mathf.random(range));
|
||||
int wx = (int)(world.toTile(pos.getX()) + Tmp.v1.x), wy = (int)(world.toTile(pos.getY()) + Tmp.v1.y);
|
||||
int wx = (int)(World.toTile(pos.getX()) + Tmp.v1.x), wy = (int)(World.toTile(pos.getY()) + Tmp.v1.y);
|
||||
Tile tile = world.tiles.getc(wx, wy);
|
||||
|
||||
Seq<BasePart> parts = null;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import arc.struct.EnumSet;
|
|||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.Teams.*;
|
||||
|
|
@ -179,8 +180,8 @@ public class BlockIndexer{
|
|||
public boolean eachBlock(Team team, float wx, float wy, float range, Boolf<Building> pred, Cons<Building> cons){
|
||||
intSet.clear();
|
||||
|
||||
int tx = world.toTile(wx);
|
||||
int ty = world.toTile(wy);
|
||||
int tx = World.toTile(wx);
|
||||
int ty = World.toTile(wy);
|
||||
|
||||
int tileRange = (int)(range / tilesize + 1);
|
||||
boolean any = false;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import arc.struct.*;
|
|||
import arc.util.*;
|
||||
import arc.util.async.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
|
|
@ -441,7 +442,7 @@ public class Pathfinder implements Runnable{
|
|||
|
||||
@Override
|
||||
public void getPositions(IntSeq out){
|
||||
out.add(Point2.pack(world.toTile(position.getX()), world.toTile(position.getY())));
|
||||
out.add(Point2.pack(World.toTile(position.getX()), World.toTile(position.getY())));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import arc.struct.*;
|
|||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
|
|
@ -100,7 +101,7 @@ public class WaveSpawner{
|
|||
}
|
||||
|
||||
public void eachGroundSpawn(Intc2 cons){
|
||||
eachGroundSpawn((x, y, shock) -> cons.get(world.toTile(x), world.toTile(y)));
|
||||
eachGroundSpawn((x, y, shock) -> cons.get(World.toTile(x), World.toTile(y)));
|
||||
}
|
||||
|
||||
private void eachGroundSpawn(SpawnConsumer cons){
|
||||
|
|
@ -118,7 +119,7 @@ public class WaveSpawner{
|
|||
|
||||
//keep moving forward until the max step amount is reached
|
||||
while(steps++ < maxSteps){
|
||||
int tx = world.toTile(core.x + Tmp.v1.x), ty = world.toTile(core.y + Tmp.v1.y);
|
||||
int tx = World.toTile(core.x + Tmp.v1.x), ty = World.toTile(core.y + Tmp.v1.y);
|
||||
any = false;
|
||||
Geometry.circle(tx, ty, world.width(), world.height(), 3, (x, y) -> {
|
||||
if(world.solid(x, y)){
|
||||
|
|
|
|||
|
|
@ -148,7 +148,17 @@ public class World{
|
|||
return build(Math.round(x / tilesize), Math.round(y / tilesize));
|
||||
}
|
||||
|
||||
public int toTile(float coord){
|
||||
/** Convert from world to logic tile coordinates. Whole numbers are at centers of tiles. */
|
||||
public static float conv(float coord){
|
||||
return coord / tilesize;
|
||||
}
|
||||
|
||||
/** Convert from tile to world coordinates. */
|
||||
public static float unconv(float coord){
|
||||
return coord * tilesize;
|
||||
}
|
||||
|
||||
public static int toTile(float coord){
|
||||
return Math.round(coord / tilesize);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import arc.struct.*;
|
|||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
|
|
@ -82,7 +83,7 @@ public class Damage{
|
|||
|
||||
furthest = null;
|
||||
|
||||
boolean found = world.raycast(b.tileX(), b.tileY(), world.toTile(b.x + Tmp.v1.x), world.toTile(b.y + Tmp.v1.y),
|
||||
boolean found = world.raycast(b.tileX(), b.tileY(), World.toTile(b.x + Tmp.v1.x), World.toTile(b.y + Tmp.v1.y),
|
||||
(x, y) -> (furthest = world.tile(x, y)) != null && furthest.team() != b.team && furthest.block().absorbLasers);
|
||||
|
||||
return found && furthest != null ? Math.max(6f, b.dst(furthest.worldx(), furthest.worldy())) : length;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import arc.math.*;
|
|||
import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.bullet.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
|
|
@ -48,7 +49,7 @@ public class Lightning{
|
|||
bhit = false;
|
||||
Vec2 from = lines.get(lines.size - 2);
|
||||
Vec2 to = lines.get(lines.size - 1);
|
||||
world.raycastEach(world.toTile(from.getX()), world.toTile(from.getY()), world.toTile(to.getX()), world.toTile(to.getY()), (wx, wy) -> {
|
||||
world.raycastEach(World.toTile(from.getX()), World.toTile(from.getY()), World.toTile(to.getX()), World.toTile(to.getY()), (wx, wy) -> {
|
||||
|
||||
Tile tile = world.tile(wx, wy);
|
||||
if(tile != null && tile.block().insulated){
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import arc.util.io.*;
|
|||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.audio.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.EventType.*;
|
||||
|
|
@ -1266,8 +1267,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||
@Override
|
||||
public double sense(LAccess sensor){
|
||||
return switch(sensor){
|
||||
case x -> x;
|
||||
case y -> y;
|
||||
case x -> World.conv(x);
|
||||
case y -> World.conv(y);
|
||||
case team -> team.id;
|
||||
case health -> health;
|
||||
case maxHealth -> maxHealth;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import arc.math.geom.*;
|
|||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.bullet.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.Teams.*;
|
||||
|
|
@ -110,7 +111,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||
type.update(self());
|
||||
|
||||
if(type.collidesTiles && type.collides && type.collidesGround){
|
||||
world.raycastEach(world.toTile(lastX()), world.toTile(lastY()), tileX(), tileY(), (x, y) -> {
|
||||
world.raycastEach(World.toTile(lastX()), World.toTile(lastY()), tileX(), tileY(), (x, y) -> {
|
||||
|
||||
Building tile = world.build(x, y);
|
||||
if(tile == null || !isAdded()) return false;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import arc.util.*;
|
|||
import mindustry.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
|
|
@ -120,7 +121,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
|
|||
/** @return whether the tile has been successfully placed. */
|
||||
boolean dropBlock(BuildPayload payload){
|
||||
Building tile = payload.build;
|
||||
int tx = Vars.world.toTile(x - tile.block.offset), ty = Vars.world.toTile(y - tile.block.offset);
|
||||
int tx = World.toTile(x - tile.block.offset), ty = World.toTile(y - tile.block.offset);
|
||||
Tile on = Vars.world.tile(tx, ty);
|
||||
if(on != null && Build.validPlace(tile.block, tile.team, tx, ty, tile.rotation, false)){
|
||||
int rot = (int)((rotation + 45f) / 90f) % 4;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ package mindustry.entities.comp;
|
|||
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.environment.*;
|
||||
|
||||
|
|
@ -32,11 +32,11 @@ abstract class PosComp implements Position{
|
|||
}
|
||||
|
||||
int tileX(){
|
||||
return Vars.world.toTile(x);
|
||||
return World.toTile(x);
|
||||
}
|
||||
|
||||
int tileY(){
|
||||
return Vars.world.toTile(y);
|
||||
return World.toTile(y);
|
||||
}
|
||||
|
||||
/** Returns air if this unit is on a non-air top block. */
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import arc.util.*;
|
|||
import mindustry.ai.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.abilities.*;
|
||||
|
|
@ -90,12 +91,12 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||
case maxHealth -> maxHealth;
|
||||
case ammo -> state.rules.unitAmmo ? type.ammoCapacity : ammo;
|
||||
case ammoCapacity -> type.ammoCapacity;
|
||||
case x -> x;
|
||||
case y -> y;
|
||||
case x -> World.conv(x);
|
||||
case y -> World.conv(y);
|
||||
case team -> team.id;
|
||||
case shooting -> isShooting() ? 1 : 0;
|
||||
case shootX -> aimX();
|
||||
case shootY -> aimY();
|
||||
case shootX -> World.conv(aimX());
|
||||
case shootY -> World.conv(aimY());
|
||||
case flag -> flag;
|
||||
case payloadCount -> self() instanceof Payloadc pay ? pay.payloads().size : 0;
|
||||
default -> 0;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import arc.util.pooling.*;
|
|||
import arc.util.serialization.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.EventType.*;
|
||||
|
|
@ -608,8 +609,8 @@ public class Schematics implements Loadable{
|
|||
wx = wy;
|
||||
wy = -x;
|
||||
}
|
||||
req.x = (short)(world.toTile(wx - req.block.offset) + ox);
|
||||
req.y = (short)(world.toTile(wy - req.block.offset) + oy);
|
||||
req.x = (short)(World.toTile(wx - req.block.offset) + ox);
|
||||
req.y = (short)(World.toTile(wy - req.block.offset) + oy);
|
||||
req.rotation = (byte)Mathf.mod(req.rotation + direction, 4);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import arc.scene.ui.*;
|
|||
import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
|
|
@ -363,7 +364,7 @@ public class DesktopInput extends InputHandler{
|
|||
Tile selected = tileAt(Core.input.mouseX(), Core.input.mouseY());
|
||||
int cursorX = tileX(Core.input.mouseX());
|
||||
int cursorY = tileY(Core.input.mouseY());
|
||||
int rawCursorX = world.toTile(Core.input.mouseWorld().x), rawCursorY = world.toTile(Core.input.mouseWorld().y);
|
||||
int rawCursorX = World.toTile(Core.input.mouseWorld().x), rawCursorY = World.toTile(Core.input.mouseWorld().y);
|
||||
|
||||
// automatically pause building if the current build queue is empty
|
||||
if(Core.settings.getBool("buildautopause") && isBuilding && !player.builder().isBuilding()){
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import arc.util.*;
|
|||
import mindustry.ai.formations.patterns.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.EventType.*;
|
||||
|
|
@ -568,8 +569,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
wx = wy;
|
||||
wy = -x;
|
||||
}
|
||||
req.x = world.toTile(wx - req.block.offset) + ox;
|
||||
req.y = world.toTile(wy - req.block.offset) + oy;
|
||||
req.x = World.toTile(wx - req.block.offset) + ox;
|
||||
req.y = World.toTile(wy - req.block.offset) + oy;
|
||||
req.rotation = Mathf.mod(req.rotation + direction, 4);
|
||||
});
|
||||
}
|
||||
|
|
@ -934,11 +935,11 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
}
|
||||
|
||||
int rawTileX(){
|
||||
return world.toTile(Core.input.mouseWorld().x);
|
||||
return World.toTile(Core.input.mouseWorld().x);
|
||||
}
|
||||
|
||||
int rawTileY(){
|
||||
return world.toTile(Core.input.mouseWorld().y);
|
||||
return World.toTile(Core.input.mouseWorld().y);
|
||||
}
|
||||
|
||||
int tileX(float cursorX){
|
||||
|
|
@ -946,7 +947,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
if(selectedBlock()){
|
||||
vec.sub(block.offset, block.offset);
|
||||
}
|
||||
return world.toTile(vec.x);
|
||||
return World.toTile(vec.x);
|
||||
}
|
||||
|
||||
int tileY(float cursorY){
|
||||
|
|
@ -954,7 +955,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
if(selectedBlock()){
|
||||
vec.sub(block.offset, block.offset);
|
||||
}
|
||||
return world.toTile(vec.y);
|
||||
return World.toTile(vec.y);
|
||||
}
|
||||
|
||||
public boolean selectedBlock(){
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import arc.struct.*;
|
|||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.EventType.*;
|
||||
|
|
@ -405,14 +406,14 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||
protected int schemOriginX(){
|
||||
Tmp.v1.setZero();
|
||||
selectRequests.each(r -> Tmp.v1.add(r.drawx(), r.drawy()));
|
||||
return world.toTile(Tmp.v1.scl(1f / selectRequests.size).x);
|
||||
return World.toTile(Tmp.v1.scl(1f / selectRequests.size).x);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int schemOriginY(){
|
||||
Tmp.v1.setZero();
|
||||
selectRequests.each(r -> Tmp.v1.add(r.drawx(), r.drawy()));
|
||||
return world.toTile(Tmp.v1.scl(1f / selectRequests.size).y);
|
||||
return World.toTile(Tmp.v1.scl(1f / selectRequests.size).y);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import arc.util.noise.*;
|
|||
import mindustry.*;
|
||||
import mindustry.ai.types.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.*;
|
||||
|
|
@ -263,8 +264,8 @@ public class LExecutor{
|
|||
if(res != null && (!build || res.build != null)){
|
||||
cache.found = true;
|
||||
//set result if found
|
||||
exec.setnum(outX, cache.x = build ? res.build.x : res.worldx());
|
||||
exec.setnum(outY, cache.y = build ? res.build.y : res.worldy());
|
||||
exec.setnum(outX, cache.x = World.conv(build ? res.build.x : res.worldx()));
|
||||
exec.setnum(outY, cache.y = World.conv(build ? res.build.y : res.worldy()));
|
||||
exec.setnum(outFound, 1);
|
||||
}else{
|
||||
cache.found = false;
|
||||
|
|
@ -332,14 +333,15 @@ public class LExecutor{
|
|||
//only control standard AI units
|
||||
if(unitObj instanceof Unit unit && ai != null){
|
||||
ai.controlTimer = LogicAI.logicControlTimeout;
|
||||
float x1 = World.unconv(exec.numf(p1)), y1 = World.unconv(exec.numf(p2)), d1 = World.unconv(exec.numf(p3));
|
||||
|
||||
switch(type){
|
||||
case move, stop, approach -> {
|
||||
ai.control = type;
|
||||
ai.moveX = exec.numf(p1);
|
||||
ai.moveY = exec.numf(p2);
|
||||
ai.moveX = x1;
|
||||
ai.moveY = y1;
|
||||
if(type == LUnitControl.approach){
|
||||
ai.moveRad = exec.numf(p3);
|
||||
ai.moveRad = d1;
|
||||
}
|
||||
|
||||
//stop mining/building
|
||||
|
|
@ -353,13 +355,13 @@ public class LExecutor{
|
|||
}
|
||||
}
|
||||
case within -> {
|
||||
exec.setnum(p4, unit.within(exec.numf(p1), exec.numf(p2), exec.numf(p3)) ? 1 : 0);
|
||||
exec.setnum(p4, unit.within(x1, y1, d1) ? 1 : 0);
|
||||
}
|
||||
case pathfind -> {
|
||||
ai.control = type;
|
||||
}
|
||||
case target -> {
|
||||
ai.posTarget.set(exec.numf(p1), exec.numf(p2));
|
||||
ai.posTarget.set(x1, y1);
|
||||
ai.aimControl = type;
|
||||
ai.mainTarget = null;
|
||||
ai.shoot = exec.bool(p3);
|
||||
|
|
@ -376,7 +378,7 @@ public class LExecutor{
|
|||
unit.flag = exec.num(p1);
|
||||
}
|
||||
case mine -> {
|
||||
Tile tile = world.tileWorld(exec.numf(p1), exec.numf(p2));
|
||||
Tile tile = world.tileWorld(x1, y1);
|
||||
if(unit instanceof Minerc miner){
|
||||
miner.mineTile(miner.validMine(tile) ? tile : null);
|
||||
}
|
||||
|
|
@ -420,7 +422,7 @@ public class LExecutor{
|
|||
}
|
||||
case build -> {
|
||||
if(unit instanceof Builderc builder && exec.obj(p3) instanceof Block block){
|
||||
int x = world.toTile(exec.numf(p1)), y = world.toTile(exec.numf(p2));
|
||||
int x = World.toTile(x1), y = World.toTile(y1);
|
||||
int rot = exec.numi(p4);
|
||||
|
||||
//reset state of last request when necessary
|
||||
|
|
@ -441,13 +443,12 @@ public class LExecutor{
|
|||
}
|
||||
}
|
||||
case getBlock -> {
|
||||
float x = exec.numf(p1), y = exec.numf(p2);
|
||||
float range = Math.max(unit.range(), buildingRange);
|
||||
if(!unit.within(x, y, range)){
|
||||
if(!unit.within(x1, y1, range)){
|
||||
exec.setobj(p3, null);
|
||||
exec.setnum(p4, 0);
|
||||
}else{
|
||||
Tile tile = world.tileWorld(x, y);
|
||||
Tile tile = world.tileWorld(x1, y1);
|
||||
//any environmental solid block is returned as StoneWall, aka "@solid"
|
||||
Block block = tile == null ? null : !tile.synthetic() ? (tile.solid() ? Blocks.stoneWall : Blocks.air) : tile.block();
|
||||
exec.setobj(p3, block);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import arc.util.*;
|
|||
import arc.util.io.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.Units.*;
|
||||
import mindustry.entities.bullet.*;
|
||||
|
|
@ -168,7 +169,7 @@ public abstract class Turret extends Block{
|
|||
@Override
|
||||
public void control(LAccess type, double p1, double p2, double p3, double p4){
|
||||
if(type == LAccess.shoot && !unit.isPlayer()){
|
||||
targetPos.set((float)p1, (float)p2);
|
||||
targetPos.set(World.unconv((float)p1), World.unconv((float)p2));
|
||||
logicControlTime = logicControlCooldown;
|
||||
logicShooting = !Mathf.zero(p3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import arc.struct.*;
|
|||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.io.*;
|
||||
|
|
@ -304,8 +305,8 @@ public class LogicBlock extends Block{
|
|||
}
|
||||
|
||||
asm.getVar("@this").value = this;
|
||||
asm.putConst("@thisx", x);
|
||||
asm.putConst("@thisy", y);
|
||||
asm.putConst("@thisx", World.conv(x));
|
||||
asm.putConst("@thisy", World.conv(y));
|
||||
|
||||
executor.load(asm);
|
||||
}catch(Exception e){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue