diff --git a/core/src/mindustry/logic/GlobalVars.java b/core/src/mindustry/logic/GlobalVars.java index d5aa10a2fc..a4e7d6a79a 100644 --- a/core/src/mindustry/logic/GlobalVars.java +++ b/core/src/mindustry/logic/GlobalVars.java @@ -153,7 +153,7 @@ public class GlobalVars{ //network vars.items[varServer].numval = (net.server() || !net.active()) ? 1 : 0; - vars.items[varServer].numval = net.client() ? 1 : 0; + vars.items[varClient].numval = net.client() ? 1 : 0; } /** @return a piece of content based on its logic ID. This is not equivalent to content ID. */ diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index 606213eb5d..e32c0b9afa 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -1866,13 +1866,12 @@ public class LExecutor{ if(marker == null) return; if(type == LMarkerControl.text){ - Call.updateMarkerText(exec.numi(id), type, (exec.obj(p1) != null ? exec.obj(p1).toString() : "null")); + marker.setText((exec.obj(p1) != null ? exec.obj(p1).toString() : "null"), false); }else if(type == LMarkerControl.flushText){ - Call.updateMarkerText(exec.numi(id), type, exec.textBuffer.toString()); + marker.setText(exec.textBuffer.toString(), true); exec.textBuffer.setLength(0); }else{ - //TODO this aggressively spams packets to everyone - Call.updateMarker(exec.numi(id), type, exec.num(p1), exec.num(p2), exec.num(p3)); + marker.control(type, exec.num(p1), exec.num(p2), exec.num(p3)); } } } @@ -1899,12 +1898,10 @@ public class LExecutor{ public void run(LExecutor exec){ var cons = MapObjectives.markerNameToType.get(type); - if(cons != null && !net.client() && state.markers.size < maxMarkers){ - //TODO max markers... + if(cons != null && state.markers.size < maxMarkers){ var marker = cons.get(); marker.control(LMarkerControl.pos, exec.num(x), exec.num(y), 0); - - Call.createMarker(exec.numi(id), marker); + state.markers.put(exec.numi(id), marker); } } }