Fixed logic config() called in clients / JSON-compatible effects

This commit is contained in:
Anuken
2020-11-01 10:30:30 -05:00
parent 187cb79265
commit d786c8668e
8 changed files with 165 additions and 10 deletions

View File

@@ -1319,7 +1319,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
@Override
public void control(LAccess type, Object p1, double p2, double p3, double p4){
if(type == LAccess.configure && block.logicConfigurable){
//don't execute configure instructions as the client
if(type == LAccess.configure && block.logicConfigurable && !net.client()){
//change config only if it's new
Object prev = senseObject(LAccess.config);
if(prev != p1){

View File

@@ -22,6 +22,6 @@ abstract class EffectStateComp implements Posc, Drawc, Timedc, Rotc, Childc{
@Replace
public float clipSize(){
return effect.size;
return effect.clip;
}
}