Exclude player caller from packet's fields (#7368)
This commit is contained in:
@@ -60,7 +60,13 @@ public class CallGenerator{
|
||||
register.addStatement("mindustry.net.Net.registerPacket($L.$L::new)", packageName, ent.packetClassName);
|
||||
|
||||
//add fields to the type
|
||||
for(Svar param : ent.element.params()){
|
||||
Seq<Svar> params = ent.element.params();
|
||||
for(int i = 0; i < params.size; i++){
|
||||
if(!ent.where.isServer && i == 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
Svar param = params.get(i);
|
||||
packet.addField(param.tname(), param.name(), Modifier.PUBLIC);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user