Fixed teleporter crash and color switch bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Tue Mar 20 18:38:05 EDT 2018
|
#Thu Mar 22 19:20:28 EDT 2018
|
||||||
version=release
|
version=release
|
||||||
androidBuildCode=455
|
androidBuildCode=456
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
code=3.4
|
code=3.4
|
||||||
build=custom build
|
build=custom build
|
||||||
|
|||||||
@@ -122,8 +122,6 @@ public class Control extends Module{
|
|||||||
"lastBuild", 0
|
"lastBuild", 0
|
||||||
);
|
);
|
||||||
|
|
||||||
Log.info("{0}", (int)'ї');
|
|
||||||
|
|
||||||
KeyBinds.load();
|
KeyBinds.load();
|
||||||
|
|
||||||
for(Map map : world.maps().list()){
|
for(Map map : world.maps().list()){
|
||||||
|
|||||||
@@ -115,19 +115,23 @@ public abstract class InputHandler extends InputAdapter{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void placeBlock(int x, int y, Block result, int rotation, boolean effects, boolean sound){
|
public void placeBlock(int x, int y, Block result, int rotation, boolean effects, boolean sound){
|
||||||
if(!Net.client()){
|
if(!Net.client()){ //is server or singleplayer
|
||||||
Placement.placeBlock(x, y, result, rotation, effects, sound);
|
Placement.placeBlock(x, y, result, rotation, effects, sound);
|
||||||
Tile tile = world.tile(x, y);
|
|
||||||
if(tile != null) result.placed(tile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Net.active()){
|
if(Net.active()){
|
||||||
NetEvents.handlePlace(x, y, result, rotation);
|
NetEvents.handlePlace(x, y, result, rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!Net.client()){
|
||||||
|
Tile tile = world.tile(x, y);
|
||||||
|
if(tile != null) result.placed(tile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void breakBlock(int x, int y, boolean sound){
|
public void breakBlock(int x, int y, boolean sound){
|
||||||
if(!Net.client()) Placement.breakBlock(x, y, true, sound);
|
if(!Net.client())
|
||||||
|
Placement.breakBlock(x, y, true, sound);
|
||||||
|
|
||||||
if(Net.active()){
|
if(Net.active()){
|
||||||
NetEvents.handleBreak(x, y);
|
NetEvents.handleBreak(x, y);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class Teleporter extends PowerBlock{
|
|||||||
@Override
|
@Override
|
||||||
public void placed(Tile tile){
|
public void placed(Tile tile){
|
||||||
tile.<TeleporterEntity>entity().color = lastColor;
|
tile.<TeleporterEntity>entity().color = lastColor;
|
||||||
Timers.run(1f, () -> setConfigure(tile, lastColor));
|
setConfigure(tile, lastColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user