mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-16 10:47:40 +07:00
Player spawning bugfix
This commit is contained in:
@ -855,13 +855,13 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
|||||||
byte mechid = stream.readByte();
|
byte mechid = stream.readByte();
|
||||||
int spawner = stream.readInt();
|
int spawner = stream.readInt();
|
||||||
Tile stile = world.tile(spawner);
|
Tile stile = world.tile(spawner);
|
||||||
if(stile != null && stile.entity instanceof SpawnerTrait){
|
|
||||||
lastSpawner = (SpawnerTrait)stile.entity;
|
|
||||||
}
|
|
||||||
Player player = headless ? this : Vars.player;
|
Player player = headless ? this : Vars.player;
|
||||||
player.readSaveSuper(stream, version);
|
player.readSaveSuper(stream, version);
|
||||||
player.mech = content.getByID(ContentType.mech, mechid);
|
player.mech = content.getByID(ContentType.mech, mechid);
|
||||||
player.dead = false;
|
player.dead = false;
|
||||||
|
if(stile != null && stile.entity instanceof SpawnerTrait){
|
||||||
|
player.lastSpawner = (SpawnerTrait)stile.entity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user