mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-28 00:19:57 +07:00
Fixed carry entity chain reaction
This commit is contained in:
parent
23188df276
commit
fc07c5efa6
@ -32,14 +32,14 @@ public interface CarryTrait extends TeamTrait, SolidTrait, TargetTrait{
|
||||
CallEntity.setCarryOf(this instanceof Player ? (Player)this : null, this, unit);
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server, targets = Loc.both, forward = true, in = In.entities)
|
||||
@Remote(called = Loc.both, targets = Loc.both, forward = true, in = In.entities)
|
||||
static void dropSelf(Player player){
|
||||
if(player.getCarrier() != null){
|
||||
player.getCarrier().dropCarry();
|
||||
}
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server, targets = Loc.both, forward = true, in = In.entities)
|
||||
@Remote(called = Loc.both, targets = Loc.both, forward = true, in = In.entities)
|
||||
static void setCarryOf(Player player, CarryTrait trait, CarriableTrait unit){
|
||||
if(player != null){ //when a server recieves this called from a player, set the carrier to the player.
|
||||
trait = player;
|
||||
|
Loading…
Reference in New Issue
Block a user