Fixed carry entity chain reaction
This commit is contained in:
@@ -32,14 +32,14 @@ public interface CarryTrait extends TeamTrait, SolidTrait, TargetTrait{
|
|||||||
CallEntity.setCarryOf(this instanceof Player ? (Player)this : null, this, unit);
|
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){
|
static void dropSelf(Player player){
|
||||||
if(player.getCarrier() != null){
|
if(player.getCarrier() != null){
|
||||||
player.getCarrier().dropCarry();
|
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){
|
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.
|
if(player != null){ //when a server recieves this called from a player, set the carrier to the player.
|
||||||
trait = player;
|
trait = player;
|
||||||
|
|||||||
Reference in New Issue
Block a user