Fixed bugs with team assignment

This commit is contained in:
Anuken
2018-10-14 09:41:19 -04:00
parent 4eb2c1f646
commit 9b42be560d
7 changed files with 758 additions and 743 deletions

View File

@@ -8,7 +8,6 @@ import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Queue;
import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.Annotations.Remote;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.content.fx.UnitFx;
import io.anuke.mindustry.entities.effect.ScorchDecal;
@@ -727,12 +726,14 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
//region utility methods
public void toggleTeam(){
team = (team == Team.blue ? Team.red : Team.blue);
}
/** Resets all values of the player.*/
public void reset(){
resetNoAdd();
add();
}
public void resetNoAdd(){
status.clear();
team = Team.blue;
inventory.clear();
@@ -744,8 +745,6 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
boostHeat = drownTime = hitTime = 0f;
mech = (isMobile ? Mechs.starterMobile : Mechs.starterDesktop);
placeQueue.clear();
add();
}
public boolean isShooting(){