private void ApplyArmorShaders() { if (player.HeadDye() != null) { player.cHead = ShaderLoader.GetShaderIDNum(player.HeadDye()); } if (player.BodyDye() != null) { player.cBody = ShaderLoader.GetShaderIDNum(player.BodyDye()); } if (player.LegsDye() != null) { player.cLegs = ShaderLoader.GetShaderIDNum(player.LegsDye()); } if (player.wearsRobe) { player.cLegs = player.cBody; } }
private void ApplyArmorShaders(ref PlayerDrawInfo drawInfo) { if (!player.HeadDye().IsAir) { drawInfo.headArmorShader = ShaderLoader.GetShaderIDNum(player.HeadDye()); } if (!player.BodyDye().IsAir) { drawInfo.bodyArmorShader = ShaderLoader.GetShaderIDNum(player.BodyDye()); } if (!player.LegsDye().IsAir) { drawInfo.legArmorShader = ShaderLoader.GetShaderIDNum(player.LegsDye()); player.cLegs = ShaderLoader.GetShaderIDNum(player.LegsDye()); } if (player.wearsRobe) { drawInfo.legArmorShader = drawInfo.bodyArmorShader; } }
private void ApplyAccessoryShaders() { int shaderId; void ApplyShader(ref int output, int slot, int max) { if (slot > 0 && slot < max) { output = shaderId; } } for (int x = 0; x < 20; x++) { int num = x % 10; shaderId = ShaderLoader.GetShaderIDNum(player.dye[num]); Item accessory = player.armor[x]; if (player.dye[num] != null && accessory.type != ItemID.None && accessory.stack > 0 && (x / 10 >= 1 || !player.hideVisual[num] || accessory.wingSlot > 0 || accessory.type == ItemID.FlyingCarpet)) { ApplyShader(ref player.cHandOn, accessory.handOnSlot, 19); ApplyShader(ref player.cHandOff, accessory.handOffSlot, 12); ApplyShader(ref player.cBack, accessory.backSlot, 11); ApplyShader(ref player.cFront, accessory.frontSlot, 5); ApplyShader(ref player.cShoe, accessory.shoeSlot, 18); ApplyShader(ref player.cWaist, accessory.waistSlot, 12); ApplyShader(ref player.cShield, accessory.shieldSlot, 6); ApplyShader(ref player.cNeck, accessory.neckSlot, 9); ApplyShader(ref player.cFace, accessory.faceSlot, 9); ApplyShader(ref player.cBalloon, accessory.balloonSlot, 16); ApplyShader(ref player.cWings, accessory.wingSlot, 37); if (accessory.type == ItemID.FlyingCarpet) { player.cCarpet = shaderId; } } } }
private void ApplyAccessoryShaders(ref PlayerDrawInfo drawInfo) { int shaderId; void ApplyShader(ref int output, int slot, int max) { if (slot > 0 && slot < max) { output = shaderId; } } for (int x = 0; x < 20; x++) { int num = x % 10; shaderId = ShaderLoader.GetShaderIDNum(player.dye[num]); Item accessory = player.armor[x]; if (player.dye[num] != null && accessory.type != ItemID.None && accessory.stack > 0 && (x / 10 >= 1 || !player.hideVisual[num] || accessory.wingSlot > 0 || accessory.type == ItemID.FlyingCarpet)) { ApplyShader(ref drawInfo.handOnShader, accessory.handOnSlot, 19); ApplyShader(ref drawInfo.handOffShader, accessory.handOffSlot, 12); ApplyShader(ref drawInfo.backShader, accessory.backSlot, 11); ApplyShader(ref drawInfo.frontShader, accessory.frontSlot, 5); ApplyShader(ref drawInfo.shoeShader, accessory.shoeSlot, 18); ApplyShader(ref drawInfo.waistShader, accessory.waistSlot, 12); ApplyShader(ref drawInfo.shieldShader, accessory.shieldSlot, 6); ApplyShader(ref drawInfo.neckShader, accessory.neckSlot, 9); ApplyShader(ref drawInfo.faceShader, accessory.faceSlot, 9); ApplyShader(ref drawInfo.balloonShader, accessory.balloonSlot, 16); ApplyShader(ref drawInfo.wingShader, accessory.wingSlot, 37); if (accessory.type == ItemID.FlyingCarpet) { drawInfo.carpetShader = shaderId; } } } }
private void ApplyMiscShaders() { if (player.PetDye() != null) { player.cPet = ShaderLoader.GetShaderIDNum(player.PetDye()); } if (player.LightDye() != null) { player.cLight = ShaderLoader.GetShaderIDNum(player.LightDye()); } if (player.MinecartDye() != null) { player.cMinecart = ShaderLoader.GetShaderIDNum(player.MinecartDye()); } if (player.MountDye() != null) { player.cMount = ShaderLoader.GetShaderIDNum(player.MountDye()); } if (player.GrappleDye() != null) { player.cGrapple = ShaderLoader.GetShaderIDNum(player.GrappleDye()); } player.cYorai = player.cPet; }