Bugfixes
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user