Add privileged desynced client global variables (#9138)

* Fix text setting in marker control

* Fix marker and bridge calculation game crashes, minor marker instruction code fixes

* Add privileged desynced client constant global variables

* Remove broken attempt to not initialize client vars on server

* Make @clientLocale variable non-constant, make @server and @client privileged
This commit is contained in:
ApsZoldat
2023-10-05 17:56:53 +03:00
committed by GitHub
parent 16488aeae4
commit 91d87e1dba
4 changed files with 35 additions and 9 deletions

View File

@@ -15,6 +15,7 @@ public class LAssembler{
private static final int invalidNum = Integer.MIN_VALUE;
private int lastVar;
private boolean privileged;
/** Maps names to variable IDs. */
public ObjectMap<String, BVar> vars = new ObjectMap<>();
/** All instructions to be executed. */
@@ -35,6 +36,7 @@ public class LAssembler{
Seq<LStatement> st = read(data, privileged);
asm.instructions = st.map(l -> l.build(asm)).retainAll(l -> l != null).toArray(LInstruction.class);
asm.privileged = privileged;
return asm;
}