Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LoadPlayer_LastMinuteFixes()

static void Terraria.Player.LoadPlayer_LastMinuteFixes ( Player newPlayer)
inlinestaticprivate

Definition at line 52242 of file Player.cs.

52243 {
52244 newPlayer.skinVariant = (int)MathHelper.Clamp(newPlayer.skinVariant, 0f, PlayerVariantID.Count - 1);
52245 for (int i = 3; i < 10; i++)
52246 {
52247 int type = newPlayer.armor[i].type;
52248 if (type == 908 || type == 5000)
52249 {
52250 newPlayer.lavaMax += 420;
52251 }
52252 if (type == 906 || type == 4038 || type == 3999 || type == 4003)
52253 {
52254 newPlayer.lavaMax += 420;
52255 }
52256 if (newPlayer.wingsLogic == 0 && newPlayer.armor[i].wingSlot >= 0)
52257 {
52258 newPlayer.wingsLogic = newPlayer.armor[i].wingSlot;
52259 }
52260 if (type == 158 || type == 396 || type == 1250 || type == 1251 || type == 1252)
52261 {
52262 newPlayer.noFallDmg = true;
52263 }
52264 if (type == 860 || type == 535)
52265 {
52266 newPlayer.pStone = true;
52267 }
52268 newPlayer.lavaTime = newPlayer.lavaMax;
52269 }
52270 newPlayer.FixLoadedData();
52271 }
static float Clamp(float value, float min, float max)
Definition MathHelper.cs:46
static readonly int Count

References Microsoft.Xna.Framework.MathHelper.Clamp(), Terraria.ID.PlayerVariantID.Count, and System.type.