mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-22 13:48:25 +07:00
Fixed payEnter creating ghost units
This commit is contained in:
@ -424,8 +424,15 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
unit.remove();
|
unit.remove();
|
||||||
|
|
||||||
//needs new ID as it is now a payload
|
//needs new ID as it is now a payload
|
||||||
unit.id = EntityGroup.nextId();
|
if(net.client()){
|
||||||
|
unit.id = EntityGroup.nextId();
|
||||||
|
}else{
|
||||||
|
//server-side, this needs to be delayed until next frame because otherwise the packets sent out right after this event would have the wrong unit ID, leading to ghosts
|
||||||
|
Core.app.post(() -> unit.id = EntityGroup.nextId());
|
||||||
|
}
|
||||||
|
|
||||||
grabber.get(new UnitPayload(unit));
|
grabber.get(new UnitPayload(unit));
|
||||||
Fx.unitDrop.at(unit);
|
Fx.unitDrop.at(unit);
|
||||||
}
|
}
|
||||||
|
@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=f106eee2
|
archash=916c5a77
|
||||||
|
Reference in New Issue
Block a user