Markers no longer synced
This commit is contained in:
@@ -153,7 +153,7 @@ public class GlobalVars{
|
|||||||
|
|
||||||
//network
|
//network
|
||||||
vars.items[varServer].numval = (net.server() || !net.active()) ? 1 : 0;
|
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. */
|
/** @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(marker == null) return;
|
||||||
|
|
||||||
if(type == LMarkerControl.text){
|
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){
|
}else if(type == LMarkerControl.flushText){
|
||||||
Call.updateMarkerText(exec.numi(id), type, exec.textBuffer.toString());
|
marker.setText(exec.textBuffer.toString(), true);
|
||||||
exec.textBuffer.setLength(0);
|
exec.textBuffer.setLength(0);
|
||||||
}else{
|
}else{
|
||||||
//TODO this aggressively spams packets to everyone
|
marker.control(type, exec.num(p1), exec.num(p2), exec.num(p3));
|
||||||
Call.updateMarker(exec.numi(id), type, exec.num(p1), exec.num(p2), exec.num(p3));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1899,12 +1898,10 @@ public class LExecutor{
|
|||||||
public void run(LExecutor exec){
|
public void run(LExecutor exec){
|
||||||
var cons = MapObjectives.markerNameToType.get(type);
|
var cons = MapObjectives.markerNameToType.get(type);
|
||||||
|
|
||||||
if(cons != null && !net.client() && state.markers.size < maxMarkers){
|
if(cons != null && state.markers.size < maxMarkers){
|
||||||
//TODO max markers...
|
|
||||||
var marker = cons.get();
|
var marker = cons.get();
|
||||||
marker.control(LMarkerControl.pos, exec.num(x), exec.num(y), 0);
|
marker.control(LMarkerControl.pos, exec.num(x), exec.num(y), 0);
|
||||||
|
state.markers.put(exec.numi(id), marker);
|
||||||
Call.createMarker(exec.numi(id), marker);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user