mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-23 06:07:47 +07:00
More testing
This commit is contained in:
@ -72,6 +72,11 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
||||
private Vector2 movement = new Vector2();
|
||||
private boolean moved;
|
||||
|
||||
{
|
||||
RuntimeException e = new RuntimeException("player " + name);
|
||||
Core.app.post(e::printStackTrace);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region unit and event overrides, utility methods
|
||||
@ -254,7 +259,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "Player{" + id + ", mech=" + mech.name + ", local=" + isLocal + ", " + x + ", " + y + "}";
|
||||
return "Player{" + name + ", mech=" + mech.name + ", id=" + id + ", local=" + isLocal + ", " + x + ", " + y + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -799,13 +799,13 @@ public class ServerControl implements ApplicationListener{
|
||||
private void play(boolean wait, Runnable run){
|
||||
inExtraRound = true;
|
||||
Runnable r = () -> {
|
||||
|
||||
Array<Player> players = new Array<>();
|
||||
Log.info("Players: " + playerGroup.all());
|
||||
for(Player p : playerGroup.all()){
|
||||
players.add(p);
|
||||
p.setDead(true);
|
||||
}
|
||||
|
||||
Log.info("Group contents:\n{0}\n{1}\n\n", players, playerGroup.all());
|
||||
|
||||
logic.reset();
|
||||
|
||||
@ -814,11 +814,9 @@ public class ServerControl implements ApplicationListener{
|
||||
logic.play();
|
||||
state.rules = world.getMap().applyRules(lastMode);
|
||||
|
||||
Log.info("Player array: " + players);
|
||||
Log.info("Group contents post:\n{0}\n{1}\n\n", players, playerGroup.all());
|
||||
|
||||
for(Player p : players){
|
||||
|
||||
Log.info("Iterate thorugh: " + p);
|
||||
p.reset();
|
||||
if(state.rules.pvp){
|
||||
p.setTeam(netServer.assignTeam(p, new ArrayIterable<>(players)));
|
||||
|
Reference in New Issue
Block a user