Multiplayer bugfixes
This commit is contained in:
@@ -193,7 +193,7 @@ public class EntityIO{
|
||||
st("$L = $L($T.$L($L, $L, alpha))", name, field.annotation(SyncField.class).clamped() ? "arc.math.Mathf.clamp" : "", Mathf.class, field.annotation(SyncField.class).value() ? "lerp" : "slerp", lastName, targetName);
|
||||
}
|
||||
|
||||
ncont("else"); //no meaningful data has arrived yet
|
||||
ncont("else if(lastUpdated != 0)"); //check if no meaningful data has arrived yet
|
||||
|
||||
//write values directly to targets
|
||||
for(Svar field : fields){
|
||||
|
||||
@@ -566,6 +566,14 @@ public class EntityProcess extends BaseProcessor{
|
||||
//write the groups
|
||||
groupsBuilder.addMethod(groupInit.build());
|
||||
|
||||
MethodSpec.Builder groupClear = MethodSpec.methodBuilder("clear").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||
for(GroupDefinition group : groupDefs){
|
||||
groupClear.addStatement("$L.clear()", group.name);
|
||||
}
|
||||
|
||||
//write clear
|
||||
groupsBuilder.addMethod(groupClear.build());
|
||||
|
||||
//add method for resizing all necessary groups
|
||||
MethodSpec.Builder groupResize = MethodSpec.methodBuilder("resize")
|
||||
.addParameter(TypeName.FLOAT, "x").addParameter(TypeName.FLOAT, "y").addParameter(TypeName.FLOAT, "w").addParameter(TypeName.FLOAT, "h")
|
||||
|
||||
Reference in New Issue
Block a user