mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-05 18:30:22 -08:00
Exclude player caller from packet's fields (#7368)
This commit is contained in:
parent
fe1d81b4d5
commit
9e9ef56fdc
1 changed files with 7 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue