mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-06 00:49:14 +07:00
Markers no longer synced
This commit is contained in:
parent
6119f3a507
commit
d41b6f219b
@ -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. */
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user