rewrite: bed spawning for SSC

This commit is contained in:
Joseph Goh 2025-01-27 09:58:40 +08:00 committed by PotatoCider
parent e4e28cb1b5
commit 836cc33c8d
5 changed files with 90 additions and 61 deletions

View file

@ -104,16 +104,8 @@ namespace TShockAPI
this.maxHealth = player.TPlayer.statLifeMax;
this.mana = player.TPlayer.statMana;
this.maxMana = player.TPlayer.statManaMax;
if (player.sX > 0 && player.sY > 0)
{
this.spawnX = player.sX;
this.spawnY = player.sY;
}
else
{
this.spawnX = player.TPlayer.SpawnX;
this.spawnY = player.TPlayer.SpawnY;
}
this.spawnX = player.TPlayer.SpawnX;
this.spawnY = player.TPlayer.SpawnY;
extraSlot = player.TPlayer.extraAccessory ? 1 : 0;
this.skinVariant = player.TPlayer.skinVariant;
this.hair = player.TPlayer.hair;
@ -266,8 +258,6 @@ namespace TShockAPI
player.TPlayer.statManaMax = this.maxMana;
player.TPlayer.SpawnX = this.spawnX;
player.TPlayer.SpawnY = this.spawnY;
player.sX = this.spawnX;
player.sY = this.spawnY;
player.TPlayer.hairDye = this.hairDye;
player.TPlayer.anglerQuestsFinished = this.questsCompleted;
player.TPlayer.UsingBiomeTorches = this.usingBiomeTorches == 1;