mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-11 08:15:35 +03:00
Exclude player caller from packet's fields (#7368)
This commit is contained in:
parent
fe1d81b4d5
commit
9e9ef56fdc
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user