mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Fixed #500 / Fixed units not appearing in edited maps
This commit is contained in:
parent
4242100c53
commit
c66fd67510
@ -188,13 +188,14 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
});
|
||||
|
||||
shown(() -> {
|
||||
//clear units, rules and other unnecessary stuff
|
||||
logic.reset();
|
||||
|
||||
saved = true;
|
||||
if(!Core.settings.getBool("landscape")) Platform.instance.beginForceLandscape();
|
||||
editor.clearOp();
|
||||
Core.scene.setScrollFocus(view);
|
||||
if(!shownWithMap){
|
||||
//clear units, rules and other unnecessary stuff
|
||||
logic.reset();
|
||||
state.rules = new Rules();
|
||||
editor.beginEdit(200, 200);
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ public interface BuilderTrait extends Entity, TeamTrait{
|
||||
output.writeInt(Pos.get(request.x, request.y));
|
||||
output.writeFloat(request.progress);
|
||||
if(!request.breaking){
|
||||
output.writeByte(request.block.id);
|
||||
output.writeShort(request.block.id);
|
||||
output.writeByte(request.rotation);
|
||||
}
|
||||
}else{
|
||||
@ -189,7 +189,7 @@ public interface BuilderTrait extends Entity, TeamTrait{
|
||||
if(type == 1){ //remove
|
||||
request = new BuildRequest(Pos.x(position), Pos.y(position));
|
||||
}else{ //place
|
||||
byte block = input.readByte();
|
||||
short block = input.readShort();
|
||||
byte rotation = input.readByte();
|
||||
request = new BuildRequest(Pos.x(position), Pos.y(position), rotation, content.block(block));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user