mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-14 10:50:58 -07:00
Bugfixes
This commit is contained in:
parent
e6d7330f6e
commit
ba91fb8eb7
1 changed files with 9 additions and 10 deletions
|
|
@ -413,19 +413,18 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||
|
||||
}
|
||||
|
||||
public void handleUnitPayload(Unit player, Cons<Payload> grabber){
|
||||
Fx.spawn.at(player);
|
||||
public void handleUnitPayload(Unit unit, Cons<Payload> grabber){
|
||||
Fx.spawn.at(unit);
|
||||
|
||||
if(player.isPlayer()){
|
||||
player.getPlayer().clearUnit();
|
||||
if(unit.isPlayer()){
|
||||
unit.getPlayer().clearUnit();
|
||||
}
|
||||
|
||||
player.remove();
|
||||
grabber.get(new UnitPayload(player));
|
||||
Fx.unitDrop.at(player);
|
||||
if(Vars.net.client()){
|
||||
Vars.netClient.clearRemovedEntity(player.id);
|
||||
}
|
||||
unit.remove();
|
||||
//needs new ID as it is now a payload
|
||||
unit.id = EntityGroup.nextId();
|
||||
grabber.get(new UnitPayload(unit));
|
||||
Fx.unitDrop.at(unit);
|
||||
}
|
||||
|
||||
public boolean canUnload(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue