public static void Initialize(ref int[] array) { Mount.MountData mountData = new Mount.MountData(); Mount.mounts[14] = mountData; mountData.spawnDust = 201; mountData.buff = 208; mountData.heightBoost = 16; mountData.flightTimeMax = 640; mountData.fatigueMax = 160; mountData.fallDamage = 0f; mountData.usesHover = true; mountData.runSpeed = 6f; mountData.dashSpeed = 6f; mountData.acceleration = 0.6f; mountData.jumpHeight = 15; mountData.jumpSpeed = 6f; mountData.blockExtraJumps = true; mountData.totalFrames = 3; array = new int[mountData.totalFrames]; for (int num = 0; num < array.Length; num++) { array[num] = 28; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 18; mountData.standingFrameCount = 3; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 3; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 3; mountData.flyingFrameDelay = 12; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 3; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 3; mountData.idleFrameDelay = 12; mountData.idleFrameStart = 0; mountData.idleFrameLoop = true; mountData.swimFrameCount = 0; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 0; if (Main.netMode != 2) { mountData.backTexture = foamMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } }
public static void Initialize() { Mount.mounts = new Mount.MountData[14]; Mount.MountData mountDatum = new Mount.MountData(); Mount.mounts[0] = mountDatum; mountDatum.spawnDust = 57; mountDatum.spawnDustNoGravity = false; mountDatum.buff = 90; mountDatum.heightBoost = 20; mountDatum.flightTimeMax = 160; mountDatum.runSpeed = 5.5f; mountDatum.dashSpeed = 12f; mountDatum.acceleration = 0.09f; mountDatum.jumpHeight = 17; mountDatum.jumpSpeed = 5.31f; mountDatum.totalFrames = 12; int[] numArray = new int[mountDatum.totalFrames]; for (int i = 0; i < (int)numArray.Length; i++) { numArray[i] = 30; } numArray[1] = numArray[1] + 2; numArray[11] = numArray[11] + 2; mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 13; mountDatum.bodyFrame = 3; mountDatum.yOffset = -7; mountDatum.playerHeadOffset = 22; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 6; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 6; mountDatum.flyingFrameCount = 6; mountDatum.flyingFrameDelay = 6; mountDatum.flyingFrameStart = 6; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 1; mountDatum.idleFrameCount = 4; mountDatum.idleFrameDelay = 30; mountDatum.idleFrameStart = 2; mountDatum.idleFrameLoop = true; mountDatum.swimFrameCount = mountDatum.inAirFrameCount; mountDatum.swimFrameDelay = mountDatum.inAirFrameDelay; mountDatum.swimFrameStart = mountDatum.inAirFrameStart; mountDatum = new Mount.MountData(); Mount.mounts[2] = mountDatum; mountDatum.spawnDust = 58; mountDatum.buff = 129; mountDatum.heightBoost = 20; mountDatum.flightTimeMax = 160; mountDatum.runSpeed = 5f; mountDatum.dashSpeed = 9f; mountDatum.acceleration = 0.08f; mountDatum.jumpHeight = 10; mountDatum.jumpSpeed = 6.01f; mountDatum.totalFrames = 16; numArray = new int[mountDatum.totalFrames]; for (int j = 0; j < (int)numArray.Length; j++) { numArray[j] = 22; } numArray[12] = numArray[12] + 2; numArray[13] = numArray[13] + 4; numArray[14] = numArray[14] + 2; mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 8; mountDatum.playerHeadOffset = 22; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 7; mountDatum.runningFrameCount = 5; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 11; mountDatum.flyingFrameCount = 6; mountDatum.flyingFrameDelay = 6; mountDatum.flyingFrameStart = 1; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 3; mountDatum.idleFrameDelay = 30; mountDatum.idleFrameStart = 8; mountDatum.idleFrameLoop = false; mountDatum.swimFrameCount = mountDatum.inAirFrameCount; mountDatum.swimFrameDelay = mountDatum.inAirFrameDelay; mountDatum.swimFrameStart = mountDatum.inAirFrameStart; mountDatum = new Mount.MountData(); Mount.mounts[1] = mountDatum; mountDatum.spawnDust = 15; mountDatum.buff = 128; mountDatum.heightBoost = 20; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 0.8f; mountDatum.runSpeed = 4f; mountDatum.dashSpeed = 7.5f; mountDatum.acceleration = 0.13f; mountDatum.jumpHeight = 15; mountDatum.jumpSpeed = 5.01f; mountDatum.totalFrames = 7; numArray = new int[mountDatum.totalFrames]; for (int k = 0; k < (int)numArray.Length; k++) { numArray[k] = 14; } numArray[2] = numArray[2] + 2; numArray[3] = numArray[3] + 4; numArray[4] = numArray[4] + 8; numArray[5] = numArray[5] + 8; mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 4; mountDatum.playerHeadOffset = 22; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 7; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 6; mountDatum.flyingFrameDelay = 6; mountDatum.flyingFrameStart = 1; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 5; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum.swimFrameCount = mountDatum.inAirFrameCount; mountDatum.swimFrameDelay = mountDatum.inAirFrameDelay; mountDatum.swimFrameStart = mountDatum.inAirFrameStart; mountDatum = new Mount.MountData(); Mount.mounts[3] = mountDatum; mountDatum.spawnDust = 56; mountDatum.buff = 130; mountDatum.heightBoost = 20; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 0.5f; mountDatum.runSpeed = 4f; mountDatum.dashSpeed = 4f; mountDatum.acceleration = 0.18f; mountDatum.jumpHeight = 12; mountDatum.jumpSpeed = 8.25f; mountDatum.constantJump = true; mountDatum.totalFrames = 4; numArray = new int[mountDatum.totalFrames]; for (int l = 0; l < (int)numArray.Length; l++) { numArray[l] = 20; } numArray[1] = numArray[1] + 2; numArray[3] = numArray[3] - 2; mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 10; mountDatum.playerHeadOffset = 22; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 4; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 0; mountDatum.flyingFrameDelay = 0; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 1; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum = new Mount.MountData(); Mount.mounts[6] = mountDatum; mountDatum.Minecart = true; mountDatum.MinecartDirectional = true; mountDatum.spawnDust = 213; mountDatum.buff = 118; mountDatum.extraBuff = 138; mountDatum.heightBoost = 10; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 1f; mountDatum.runSpeed = 13f; mountDatum.dashSpeed = 13f; mountDatum.acceleration = 0.04f; mountDatum.jumpHeight = 15; mountDatum.jumpSpeed = 5.15f; mountDatum.blockExtraJumps = true; mountDatum.totalFrames = 3; numArray = new int[mountDatum.totalFrames]; for (int m = 0; m < (int)numArray.Length; m++) { numArray[m] = 8; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 13; mountDatum.playerHeadOffset = 14; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 3; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 0; mountDatum.flyingFrameDelay = 0; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 0; mountDatum.inAirFrameDelay = 0; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum = new Mount.MountData(); Mount.mounts[4] = mountDatum; mountDatum.spawnDust = 56; mountDatum.buff = 131; mountDatum.heightBoost = 26; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 1f; mountDatum.runSpeed = 2f; mountDatum.dashSpeed = 2f; mountDatum.swimSpeed = 6f; mountDatum.acceleration = 0.08f; mountDatum.jumpHeight = 10; mountDatum.jumpSpeed = 3.15f; mountDatum.totalFrames = 12; numArray = new int[mountDatum.totalFrames]; for (int n = 0; n < (int)numArray.Length; n++) { numArray[n] = 26; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 13; mountDatum.playerHeadOffset = 30; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 6; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 0; mountDatum.flyingFrameDelay = 0; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 3; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum.swimFrameCount = 6; mountDatum.swimFrameDelay = 12; mountDatum.swimFrameStart = 6; mountDatum = new Mount.MountData(); Mount.mounts[5] = mountDatum; mountDatum.spawnDust = 152; mountDatum.buff = 132; mountDatum.heightBoost = 16; mountDatum.flightTimeMax = 320; mountDatum.fatigueMax = 320; mountDatum.fallDamage = 0f; mountDatum.usesHover = true; mountDatum.runSpeed = 2f; mountDatum.dashSpeed = 2f; mountDatum.acceleration = 0.16f; mountDatum.jumpHeight = 10; mountDatum.jumpSpeed = 4f; mountDatum.blockExtraJumps = true; mountDatum.totalFrames = 12; numArray = new int[mountDatum.totalFrames]; for (int o = 0; o < (int)numArray.Length; o++) { numArray[o] = 16; } numArray[8] = 18; mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 4; mountDatum.playerHeadOffset = 18; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 5; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 3; mountDatum.flyingFrameDelay = 12; mountDatum.flyingFrameStart = 5; mountDatum.inAirFrameCount = 3; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 5; mountDatum.idleFrameCount = 4; mountDatum.idleFrameDelay = 12; mountDatum.idleFrameStart = 8; mountDatum.idleFrameLoop = true; mountDatum.swimFrameCount = 0; mountDatum.swimFrameDelay = 12; mountDatum.swimFrameStart = 0; mountDatum = new Mount.MountData(); Mount.mounts[7] = mountDatum; mountDatum.spawnDust = 226; mountDatum.spawnDustNoGravity = true; mountDatum.buff = 141; mountDatum.heightBoost = 16; mountDatum.flightTimeMax = 320; mountDatum.fatigueMax = 320; mountDatum.fallDamage = 0f; mountDatum.usesHover = true; mountDatum.runSpeed = 8f; mountDatum.dashSpeed = 8f; mountDatum.acceleration = 0.16f; mountDatum.jumpHeight = 10; mountDatum.jumpSpeed = 4f; mountDatum.blockExtraJumps = true; mountDatum.totalFrames = 8; numArray = new int[mountDatum.totalFrames]; for (int p = 0; p < (int)numArray.Length; p++) { numArray[p] = 16; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 4; mountDatum.playerHeadOffset = 18; mountDatum.standingFrameCount = 8; mountDatum.standingFrameDelay = 4; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 8; mountDatum.runningFrameDelay = 4; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 8; mountDatum.flyingFrameDelay = 4; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 8; mountDatum.inAirFrameDelay = 4; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 12; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = true; mountDatum.swimFrameCount = 0; mountDatum.swimFrameDelay = 12; mountDatum.swimFrameStart = 0; mountDatum = new Mount.MountData(); Mount.mounts[8] = mountDatum; mountDatum.spawnDust = 226; mountDatum.buff = 142; mountDatum.heightBoost = 16; mountDatum.flightTimeMax = 320; mountDatum.fatigueMax = 320; mountDatum.fallDamage = 1f; mountDatum.usesHover = true; mountDatum.swimSpeed = 4f; mountDatum.runSpeed = 6f; mountDatum.dashSpeed = 4f; mountDatum.acceleration = 0.16f; mountDatum.jumpHeight = 10; mountDatum.jumpSpeed = 4f; mountDatum.blockExtraJumps = true; mountDatum.emitsLight = true; mountDatum.lightColor = new Vector3(0.3f, 0.3f, 0.4f); mountDatum.totalFrames = 1; numArray = new int[mountDatum.totalFrames]; for (int q = 0; q < (int)numArray.Length; q++) { numArray[q] = 4; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 4; mountDatum.playerHeadOffset = 18; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 1; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 1; mountDatum.flyingFrameDelay = 12; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 12; mountDatum.idleFrameStart = 8; mountDatum.swimFrameCount = 0; mountDatum.swimFrameDelay = 12; mountDatum.swimFrameStart = 0; Mount.drillTextureSize = new Vector2(80f, 80f); mountDatum = new Mount.MountData(); Mount.mounts[9] = mountDatum; mountDatum.spawnDust = 152; mountDatum.buff = 143; mountDatum.heightBoost = 16; mountDatum.flightTimeMax = 0; mountDatum.fatigueMax = 0; mountDatum.fallDamage = 0f; mountDatum.abilityChargeMax = 40; mountDatum.abilityCooldown = 20; mountDatum.abilityDuration = 0; mountDatum.runSpeed = 8f; mountDatum.dashSpeed = 8f; mountDatum.acceleration = 0.4f; mountDatum.jumpHeight = 22; mountDatum.jumpSpeed = 10.01f; mountDatum.blockExtraJumps = false; mountDatum.totalFrames = 12; numArray = new int[mountDatum.totalFrames]; for (int r = 0; r < (int)numArray.Length; r++) { numArray[r] = 16; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 6; mountDatum.playerHeadOffset = 18; mountDatum.standingFrameCount = 6; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 6; mountDatum.runningFrameCount = 6; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 0; mountDatum.flyingFrameDelay = 12; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 1; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 12; mountDatum.idleFrameStart = 6; mountDatum.idleFrameLoop = true; mountDatum.swimFrameCount = 0; mountDatum.swimFrameDelay = 12; mountDatum.swimFrameStart = 0; Mount.scutlixEyePositions = new Vector2[] { new Vector2(60f, 2f), new Vector2(70f, 6f), new Vector2(68f, 6f), new Vector2(76f, 12f), new Vector2(80f, 10f), new Vector2(84f, 18f), new Vector2(74f, 20f), new Vector2(76f, 24f), new Vector2(70f, 34f), new Vector2(76f, 34f) }; Mount.scutlixTextureSize = new Vector2(45f, 54f); for (int s = 0; s < (int)Mount.scutlixEyePositions.Length; s++) { Mount.scutlixEyePositions[s] = Mount.scutlixEyePositions[s] - Mount.scutlixTextureSize; } mountDatum = new Mount.MountData(); Mount.mounts[10] = mountDatum; mountDatum.spawnDust = 15; mountDatum.buff = 162; mountDatum.heightBoost = 34; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 0.2f; mountDatum.runSpeed = 4f; mountDatum.dashSpeed = 12f; mountDatum.acceleration = 0.3f; mountDatum.jumpHeight = 10; mountDatum.jumpSpeed = 8.01f; mountDatum.totalFrames = 16; numArray = new int[mountDatum.totalFrames]; for (int t = 0; t < (int)numArray.Length; t++) { numArray[t] = 28; } numArray[3] = numArray[3] + 2; numArray[4] = numArray[4] + 2; numArray[7] = numArray[7] + 2; numArray[8] = numArray[8] + 2; numArray[12] = numArray[12] + 2; numArray[13] = numArray[13] + 2; numArray[15] = numArray[15] + 4; mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 5; mountDatum.bodyFrame = 3; mountDatum.yOffset = 1; mountDatum.playerHeadOffset = 31; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 7; mountDatum.runningFrameDelay = 15; mountDatum.runningFrameStart = 1; mountDatum.dashingFrameCount = 6; mountDatum.dashingFrameDelay = 40; mountDatum.dashingFrameStart = 9; mountDatum.flyingFrameCount = 6; mountDatum.flyingFrameDelay = 6; mountDatum.flyingFrameStart = 1; mountDatum.inAirFrameCount = 1; mountDatum.inAirFrameDelay = 12; mountDatum.inAirFrameStart = 15; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum.swimFrameCount = mountDatum.inAirFrameCount; mountDatum.swimFrameDelay = mountDatum.inAirFrameDelay; mountDatum.swimFrameStart = mountDatum.inAirFrameStart; mountDatum = new Mount.MountData(); Mount.mounts[11] = mountDatum; mountDatum.Minecart = true; mountDatum.spawnDust = 213; mountDatum.buff = 167; mountDatum.extraBuff = 166; mountDatum.heightBoost = 12; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 1f; mountDatum.runSpeed = 20f; mountDatum.dashSpeed = 20f; mountDatum.acceleration = 0.1f; mountDatum.jumpHeight = 15; mountDatum.jumpSpeed = 5.15f; mountDatum.blockExtraJumps = true; mountDatum.totalFrames = 3; numArray = new int[mountDatum.totalFrames]; for (int u = 0; u < (int)numArray.Length; u++) { numArray[u] = 9; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = -1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 11; mountDatum.playerHeadOffset = 14; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 3; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 0; mountDatum.flyingFrameDelay = 0; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 0; mountDatum.inAirFrameDelay = 0; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum = new Mount.MountData(); Mount.mounts[12] = mountDatum; mountDatum.spawnDust = 15; mountDatum.buff = 168; mountDatum.heightBoost = 20; mountDatum.flightTimeMax = 320; mountDatum.fatigueMax = 320; mountDatum.fallDamage = 0f; mountDatum.usesHover = true; mountDatum.runSpeed = 2f; mountDatum.dashSpeed = 1f; mountDatum.acceleration = 0.2f; mountDatum.jumpHeight = 4; mountDatum.jumpSpeed = 3f; mountDatum.swimSpeed = 16f; mountDatum.blockExtraJumps = true; mountDatum.totalFrames = 23; numArray = new int[mountDatum.totalFrames]; for (int v = 0; v < (int)numArray.Length; v++) { numArray[v] = 12; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 2; mountDatum.bodyFrame = 3; mountDatum.yOffset = 16; mountDatum.playerHeadOffset = 31; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 8; mountDatum.runningFrameCount = 7; mountDatum.runningFrameDelay = 14; mountDatum.runningFrameStart = 8; mountDatum.flyingFrameCount = 8; mountDatum.flyingFrameDelay = 16; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 8; mountDatum.inAirFrameDelay = 6; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; mountDatum.swimFrameCount = 8; mountDatum.swimFrameDelay = 4; mountDatum.swimFrameStart = 15; mountDatum = new Mount.MountData(); Mount.mounts[13] = mountDatum; mountDatum.Minecart = true; mountDatum.MinecartDirectional = true; mountDatum.spawnDust = 213; mountDatum.buff = 184; mountDatum.extraBuff = 185; mountDatum.heightBoost = 10; mountDatum.flightTimeMax = 0; mountDatum.fallDamage = 1f; mountDatum.runSpeed = 10f; mountDatum.dashSpeed = 10f; mountDatum.acceleration = 0.03f; mountDatum.jumpHeight = 12; mountDatum.jumpSpeed = 5.15f; mountDatum.blockExtraJumps = true; mountDatum.totalFrames = 3; numArray = new int[mountDatum.totalFrames]; for (int w = 0; w < (int)numArray.Length; w++) { numArray[w] = 8; } mountDatum.playerYOffsets = numArray; mountDatum.xOffset = 1; mountDatum.bodyFrame = 3; mountDatum.yOffset = 13; mountDatum.playerHeadOffset = 14; mountDatum.standingFrameCount = 1; mountDatum.standingFrameDelay = 12; mountDatum.standingFrameStart = 0; mountDatum.runningFrameCount = 3; mountDatum.runningFrameDelay = 12; mountDatum.runningFrameStart = 0; mountDatum.flyingFrameCount = 0; mountDatum.flyingFrameDelay = 0; mountDatum.flyingFrameStart = 0; mountDatum.inAirFrameCount = 0; mountDatum.inAirFrameDelay = 0; mountDatum.inAirFrameStart = 0; mountDatum.idleFrameCount = 0; mountDatum.idleFrameDelay = 0; mountDatum.idleFrameStart = 0; mountDatum.idleFrameLoop = false; }
public void SetMount(int m, Player mountedPlayer, bool faceLeft = false) { if (this._type == m || m <= -1 || m >= 14) { return; } if (m == 5 && mountedPlayer.wet) { return; } if (!this._active) { this._active = true; } else { mountedPlayer.ClearBuff(this._data.buff); if (this.Cart) { mountedPlayer.ClearBuff(this._data.extraBuff); mountedPlayer.cartFlip = false; mountedPlayer.lastBoost = Vector2.Zero; } mountedPlayer.fullRotation = 0f; mountedPlayer.fullRotationOrigin = Vector2.Zero; this._mountSpecificData = null; } this._flyTime = 0; this._type = m; this._data = Mount.mounts[m]; this._fatigueMax = (float)this._data.fatigueMax; if (!this.Cart || faceLeft || this.Directional) { mountedPlayer.AddBuff(this._data.buff, 3600, true); this._flipDraw = false; } else { mountedPlayer.AddBuff(this._data.extraBuff, 3600, true); this._flipDraw = true; } if (this._type == 9 && this._abilityCooldown < 20) { this._abilityCooldown = 20; } mountedPlayer.position.Y = mountedPlayer.position.Y + (float)mountedPlayer.height; for (int i = 0; i < (int)mountedPlayer.shadowPos.Length; i++) { mountedPlayer.shadowPos[i].Y = mountedPlayer.shadowPos[i].Y + (float)mountedPlayer.height; } mountedPlayer.height = 42 + this._data.heightBoost; mountedPlayer.position.Y = mountedPlayer.position.Y - (float)mountedPlayer.height; for (int j = 0; j < (int)mountedPlayer.shadowPos.Length; j++) { mountedPlayer.shadowPos[j].Y = mountedPlayer.shadowPos[j].Y - (float)mountedPlayer.height; } if (this._type == 7 || this._type == 8) { mountedPlayer.fullRotationOrigin = new Vector2((float)(mountedPlayer.width / 2), (float)(mountedPlayer.height / 2)); } if (this._type == 8) { this._mountSpecificData = new Mount.DrillMountData(); } if (Main.netMode != 2) { } if (mountedPlayer.whoAmI == Main.myPlayer) { NetMessage.SendData(13, -1, -1, "", mountedPlayer.whoAmI, 0f, 0f, 0f, 0, 0, 0); } }
public static void Initialize() { Mount.mounts = new Mount.MountData[7]; Mount.MountData mountData = new Mount.MountData(); Mount.mounts[0] = mountData; mountData.spawnDust = 57; mountData.buff = 90; mountData.heightBoost = 20; mountData.flightTimeMax = 160; mountData.runSpeed = 5.5f; mountData.dashSpeed = 12f; mountData.acceleration = 0.09f; mountData.jumpHeight = 17; mountData.jumpSpeed = 5.31f; if (Main.netMode != 2) { mountData.backTexture = Main.rudolphMountTexture[0]; mountData.backTextureExtra = null; mountData.frontTexture = Main.rudolphMountTexture[1]; mountData.frontTextureExtra = Main.rudolphMountTexture[2]; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; mountData.totalFrames = 12; int[] array = new int[mountData.totalFrames]; for (int i = 0; i < array.Length; i++) { array[i] = 30; } array[1] += 2; array[11] += 2; mountData.playerYOffsets = array; mountData.xOffset = 13; mountData.bodyFrame = 3; mountData.yOffset = -7; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 6; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 6; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 6; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 1; mountData.idleFrameCount = 4; mountData.idleFrameDelay = 30; mountData.idleFrameStart = 2; mountData.idleFrameLoop = true; } mountData = new Mount.MountData(); Mount.mounts[2] = mountData; mountData.spawnDust = 58; mountData.buff = 129; mountData.heightBoost = 20; mountData.flightTimeMax = 160; mountData.runSpeed = 5f; mountData.dashSpeed = 9f; mountData.acceleration = 0.08f; mountData.jumpHeight = 10; mountData.jumpSpeed = 6.01f; if (Main.netMode != 2) { mountData.backTexture = Main.pigronMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; mountData.totalFrames = 16; int[] array = new int[mountData.totalFrames]; for (int j = 0; j < array.Length; j++) { array[j] = 22; } array[12] += 2; array[13] += 4; array[14] += 2; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 8; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 7; mountData.runningFrameCount = 5; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 11; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 1; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 3; mountData.idleFrameDelay = 30; mountData.idleFrameStart = 8; mountData.idleFrameLoop = false; } mountData = new Mount.MountData(); Mount.mounts[1] = mountData; mountData.spawnDust = 15; mountData.buff = 128; mountData.heightBoost = 20; mountData.flightTimeMax = 0; mountData.fallDamage = 0.8f; mountData.runSpeed = 4f; mountData.dashSpeed = 7.5f; mountData.acceleration = 0.13f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.01f; if (Main.netMode != 2) { mountData.backTexture = Main.bunnyMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; mountData.totalFrames = 7; int[] array = new int[mountData.totalFrames]; for (int k = 0; k < array.Length; k++) { array[k] = 14; } array[2] += 2; array[3] += 4; array[4] += 8; array[5] += 8; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 7; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 1; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 5; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; } mountData = new Mount.MountData(); Mount.mounts[3] = mountData; mountData.spawnDust = 56; mountData.buff = 130; mountData.heightBoost = 20; mountData.flightTimeMax = 0; mountData.fallDamage = 0.5f; mountData.runSpeed = 4f; mountData.dashSpeed = 4f; mountData.acceleration = 0.08f; mountData.jumpHeight = 22; mountData.jumpSpeed = 7.25f; mountData.constantJump = true; if (Main.netMode != 2) { mountData.backTexture = Main.slimeMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; mountData.totalFrames = 4; int[] array = new int[mountData.totalFrames]; for (int l = 0; l < array.Length; l++) { array[l] = 20; } array[1] += 2; array[3] -= 2; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 10; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 4; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 1; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; } mountData = new Mount.MountData(); Mount.mounts[6] = mountData; mountData.spawnDust = 213; mountData.buff = 118; mountData.extraBuff = 138; mountData.heightBoost = 10; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 13f; mountData.dashSpeed = 13f; mountData.acceleration = 0.04f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.15f; mountData.blockExtraJumps = true; if (Main.netMode != 2) { mountData.backTexture = null; mountData.backTextureExtra = null; mountData.frontTexture = Main.minecartMountTexture; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.frontTexture.Width; mountData.textureHeight = mountData.frontTexture.Height; mountData.totalFrames = 3; int[] array = new int[mountData.totalFrames]; for (int m = 0; m < array.Length; m++) { array[m] = 8; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 13; mountData.playerHeadOffset = 14; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 3; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 0; mountData.inAirFrameDelay = 0; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; } mountData = new Mount.MountData(); Mount.mounts[4] = mountData; mountData.spawnDust = 56; mountData.buff = 131; mountData.heightBoost = 26; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 2f; mountData.dashSpeed = 2f; mountData.swimSpeed = 6f; mountData.acceleration = 0.08f; mountData.jumpHeight = 10; mountData.jumpSpeed = 3.15f; if (Main.netMode != 2) { mountData.backTexture = Main.turtleMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; mountData.totalFrames = 12; int[] array = new int[mountData.totalFrames]; for (int n = 0; n < array.Length; n++) { array[n] = 26; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 13; mountData.playerHeadOffset = 30; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 6; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 3; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; mountData.swimFrameCount = 6; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 6; } mountData = new Mount.MountData(); Mount.mounts[5] = mountData; mountData.spawnDust = 152; mountData.buff = 132; mountData.heightBoost = 16; mountData.flightTimeMax = 320; mountData.fatigueMax = 320; mountData.fallDamage = 0f; mountData.runSpeed = 2f; mountData.dashSpeed = 2f; mountData.acceleration = 0.16f; mountData.jumpHeight = 10; mountData.jumpSpeed = 4f; mountData.blockExtraJumps = true; if (Main.netMode != 2) { mountData.backTexture = Main.beeMountTexture[0]; mountData.backTextureExtra = Main.beeMountTexture[1]; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; mountData.totalFrames = 12; int[] array = new int[mountData.totalFrames]; for (int num = 0; num < array.Length; num++) { array[num] = 16; } array[8] = 18; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 18; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 5; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 3; mountData.flyingFrameDelay = 12; mountData.flyingFrameStart = 5; mountData.inAirFrameCount = 3; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 5; mountData.idleFrameCount = 4; mountData.idleFrameDelay = 12; mountData.idleFrameStart = 8; mountData.idleFrameLoop = true; mountData.swimFrameCount = 0; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 0; } }
public void SetMount(int m, Player mountedPlayer, bool faceLeft = false) { if (this._type == m || m <= -1 || m >= 7) { return; } if (m == 5 && mountedPlayer.wet) { return; } if (this._active) { mountedPlayer.ClearBuff(this._data.buff); if (this._type == 6) { mountedPlayer.ClearBuff(this._data.extraBuff); mountedPlayer.cartFlip = false; mountedPlayer.fullRotation = 0f; mountedPlayer.fullRotationOrigin = Vector2.Zero; mountedPlayer.lastBoost = Vector2.Zero; } } else { this._active = true; } this._flyTime = 0; this._type = m; this._data = Mount.mounts[m]; this._fatigueMax = (float)this._data.fatigueMax; if (this._type == 6 && !faceLeft) { mountedPlayer.AddBuff(this._data.extraBuff, 3600, true); this._flipDraw = true; } else { mountedPlayer.AddBuff(this._data.buff, 3600, true); this._flipDraw = false; } mountedPlayer.position.Y = mountedPlayer.position.Y + (float)mountedPlayer.height; mountedPlayer.height = 42 + this._data.heightBoost; mountedPlayer.position.Y = mountedPlayer.position.Y - (float)mountedPlayer.height; if (Main.netMode != 2) { for (int i = 0; i < 100; i++) { if (this._type == 6) { if (i % 10 == 0) { int type = Main.rand.Next(61, 64); int num = Gore.NewGore(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), Vector2.Zero, type, 1f); Main.gore[num].alpha = 100; Main.gore[num].velocity = Vector2.Transform(new Vector2(1f, 0f), Matrix.CreateRotationZ((float)(Main.rand.NextDouble() * 6.2831854820251465))); } } else { int num2 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, this._data.spawnDust, 0f, 0f, 0, default(Color), 1f); Main.dust[num2].scale += (float)Main.rand.Next(-10, 21) * 0.01f; if (Main.rand.Next(2) == 0) { Main.dust[num2].scale *= 1.3f; Main.dust[num2].noGravity = true; } else { Main.dust[num2].velocity *= 0.5f; } Main.dust[num2].velocity += mountedPlayer.velocity * 0.8f; } } } if (mountedPlayer.whoAmi == Main.myPlayer) { NetMessage.SendData(13, -1, -1, "", mountedPlayer.whoAmi, 0f, 0f, 0f, 0); } }
public ModMountData() { mountData = new Mount.MountData(); }
void CopyDefToEntity(MountDef def, ref Mount.MountData mount) { if (mount == null) mount = new Mount.MountData(); mount.abilityChargeMax = def.MaxAbilityCharge; mount.abilityCooldown = def.AbilityCooldown ; mount.abilityDuration = def.AbilityDuration ; mount.heightBoost = def.AdditionalHeight; mount.playerHeadOffset = def.PlayerHeadOffset; mount.fatigueMax = def.MaxFatigue ; mount.flightTimeMax = def.MaxFlightTime; mount.jumpHeight = def.JumpHeight ; mount.spawnDust = def.SpawnDust ; mount.bodyFrame = def.BodyFrame ; mount.totalFrames = def.TotalFrames; mount.fallDamage = def.FallDamageMult; mount.acceleration = def.Acceleration ; mount.dashSpeed = def.DashSpeed ; mount.jumpSpeed = def.JumpSpeed ; mount.runSpeed = def.RunSpeed ; mount.swimSpeed = def.SwimSpeed ; mount.blockExtraJumps = def.BlockExtraJumps ; mount.constantJump = def.ConstantJump ; mount.emitsLight = def.EmitsLight ; mount.idleFrameLoop = def.IdleFrameLoop ; mount.Minecart = def.IsMinecart ; mount.MinecartDirectional = def.IsDirectionalMinecart; mount.spawnDustNoGravity = def.SpawnDustNoGravity ; mount.usesHover = def.UsesHover ; mount.playerYOffsets = def.PlayerYOffset; mount.MinecartDust = def.MinecartDust; mount.xOffset = def.Offset.X; mount.yOffset = def.Offset.Y; mount.lightColor = def.LightColour.ToVector3(); mount.dashingFrameCount = def.Dashing.Count ; mount.dashingFrameDelay = def.Dashing.Delay ; mount.dashingFrameStart = def.Dashing.Start ; mount.flyingFrameCount = def.Flying.Count ; mount.flyingFrameDelay = def.Flying.Delay ; mount.flyingFrameStart = def.Flying.Start ; mount.idleFrameCount = def.Idle.Count ; mount.idleFrameDelay = def.Idle.Delay ; mount.idleFrameStart = def.Idle.Start ; mount.inAirFrameCount = def.InAir.Count ; mount.inAirFrameDelay = def.InAir.Delay ; mount.inAirFrameStart = def.InAir.Start ; mount.runningFrameCount = def.Running.Count ; mount.runningFrameDelay = def.Running.Delay ; mount.runningFrameStart = def.Running.Start ; mount.standingFrameCount = def.Standing.Count; mount.standingFrameDelay = def.Standing.Delay; mount.standingFrameStart = def.Standing.Start; mount.swimFrameCount = def.Swim.Count ; mount.swimFrameDelay = def.Swim.Delay ; mount.swimFrameStart = def.Swim.Start ; mount.buff = def.Buff .Resolve().Type; mount.extraBuff = (def.ExpertBuff ?? def.Buff).Resolve().Type; mount.frontTexture = def.Front.GetNormal (); mount.frontTextureExtra = def.Front.GetExtra (); mount.frontTextureGlow = def.Front.GetGlow (); mount.frontTextureExtraGlow = def.Front.GetExtraGlow(); mount.backTexture = def.Back.GetNormal (); mount.backTextureExtra = def.Back.GetExtra (); mount.backTextureGlow = def.Back.GetGlow (); mount.backTextureExtraGlow = def.Back.GetExtraGlow(); mount.textureWidth = def.texSize.X; mount.textureHeight = def.texSize.Y; }
public void SetMount(int m, Player mountedPlayer, bool faceLeft = false) { if (this._type == m || m <= -1 || m >= 14) { return; } if (m == 5 && mountedPlayer.wet) { return; } if (this._active) { mountedPlayer.ClearBuff(this._data.buff); if (this.Cart) { mountedPlayer.ClearBuff(this._data.extraBuff); mountedPlayer.cartFlip = false; mountedPlayer.lastBoost = Vector2.Zero; } mountedPlayer.fullRotation = 0f; mountedPlayer.fullRotationOrigin = Vector2.Zero; this._mountSpecificData = null; } else { this._active = true; } this._flyTime = 0; this._type = m; this._data = Mount.mounts[m]; this._fatigueMax = (float)this._data.fatigueMax; if (this.Cart && !faceLeft && !this.Directional) { mountedPlayer.AddBuff(this._data.extraBuff, 3600, true); this._flipDraw = true; } else { mountedPlayer.AddBuff(this._data.buff, 3600, true); this._flipDraw = false; } if (this._type == 9 && this._abilityCooldown < 20) { this._abilityCooldown = 20; } mountedPlayer.position.Y = mountedPlayer.position.Y + (float)mountedPlayer.height; for (int i = 0; i < mountedPlayer.shadowPos.Length; i++) { Vector2[] expr_14D_cp_0 = mountedPlayer.shadowPos; int expr_14D_cp_1 = i; expr_14D_cp_0[expr_14D_cp_1].Y = expr_14D_cp_0[expr_14D_cp_1].Y + (float)mountedPlayer.height; } mountedPlayer.height = 42 + this._data.heightBoost; mountedPlayer.position.Y = mountedPlayer.position.Y - (float)mountedPlayer.height; for (int j = 0; j < mountedPlayer.shadowPos.Length; j++) { Vector2[] expr_1AC_cp_0 = mountedPlayer.shadowPos; int expr_1AC_cp_1 = j; expr_1AC_cp_0[expr_1AC_cp_1].Y = expr_1AC_cp_0[expr_1AC_cp_1].Y - (float)mountedPlayer.height; } if (this._type == 7 || this._type == 8) { mountedPlayer.fullRotationOrigin = new Vector2((float)(mountedPlayer.width / 2), (float)(mountedPlayer.height / 2)); } if (this._type == 8) { this._mountSpecificData = new Mount.DrillMountData(); } if (Main.netMode != 2) { for (int k = 0; k < 100; k++) { if (this._type == 6 || this._type == 11 || this._type == 13) { if (k % 10 == 0) { int type = Main.rand.Next(61, 64); int num = Gore.NewGore(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), Vector2.Zero, type, 1f); Main.gore[num].alpha = 100; Main.gore[num].velocity = Vector2.Transform(new Vector2(1f, 0f), Matrix.CreateRotationZ((float)(Main.rand.NextDouble() * 6.2831854820251465))); } } else { int num2 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, this._data.spawnDust, 0f, 0f, 0, default(Color), 1f); Main.dust[num2].scale += (float)Main.rand.Next(-10, 21) * 0.01f; if (this._data.spawnDustNoGravity) { Main.dust[num2].noGravity = true; } else if (Main.rand.Next(2) == 0) { Main.dust[num2].scale *= 1.3f; Main.dust[num2].noGravity = true; } else { Main.dust[num2].velocity *= 0.5f; } Main.dust[num2].velocity += mountedPlayer.velocity * 0.8f; } } } if (mountedPlayer.whoAmI == Main.myPlayer) { NetMessage.SendData(13, -1, -1, "", mountedPlayer.whoAmI, 0f, 0f, 0f, 0, 0, 0); } }
public static void Initialize() { Mount.mounts = new Mount.MountData[14]; Mount.MountData mountData = new Mount.MountData(); Mount.mounts[0] = mountData; mountData.spawnDust = 57; mountData.spawnDustNoGravity = false; mountData.buff = 90; mountData.heightBoost = 20; mountData.flightTimeMax = 160; mountData.runSpeed = 5.5f; mountData.dashSpeed = 12f; mountData.acceleration = 0.09f; mountData.jumpHeight = 17; mountData.jumpSpeed = 5.31f; mountData.totalFrames = 12; int[] array = new int[mountData.totalFrames]; for (int i = 0; i < array.Length; i++) { array[i] = 30; } array[1] += 2; array[11] += 2; mountData.playerYOffsets = array; mountData.xOffset = 13; mountData.bodyFrame = 3; mountData.yOffset = -7; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 6; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 6; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 6; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 1; mountData.idleFrameCount = 4; mountData.idleFrameDelay = 30; mountData.idleFrameStart = 2; mountData.idleFrameLoop = true; mountData.swimFrameCount = mountData.inAirFrameCount; mountData.swimFrameDelay = mountData.inAirFrameDelay; mountData.swimFrameStart = mountData.inAirFrameStart; if (Main.netMode != 2) { mountData.backTexture = Main.rudolphMountTexture[0]; mountData.backTextureExtra = null; mountData.frontTexture = Main.rudolphMountTexture[1]; mountData.frontTextureExtra = Main.rudolphMountTexture[2]; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[2] = mountData; mountData.spawnDust = 58; mountData.buff = 129; mountData.heightBoost = 20; mountData.flightTimeMax = 160; mountData.runSpeed = 5f; mountData.dashSpeed = 9f; mountData.acceleration = 0.08f; mountData.jumpHeight = 10; mountData.jumpSpeed = 6.01f; mountData.totalFrames = 16; array = new int[mountData.totalFrames]; for (int j = 0; j < array.Length; j++) { array[j] = 22; } array[12] += 2; array[13] += 4; array[14] += 2; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 8; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 7; mountData.runningFrameCount = 5; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 11; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 1; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 3; mountData.idleFrameDelay = 30; mountData.idleFrameStart = 8; mountData.idleFrameLoop = false; mountData.swimFrameCount = mountData.inAirFrameCount; mountData.swimFrameDelay = mountData.inAirFrameDelay; mountData.swimFrameStart = mountData.inAirFrameStart; if (Main.netMode != 2) { mountData.backTexture = Main.pigronMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[1] = mountData; mountData.spawnDust = 15; mountData.buff = 128; mountData.heightBoost = 20; mountData.flightTimeMax = 0; mountData.fallDamage = 0.8f; mountData.runSpeed = 4f; mountData.dashSpeed = 7.5f; mountData.acceleration = 0.13f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.01f; mountData.totalFrames = 7; array = new int[mountData.totalFrames]; for (int k = 0; k < array.Length; k++) { array[k] = 14; } array[2] += 2; array[3] += 4; array[4] += 8; array[5] += 8; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 7; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 1; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 5; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; mountData.swimFrameCount = mountData.inAirFrameCount; mountData.swimFrameDelay = mountData.inAirFrameDelay; mountData.swimFrameStart = mountData.inAirFrameStart; if (Main.netMode != 2) { mountData.backTexture = Main.bunnyMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[3] = mountData; mountData.spawnDust = 56; mountData.buff = 130; mountData.heightBoost = 20; mountData.flightTimeMax = 0; mountData.fallDamage = 0.5f; mountData.runSpeed = 4f; mountData.dashSpeed = 4f; mountData.acceleration = 0.18f; mountData.jumpHeight = 12; mountData.jumpSpeed = 8.25f; mountData.constantJump = true; mountData.totalFrames = 4; array = new int[mountData.totalFrames]; for (int l = 0; l < array.Length; l++) { array[l] = 20; } array[1] += 2; array[3] -= 2; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 10; mountData.playerHeadOffset = 22; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 4; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 1; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; if (Main.netMode != 2) { mountData.backTexture = Main.slimeMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[6] = mountData; mountData.Minecart = true; mountData.MinecartDirectional = true; mountData.MinecartDust = new Action<Vector2>(DelegateMethods.Minecart.Sparks); mountData.spawnDust = 213; mountData.buff = 118; mountData.extraBuff = 138; mountData.heightBoost = 10; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 13f; mountData.dashSpeed = 13f; mountData.acceleration = 0.04f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.15f; mountData.blockExtraJumps = true; mountData.totalFrames = 3; array = new int[mountData.totalFrames]; for (int m = 0; m < array.Length; m++) { array[m] = 8; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 13; mountData.playerHeadOffset = 14; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 3; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 0; mountData.inAirFrameDelay = 0; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; if (Main.netMode != 2) { mountData.backTexture = null; mountData.backTextureExtra = null; mountData.frontTexture = Main.minecartMountTexture; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.frontTexture.Width; mountData.textureHeight = mountData.frontTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[4] = mountData; mountData.spawnDust = 56; mountData.buff = 131; mountData.heightBoost = 26; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 2f; mountData.dashSpeed = 2f; mountData.swimSpeed = 6f; mountData.acceleration = 0.08f; mountData.jumpHeight = 10; mountData.jumpSpeed = 3.15f; mountData.totalFrames = 12; array = new int[mountData.totalFrames]; for (int n = 0; n < array.Length; n++) { array[n] = 26; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 13; mountData.playerHeadOffset = 30; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 6; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 3; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; mountData.swimFrameCount = 6; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 6; if (Main.netMode != 2) { mountData.backTexture = Main.turtleMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[5] = mountData; mountData.spawnDust = 152; mountData.buff = 132; mountData.heightBoost = 16; mountData.flightTimeMax = 320; mountData.fatigueMax = 320; mountData.fallDamage = 0f; mountData.usesHover = true; mountData.runSpeed = 2f; mountData.dashSpeed = 2f; mountData.acceleration = 0.16f; mountData.jumpHeight = 10; mountData.jumpSpeed = 4f; mountData.blockExtraJumps = true; mountData.totalFrames = 12; array = new int[mountData.totalFrames]; for (int num = 0; num < array.Length; num++) { array[num] = 16; } array[8] = 18; mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 18; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 5; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 3; mountData.flyingFrameDelay = 12; mountData.flyingFrameStart = 5; mountData.inAirFrameCount = 3; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 5; mountData.idleFrameCount = 4; mountData.idleFrameDelay = 12; mountData.idleFrameStart = 8; mountData.idleFrameLoop = true; mountData.swimFrameCount = 0; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 0; if (Main.netMode != 2) { mountData.backTexture = Main.beeMountTexture[0]; mountData.backTextureExtra = Main.beeMountTexture[1]; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[7] = mountData; mountData.spawnDust = 226; mountData.spawnDustNoGravity = true; mountData.buff = 141; mountData.heightBoost = 16; mountData.flightTimeMax = 320; mountData.fatigueMax = 320; mountData.fallDamage = 0f; mountData.usesHover = true; mountData.runSpeed = 8f; mountData.dashSpeed = 8f; mountData.acceleration = 0.16f; mountData.jumpHeight = 10; mountData.jumpSpeed = 4f; mountData.blockExtraJumps = true; mountData.totalFrames = 8; array = new int[mountData.totalFrames]; for (int num2 = 0; num2 < array.Length; num2++) { array[num2] = 16; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 18; mountData.standingFrameCount = 8; mountData.standingFrameDelay = 4; mountData.standingFrameStart = 0; mountData.runningFrameCount = 8; mountData.runningFrameDelay = 4; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 8; mountData.flyingFrameDelay = 4; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 8; mountData.inAirFrameDelay = 4; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 12; mountData.idleFrameStart = 0; mountData.idleFrameLoop = true; mountData.swimFrameCount = 0; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 0; if (Main.netMode != 2) { mountData.backTexture = null; mountData.backTextureExtra = null; mountData.frontTexture = Main.UFOMountTexture[0]; mountData.frontTextureExtra = Main.UFOMountTexture[1]; mountData.textureWidth = mountData.frontTexture.Width; mountData.textureHeight = mountData.frontTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[8] = mountData; mountData.spawnDust = 226; mountData.buff = 142; mountData.heightBoost = 16; mountData.flightTimeMax = 320; mountData.fatigueMax = 320; mountData.fallDamage = 1f; mountData.usesHover = true; mountData.swimSpeed = 4f; mountData.runSpeed = 6f; mountData.dashSpeed = 4f; mountData.acceleration = 0.16f; mountData.jumpHeight = 10; mountData.jumpSpeed = 4f; mountData.blockExtraJumps = true; mountData.emitsLight = true; mountData.lightColor = new Vector3(0.3f, 0.3f, 0.4f); mountData.totalFrames = 1; array = new int[mountData.totalFrames]; for (int num3 = 0; num3 < array.Length; num3++) { array[num3] = 4; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 4; mountData.playerHeadOffset = 18; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 1; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 1; mountData.flyingFrameDelay = 12; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 12; mountData.idleFrameStart = 8; mountData.swimFrameCount = 0; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 0; if (Main.netMode != 2) { mountData.backTexture = Main.drillMountTexture[0]; mountData.backTextureGlow = Main.drillMountTexture[3]; mountData.backTextureExtra = null; mountData.backTextureExtraGlow = null; mountData.frontTexture = Main.drillMountTexture[1]; mountData.frontTextureGlow = Main.drillMountTexture[4]; mountData.frontTextureExtra = Main.drillMountTexture[2]; mountData.frontTextureExtraGlow = Main.drillMountTexture[5]; mountData.textureWidth = mountData.frontTexture.Width; mountData.textureHeight = mountData.frontTexture.Height; } Mount.drillTextureSize = new Vector2(80f, 80f); Vector2 value = new Vector2((float)mountData.textureWidth, (float)(mountData.textureHeight / mountData.totalFrames)); if (Mount.drillTextureSize != value) { throw new Exception(string.Concat(new object[] { "Be sure to update the Drill texture origin to match the actual texture size of ", mountData.textureWidth, ", ", mountData.textureHeight, "." })); } mountData = new Mount.MountData(); Mount.mounts[9] = mountData; mountData.spawnDust = 152; mountData.buff = 143; mountData.heightBoost = 16; mountData.flightTimeMax = 0; mountData.fatigueMax = 0; mountData.fallDamage = 0f; mountData.abilityChargeMax = 40; mountData.abilityCooldown = 20; mountData.abilityDuration = 0; mountData.runSpeed = 8f; mountData.dashSpeed = 8f; mountData.acceleration = 0.4f; mountData.jumpHeight = 22; mountData.jumpSpeed = 10.01f; mountData.blockExtraJumps = false; mountData.totalFrames = 12; array = new int[mountData.totalFrames]; for (int num4 = 0; num4 < array.Length; num4++) { array[num4] = 16; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 6; mountData.playerHeadOffset = 18; mountData.standingFrameCount = 6; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 6; mountData.runningFrameCount = 6; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 12; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 1; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 12; mountData.idleFrameStart = 6; mountData.idleFrameLoop = true; mountData.swimFrameCount = 0; mountData.swimFrameDelay = 12; mountData.swimFrameStart = 0; if (Main.netMode != 2) { mountData.backTexture = Main.scutlixMountTexture[0]; mountData.backTextureExtra = null; mountData.frontTexture = Main.scutlixMountTexture[1]; mountData.frontTextureExtra = Main.scutlixMountTexture[2]; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } Mount.scutlixEyePositions = new Vector2[10]; Mount.scutlixEyePositions[0] = new Vector2(60f, 2f); Mount.scutlixEyePositions[1] = new Vector2(70f, 6f); Mount.scutlixEyePositions[2] = new Vector2(68f, 6f); Mount.scutlixEyePositions[3] = new Vector2(76f, 12f); Mount.scutlixEyePositions[4] = new Vector2(80f, 10f); Mount.scutlixEyePositions[5] = new Vector2(84f, 18f); Mount.scutlixEyePositions[6] = new Vector2(74f, 20f); Mount.scutlixEyePositions[7] = new Vector2(76f, 24f); Mount.scutlixEyePositions[8] = new Vector2(70f, 34f); Mount.scutlixEyePositions[9] = new Vector2(76f, 34f); Mount.scutlixTextureSize = new Vector2(45f, 54f); Vector2 value2 = new Vector2((float)(mountData.textureWidth / 2), (float)(mountData.textureHeight / mountData.totalFrames)); if (Mount.scutlixTextureSize != value2) { throw new Exception(string.Concat(new object[] { "Be sure to update the Scutlix texture origin to match the actual texture size of ", mountData.textureWidth, ", ", mountData.textureHeight, "." })); } for (int num5 = 0; num5 < Mount.scutlixEyePositions.Length; num5++) { Mount.scutlixEyePositions[num5] -= Mount.scutlixTextureSize; } mountData = new Mount.MountData(); Mount.mounts[10] = mountData; mountData.spawnDust = 15; mountData.buff = 162; mountData.heightBoost = 34; mountData.flightTimeMax = 0; mountData.fallDamage = 0.2f; mountData.runSpeed = 4f; mountData.dashSpeed = 12f; mountData.acceleration = 0.3f; mountData.jumpHeight = 10; mountData.jumpSpeed = 8.01f; mountData.totalFrames = 16; array = new int[mountData.totalFrames]; for (int num6 = 0; num6 < array.Length; num6++) { array[num6] = 28; } array[3] += 2; array[4] += 2; array[7] += 2; array[8] += 2; array[12] += 2; array[13] += 2; array[15] += 4; mountData.playerYOffsets = array; mountData.xOffset = 5; mountData.bodyFrame = 3; mountData.yOffset = 1; mountData.playerHeadOffset = 31; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 7; mountData.runningFrameDelay = 15; mountData.runningFrameStart = 1; mountData.dashingFrameCount = 6; mountData.dashingFrameDelay = 40; mountData.dashingFrameStart = 9; mountData.flyingFrameCount = 6; mountData.flyingFrameDelay = 6; mountData.flyingFrameStart = 1; mountData.inAirFrameCount = 1; mountData.inAirFrameDelay = 12; mountData.inAirFrameStart = 15; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; mountData.swimFrameCount = mountData.inAirFrameCount; mountData.swimFrameDelay = mountData.inAirFrameDelay; mountData.swimFrameStart = mountData.inAirFrameStart; if (Main.netMode != 2) { mountData.backTexture = Main.unicornMountTexture; mountData.backTextureExtra = null; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[11] = mountData; mountData.Minecart = true; mountData.MinecartDust = new Action<Vector2>(DelegateMethods.Minecart.SparksMech); mountData.spawnDust = 213; mountData.buff = 167; mountData.extraBuff = 166; mountData.heightBoost = 12; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 20f; mountData.dashSpeed = 20f; mountData.acceleration = 0.1f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.15f; mountData.blockExtraJumps = true; mountData.totalFrames = 3; array = new int[mountData.totalFrames]; for (int num7 = 0; num7 < array.Length; num7++) { array[num7] = 9; } mountData.playerYOffsets = array; mountData.xOffset = -1; mountData.bodyFrame = 3; mountData.yOffset = 11; mountData.playerHeadOffset = 14; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 3; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 0; mountData.inAirFrameDelay = 0; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; if (Main.netMode != 2) { mountData.backTexture = null; mountData.backTextureExtra = null; mountData.frontTexture = Main.minecartMechMountTexture[0]; mountData.frontTextureGlow = Main.minecartMechMountTexture[1]; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.frontTexture.Width; mountData.textureHeight = mountData.frontTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[12] = mountData; mountData.spawnDust = 15; mountData.buff = 168; mountData.heightBoost = 20; mountData.flightTimeMax = 320; mountData.fatigueMax = 320; mountData.fallDamage = 0f; mountData.usesHover = true; mountData.runSpeed = 2f; mountData.dashSpeed = 1f; mountData.acceleration = 0.2f; mountData.jumpHeight = 4; mountData.jumpSpeed = 3f; mountData.swimSpeed = 16f; mountData.blockExtraJumps = true; mountData.totalFrames = 23; array = new int[mountData.totalFrames]; for (int num8 = 0; num8 < array.Length; num8++) { array[num8] = 12; } mountData.playerYOffsets = array; mountData.xOffset = 2; mountData.bodyFrame = 3; mountData.yOffset = 16; mountData.playerHeadOffset = 31; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 8; mountData.runningFrameCount = 7; mountData.runningFrameDelay = 14; mountData.runningFrameStart = 8; mountData.flyingFrameCount = 8; mountData.flyingFrameDelay = 16; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 8; mountData.inAirFrameDelay = 6; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; mountData.swimFrameCount = 8; mountData.swimFrameDelay = 4; mountData.swimFrameStart = 15; if (Main.netMode != 2) { mountData.backTexture = Main.cuteFishronMountTexture[0]; mountData.backTextureGlow = Main.cuteFishronMountTexture[1]; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } mountData = new Mount.MountData(); Mount.mounts[13] = mountData; mountData.Minecart = true; mountData.MinecartDirectional = true; mountData.MinecartDust = new Action<Vector2>(DelegateMethods.Minecart.Sparks); mountData.spawnDust = 213; mountData.buff = 184; mountData.extraBuff = 185; mountData.heightBoost = 10; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 10f; mountData.dashSpeed = 10f; mountData.acceleration = 0.03f; mountData.jumpHeight = 12; mountData.jumpSpeed = 5.15f; mountData.blockExtraJumps = true; mountData.totalFrames = 3; array = new int[mountData.totalFrames]; for (int num9 = 0; num9 < array.Length; num9++) { array[num9] = 8; } mountData.playerYOffsets = array; mountData.xOffset = 1; mountData.bodyFrame = 3; mountData.yOffset = 13; mountData.playerHeadOffset = 14; mountData.standingFrameCount = 1; mountData.standingFrameDelay = 12; mountData.standingFrameStart = 0; mountData.runningFrameCount = 3; mountData.runningFrameDelay = 12; mountData.runningFrameStart = 0; mountData.flyingFrameCount = 0; mountData.flyingFrameDelay = 0; mountData.flyingFrameStart = 0; mountData.inAirFrameCount = 0; mountData.inAirFrameDelay = 0; mountData.inAirFrameStart = 0; mountData.idleFrameCount = 0; mountData.idleFrameDelay = 0; mountData.idleFrameStart = 0; mountData.idleFrameLoop = false; if (Main.netMode != 2) { mountData.backTexture = null; mountData.backTextureExtra = null; mountData.frontTexture = Main.minecartWoodMountTexture; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.frontTexture.Width; mountData.textureHeight = mountData.frontTexture.Height; } }
public static void Initialize() { Mount.mounts = new Mount.MountData[14]; Mount.MountData mountData1 = new Mount.MountData(); Mount.mounts[0] = mountData1; mountData1.spawnDust = 57; mountData1.spawnDustNoGravity = false; mountData1.buff = 90; mountData1.heightBoost = 20; mountData1.flightTimeMax = 160; mountData1.runSpeed = 5.5f; mountData1.dashSpeed = 12f; mountData1.acceleration = 0.09f; mountData1.jumpHeight = 17; mountData1.jumpSpeed = 5.31f; mountData1.totalFrames = 12; int[] numArray1 = new int[mountData1.totalFrames]; for (int index = 0; index < numArray1.Length; ++index) numArray1[index] = 30; numArray1[1] += 2; numArray1[11] += 2; mountData1.playerYOffsets = numArray1; mountData1.xOffset = 13; mountData1.bodyFrame = 3; mountData1.yOffset = -7; mountData1.playerHeadOffset = 22; mountData1.standingFrameCount = 1; mountData1.standingFrameDelay = 12; mountData1.standingFrameStart = 0; mountData1.runningFrameCount = 6; mountData1.runningFrameDelay = 12; mountData1.runningFrameStart = 6; mountData1.flyingFrameCount = 6; mountData1.flyingFrameDelay = 6; mountData1.flyingFrameStart = 6; mountData1.inAirFrameCount = 1; mountData1.inAirFrameDelay = 12; mountData1.inAirFrameStart = 1; mountData1.idleFrameCount = 4; mountData1.idleFrameDelay = 30; mountData1.idleFrameStart = 2; mountData1.idleFrameLoop = true; mountData1.swimFrameCount = mountData1.inAirFrameCount; mountData1.swimFrameDelay = mountData1.inAirFrameDelay; mountData1.swimFrameStart = mountData1.inAirFrameStart; if (Main.netMode != 2) { mountData1.backTexture = Main.rudolphMountTexture[0]; mountData1.backTextureExtra = (Texture2D)null; mountData1.frontTexture = Main.rudolphMountTexture[1]; mountData1.frontTextureExtra = Main.rudolphMountTexture[2]; mountData1.textureWidth = mountData1.backTexture.Width; mountData1.textureHeight = mountData1.backTexture.Height; } Mount.MountData mountData2 = new Mount.MountData(); Mount.mounts[2] = mountData2; mountData2.spawnDust = 58; mountData2.buff = 129; mountData2.heightBoost = 20; mountData2.flightTimeMax = 160; mountData2.runSpeed = 5f; mountData2.dashSpeed = 9f; mountData2.acceleration = 0.08f; mountData2.jumpHeight = 10; mountData2.jumpSpeed = 6.01f; mountData2.totalFrames = 16; int[] numArray2 = new int[mountData2.totalFrames]; for (int index = 0; index < numArray2.Length; ++index) numArray2[index] = 22; numArray2[12] += 2; numArray2[13] += 4; numArray2[14] += 2; mountData2.playerYOffsets = numArray2; mountData2.xOffset = 1; mountData2.bodyFrame = 3; mountData2.yOffset = 8; mountData2.playerHeadOffset = 22; mountData2.standingFrameCount = 1; mountData2.standingFrameDelay = 12; mountData2.standingFrameStart = 7; mountData2.runningFrameCount = 5; mountData2.runningFrameDelay = 12; mountData2.runningFrameStart = 11; mountData2.flyingFrameCount = 6; mountData2.flyingFrameDelay = 6; mountData2.flyingFrameStart = 1; mountData2.inAirFrameCount = 1; mountData2.inAirFrameDelay = 12; mountData2.inAirFrameStart = 0; mountData2.idleFrameCount = 3; mountData2.idleFrameDelay = 30; mountData2.idleFrameStart = 8; mountData2.idleFrameLoop = false; mountData2.swimFrameCount = mountData2.inAirFrameCount; mountData2.swimFrameDelay = mountData2.inAirFrameDelay; mountData2.swimFrameStart = mountData2.inAirFrameStart; if (Main.netMode != 2) { mountData2.backTexture = Main.pigronMountTexture; mountData2.backTextureExtra = (Texture2D)null; mountData2.frontTexture = (Texture2D)null; mountData2.frontTextureExtra = (Texture2D)null; mountData2.textureWidth = mountData2.backTexture.Width; mountData2.textureHeight = mountData2.backTexture.Height; } Mount.MountData mountData3 = new Mount.MountData(); Mount.mounts[1] = mountData3; mountData3.spawnDust = 15; mountData3.buff = 128; mountData3.heightBoost = 20; mountData3.flightTimeMax = 0; mountData3.fallDamage = 0.8f; mountData3.runSpeed = 4f; mountData3.dashSpeed = 7.5f; mountData3.acceleration = 0.13f; mountData3.jumpHeight = 15; mountData3.jumpSpeed = 5.01f; mountData3.totalFrames = 7; int[] numArray3 = new int[mountData3.totalFrames]; for (int index = 0; index < numArray3.Length; ++index) numArray3[index] = 14; numArray3[2] += 2; numArray3[3] += 4; numArray3[4] += 8; numArray3[5] += 8; mountData3.playerYOffsets = numArray3; mountData3.xOffset = 1; mountData3.bodyFrame = 3; mountData3.yOffset = 4; mountData3.playerHeadOffset = 22; mountData3.standingFrameCount = 1; mountData3.standingFrameDelay = 12; mountData3.standingFrameStart = 0; mountData3.runningFrameCount = 7; mountData3.runningFrameDelay = 12; mountData3.runningFrameStart = 0; mountData3.flyingFrameCount = 6; mountData3.flyingFrameDelay = 6; mountData3.flyingFrameStart = 1; mountData3.inAirFrameCount = 1; mountData3.inAirFrameDelay = 12; mountData3.inAirFrameStart = 5; mountData3.idleFrameCount = 0; mountData3.idleFrameDelay = 0; mountData3.idleFrameStart = 0; mountData3.idleFrameLoop = false; mountData3.swimFrameCount = mountData3.inAirFrameCount; mountData3.swimFrameDelay = mountData3.inAirFrameDelay; mountData3.swimFrameStart = mountData3.inAirFrameStart; if (Main.netMode != 2) { mountData3.backTexture = Main.bunnyMountTexture; mountData3.backTextureExtra = (Texture2D)null; mountData3.frontTexture = (Texture2D)null; mountData3.frontTextureExtra = (Texture2D)null; mountData3.textureWidth = mountData3.backTexture.Width; mountData3.textureHeight = mountData3.backTexture.Height; } Mount.MountData mountData4 = new Mount.MountData(); Mount.mounts[3] = mountData4; mountData4.spawnDust = 56; mountData4.buff = 130; mountData4.heightBoost = 20; mountData4.flightTimeMax = 0; mountData4.fallDamage = 0.5f; mountData4.runSpeed = 4f; mountData4.dashSpeed = 4f; mountData4.acceleration = 0.18f; mountData4.jumpHeight = 12; mountData4.jumpSpeed = 8.25f; mountData4.constantJump = true; mountData4.totalFrames = 4; int[] numArray4 = new int[mountData4.totalFrames]; for (int index = 0; index < numArray4.Length; ++index) numArray4[index] = 20; numArray4[1] += 2; numArray4[3] -= 2; mountData4.playerYOffsets = numArray4; mountData4.xOffset = 1; mountData4.bodyFrame = 3; mountData4.yOffset = 10; mountData4.playerHeadOffset = 22; mountData4.standingFrameCount = 1; mountData4.standingFrameDelay = 12; mountData4.standingFrameStart = 0; mountData4.runningFrameCount = 4; mountData4.runningFrameDelay = 12; mountData4.runningFrameStart = 0; mountData4.flyingFrameCount = 0; mountData4.flyingFrameDelay = 0; mountData4.flyingFrameStart = 0; mountData4.inAirFrameCount = 1; mountData4.inAirFrameDelay = 12; mountData4.inAirFrameStart = 1; mountData4.idleFrameCount = 0; mountData4.idleFrameDelay = 0; mountData4.idleFrameStart = 0; mountData4.idleFrameLoop = false; if (Main.netMode != 2) { mountData4.backTexture = Main.slimeMountTexture; mountData4.backTextureExtra = (Texture2D)null; mountData4.frontTexture = (Texture2D)null; mountData4.frontTextureExtra = (Texture2D)null; mountData4.textureWidth = mountData4.backTexture.Width; mountData4.textureHeight = mountData4.backTexture.Height; } Mount.MountData mountData5 = new Mount.MountData(); Mount.mounts[6] = mountData5; mountData5.Minecart = true; mountData5.MinecartDirectional = true; mountData5.MinecartDust = new Action<Vector2>(DelegateMethods.Minecart.Sparks); mountData5.spawnDust = 213; mountData5.buff = 118; mountData5.extraBuff = 138; mountData5.heightBoost = 10; mountData5.flightTimeMax = 0; mountData5.fallDamage = 1f; mountData5.runSpeed = 13f; mountData5.dashSpeed = 13f; mountData5.acceleration = 0.04f; mountData5.jumpHeight = 15; mountData5.jumpSpeed = 5.15f; mountData5.blockExtraJumps = true; mountData5.totalFrames = 3; int[] numArray5 = new int[mountData5.totalFrames]; for (int index = 0; index < numArray5.Length; ++index) numArray5[index] = 8; mountData5.playerYOffsets = numArray5; mountData5.xOffset = 1; mountData5.bodyFrame = 3; mountData5.yOffset = 13; mountData5.playerHeadOffset = 14; mountData5.standingFrameCount = 1; mountData5.standingFrameDelay = 12; mountData5.standingFrameStart = 0; mountData5.runningFrameCount = 3; mountData5.runningFrameDelay = 12; mountData5.runningFrameStart = 0; mountData5.flyingFrameCount = 0; mountData5.flyingFrameDelay = 0; mountData5.flyingFrameStart = 0; mountData5.inAirFrameCount = 0; mountData5.inAirFrameDelay = 0; mountData5.inAirFrameStart = 0; mountData5.idleFrameCount = 0; mountData5.idleFrameDelay = 0; mountData5.idleFrameStart = 0; mountData5.idleFrameLoop = false; if (Main.netMode != 2) { mountData5.backTexture = (Texture2D)null; mountData5.backTextureExtra = (Texture2D)null; mountData5.frontTexture = Main.minecartMountTexture; mountData5.frontTextureExtra = (Texture2D)null; mountData5.textureWidth = mountData5.frontTexture.Width; mountData5.textureHeight = mountData5.frontTexture.Height; } Mount.MountData mountData6 = new Mount.MountData(); Mount.mounts[4] = mountData6; mountData6.spawnDust = 56; mountData6.buff = 131; mountData6.heightBoost = 26; mountData6.flightTimeMax = 0; mountData6.fallDamage = 1f; mountData6.runSpeed = 2f; mountData6.dashSpeed = 2f; mountData6.swimSpeed = 6f; mountData6.acceleration = 0.08f; mountData6.jumpHeight = 10; mountData6.jumpSpeed = 3.15f; mountData6.totalFrames = 12; int[] numArray6 = new int[mountData6.totalFrames]; for (int index = 0; index < numArray6.Length; ++index) numArray6[index] = 26; mountData6.playerYOffsets = numArray6; mountData6.xOffset = 1; mountData6.bodyFrame = 3; mountData6.yOffset = 13; mountData6.playerHeadOffset = 30; mountData6.standingFrameCount = 1; mountData6.standingFrameDelay = 12; mountData6.standingFrameStart = 0; mountData6.runningFrameCount = 6; mountData6.runningFrameDelay = 12; mountData6.runningFrameStart = 0; mountData6.flyingFrameCount = 0; mountData6.flyingFrameDelay = 0; mountData6.flyingFrameStart = 0; mountData6.inAirFrameCount = 1; mountData6.inAirFrameDelay = 12; mountData6.inAirFrameStart = 3; mountData6.idleFrameCount = 0; mountData6.idleFrameDelay = 0; mountData6.idleFrameStart = 0; mountData6.idleFrameLoop = false; mountData6.swimFrameCount = 6; mountData6.swimFrameDelay = 12; mountData6.swimFrameStart = 6; if (Main.netMode != 2) { mountData6.backTexture = Main.turtleMountTexture; mountData6.backTextureExtra = (Texture2D)null; mountData6.frontTexture = (Texture2D)null; mountData6.frontTextureExtra = (Texture2D)null; mountData6.textureWidth = mountData6.backTexture.Width; mountData6.textureHeight = mountData6.backTexture.Height; } Mount.MountData mountData7 = new Mount.MountData(); Mount.mounts[5] = mountData7; mountData7.spawnDust = 152; mountData7.buff = 132; mountData7.heightBoost = 16; mountData7.flightTimeMax = 320; mountData7.fatigueMax = 320; mountData7.fallDamage = 0.0f; mountData7.usesHover = true; mountData7.runSpeed = 2f; mountData7.dashSpeed = 2f; mountData7.acceleration = 0.16f; mountData7.jumpHeight = 10; mountData7.jumpSpeed = 4f; mountData7.blockExtraJumps = true; mountData7.totalFrames = 12; int[] numArray7 = new int[mountData7.totalFrames]; for (int index = 0; index < numArray7.Length; ++index) numArray7[index] = 16; numArray7[8] = 18; mountData7.playerYOffsets = numArray7; mountData7.xOffset = 1; mountData7.bodyFrame = 3; mountData7.yOffset = 4; mountData7.playerHeadOffset = 18; mountData7.standingFrameCount = 1; mountData7.standingFrameDelay = 12; mountData7.standingFrameStart = 0; mountData7.runningFrameCount = 5; mountData7.runningFrameDelay = 12; mountData7.runningFrameStart = 0; mountData7.flyingFrameCount = 3; mountData7.flyingFrameDelay = 12; mountData7.flyingFrameStart = 5; mountData7.inAirFrameCount = 3; mountData7.inAirFrameDelay = 12; mountData7.inAirFrameStart = 5; mountData7.idleFrameCount = 4; mountData7.idleFrameDelay = 12; mountData7.idleFrameStart = 8; mountData7.idleFrameLoop = true; mountData7.swimFrameCount = 0; mountData7.swimFrameDelay = 12; mountData7.swimFrameStart = 0; if (Main.netMode != 2) { mountData7.backTexture = Main.beeMountTexture[0]; mountData7.backTextureExtra = Main.beeMountTexture[1]; mountData7.frontTexture = (Texture2D)null; mountData7.frontTextureExtra = (Texture2D)null; mountData7.textureWidth = mountData7.backTexture.Width; mountData7.textureHeight = mountData7.backTexture.Height; } Mount.MountData mountData8 = new Mount.MountData(); Mount.mounts[7] = mountData8; mountData8.spawnDust = 226; mountData8.spawnDustNoGravity = true; mountData8.buff = 141; mountData8.heightBoost = 16; mountData8.flightTimeMax = 320; mountData8.fatigueMax = 320; mountData8.fallDamage = 0.0f; mountData8.usesHover = true; mountData8.runSpeed = 8f; mountData8.dashSpeed = 8f; mountData8.acceleration = 0.16f; mountData8.jumpHeight = 10; mountData8.jumpSpeed = 4f; mountData8.blockExtraJumps = true; mountData8.totalFrames = 8; int[] numArray8 = new int[mountData8.totalFrames]; for (int index = 0; index < numArray8.Length; ++index) numArray8[index] = 16; mountData8.playerYOffsets = numArray8; mountData8.xOffset = 1; mountData8.bodyFrame = 3; mountData8.yOffset = 4; mountData8.playerHeadOffset = 18; mountData8.standingFrameCount = 8; mountData8.standingFrameDelay = 4; mountData8.standingFrameStart = 0; mountData8.runningFrameCount = 8; mountData8.runningFrameDelay = 4; mountData8.runningFrameStart = 0; mountData8.flyingFrameCount = 8; mountData8.flyingFrameDelay = 4; mountData8.flyingFrameStart = 0; mountData8.inAirFrameCount = 8; mountData8.inAirFrameDelay = 4; mountData8.inAirFrameStart = 0; mountData8.idleFrameCount = 0; mountData8.idleFrameDelay = 12; mountData8.idleFrameStart = 0; mountData8.idleFrameLoop = true; mountData8.swimFrameCount = 0; mountData8.swimFrameDelay = 12; mountData8.swimFrameStart = 0; if (Main.netMode != 2) { mountData8.backTexture = (Texture2D)null; mountData8.backTextureExtra = (Texture2D)null; mountData8.frontTexture = Main.UFOMountTexture[0]; mountData8.frontTextureExtra = Main.UFOMountTexture[1]; mountData8.textureWidth = mountData8.frontTexture.Width; mountData8.textureHeight = mountData8.frontTexture.Height; } Mount.MountData mountData9 = new Mount.MountData(); Mount.mounts[8] = mountData9; mountData9.spawnDust = 226; mountData9.buff = 142; mountData9.heightBoost = 16; mountData9.flightTimeMax = 320; mountData9.fatigueMax = 320; mountData9.fallDamage = 1f; mountData9.usesHover = true; mountData9.swimSpeed = 4f; mountData9.runSpeed = 6f; mountData9.dashSpeed = 4f; mountData9.acceleration = 0.16f; mountData9.jumpHeight = 10; mountData9.jumpSpeed = 4f; mountData9.blockExtraJumps = true; mountData9.emitsLight = true; mountData9.lightColor = new Vector3(0.3f, 0.3f, 0.4f); mountData9.totalFrames = 1; int[] numArray9 = new int[mountData9.totalFrames]; for (int index = 0; index < numArray9.Length; ++index) numArray9[index] = 4; mountData9.playerYOffsets = numArray9; mountData9.xOffset = 1; mountData9.bodyFrame = 3; mountData9.yOffset = 4; mountData9.playerHeadOffset = 18; mountData9.standingFrameCount = 1; mountData9.standingFrameDelay = 12; mountData9.standingFrameStart = 0; mountData9.runningFrameCount = 1; mountData9.runningFrameDelay = 12; mountData9.runningFrameStart = 0; mountData9.flyingFrameCount = 1; mountData9.flyingFrameDelay = 12; mountData9.flyingFrameStart = 0; mountData9.inAirFrameCount = 1; mountData9.inAirFrameDelay = 12; mountData9.inAirFrameStart = 0; mountData9.idleFrameCount = 0; mountData9.idleFrameDelay = 12; mountData9.idleFrameStart = 8; mountData9.swimFrameCount = 0; mountData9.swimFrameDelay = 12; mountData9.swimFrameStart = 0; if (Main.netMode != 2) { mountData9.backTexture = Main.drillMountTexture[0]; mountData9.backTextureGlow = Main.drillMountTexture[3]; mountData9.backTextureExtra = (Texture2D)null; mountData9.backTextureExtraGlow = (Texture2D)null; mountData9.frontTexture = Main.drillMountTexture[1]; mountData9.frontTextureGlow = Main.drillMountTexture[4]; mountData9.frontTextureExtra = Main.drillMountTexture[2]; mountData9.frontTextureExtraGlow = Main.drillMountTexture[5]; mountData9.textureWidth = mountData9.frontTexture.Width; mountData9.textureHeight = mountData9.frontTexture.Height; } Mount.drillTextureSize = new Vector2(80f, 80f); Vector2 vector2 = new Vector2((float)mountData9.textureWidth, (float)(mountData9.textureHeight / mountData9.totalFrames)); if (Mount.drillTextureSize != vector2) throw new Exception("Be sure to update the Drill texture origin to match the actual texture size of " + (object)mountData9.textureWidth + ", " + (string)(object)mountData9.textureHeight + "."); Mount.MountData mountData10 = new Mount.MountData(); Mount.mounts[9] = mountData10; mountData10.spawnDust = 152; mountData10.buff = 143; mountData10.heightBoost = 16; mountData10.flightTimeMax = 0; mountData10.fatigueMax = 0; mountData10.fallDamage = 0.0f; mountData10.abilityChargeMax = 40; mountData10.abilityCooldown = 20; mountData10.abilityDuration = 0; mountData10.runSpeed = 8f; mountData10.dashSpeed = 8f; mountData10.acceleration = 0.4f; mountData10.jumpHeight = 22; mountData10.jumpSpeed = 10.01f; mountData10.blockExtraJumps = false; mountData10.totalFrames = 12; int[] numArray10 = new int[mountData10.totalFrames]; for (int index = 0; index < numArray10.Length; ++index) numArray10[index] = 16; mountData10.playerYOffsets = numArray10; mountData10.xOffset = 1; mountData10.bodyFrame = 3; mountData10.yOffset = 6; mountData10.playerHeadOffset = 18; mountData10.standingFrameCount = 6; mountData10.standingFrameDelay = 12; mountData10.standingFrameStart = 6; mountData10.runningFrameCount = 6; mountData10.runningFrameDelay = 12; mountData10.runningFrameStart = 0; mountData10.flyingFrameCount = 0; mountData10.flyingFrameDelay = 12; mountData10.flyingFrameStart = 0; mountData10.inAirFrameCount = 1; mountData10.inAirFrameDelay = 12; mountData10.inAirFrameStart = 1; mountData10.idleFrameCount = 0; mountData10.idleFrameDelay = 12; mountData10.idleFrameStart = 6; mountData10.idleFrameLoop = true; mountData10.swimFrameCount = 0; mountData10.swimFrameDelay = 12; mountData10.swimFrameStart = 0; if (Main.netMode != 2) { mountData10.backTexture = Main.scutlixMountTexture[0]; mountData10.backTextureExtra = (Texture2D)null; mountData10.frontTexture = Main.scutlixMountTexture[1]; mountData10.frontTextureExtra = Main.scutlixMountTexture[2]; mountData10.textureWidth = mountData10.backTexture.Width; mountData10.textureHeight = mountData10.backTexture.Height; } Mount.scutlixEyePositions = new Vector2[10]; Mount.scutlixEyePositions[0] = new Vector2(60f, 2f); Mount.scutlixEyePositions[1] = new Vector2(70f, 6f); Mount.scutlixEyePositions[2] = new Vector2(68f, 6f); Mount.scutlixEyePositions[3] = new Vector2(76f, 12f); Mount.scutlixEyePositions[4] = new Vector2(80f, 10f); Mount.scutlixEyePositions[5] = new Vector2(84f, 18f); Mount.scutlixEyePositions[6] = new Vector2(74f, 20f); Mount.scutlixEyePositions[7] = new Vector2(76f, 24f); Mount.scutlixEyePositions[8] = new Vector2(70f, 34f); Mount.scutlixEyePositions[9] = new Vector2(76f, 34f); Mount.scutlixTextureSize = new Vector2(45f, 54f); vector2 = new Vector2((float)(mountData10.textureWidth / 2), (float)(mountData10.textureHeight / mountData10.totalFrames)); if (Mount.scutlixTextureSize != vector2) throw new Exception("Be sure to update the Scutlix texture origin to match the actual texture size of " + (object)mountData10.textureWidth + ", " + (string)(object)mountData10.textureHeight + "."); for (int index = 0; index < Mount.scutlixEyePositions.Length; ++index) Mount.scutlixEyePositions[index] -= Mount.scutlixTextureSize; Mount.MountData mountData11 = new Mount.MountData(); Mount.mounts[10] = mountData11; mountData11.spawnDust = 15; mountData11.buff = 162; mountData11.heightBoost = 34; mountData11.flightTimeMax = 0; mountData11.fallDamage = 0.2f; mountData11.runSpeed = 4f; mountData11.dashSpeed = 12f; mountData11.acceleration = 0.3f; mountData11.jumpHeight = 10; mountData11.jumpSpeed = 8.01f; mountData11.totalFrames = 16; int[] numArray11 = new int[mountData11.totalFrames]; for (int index = 0; index < numArray11.Length; ++index) numArray11[index] = 28; numArray11[3] += 2; numArray11[4] += 2; numArray11[7] += 2; numArray11[8] += 2; numArray11[12] += 2; numArray11[13] += 2; numArray11[15] += 4; mountData11.playerYOffsets = numArray11; mountData11.xOffset = 5; mountData11.bodyFrame = 3; mountData11.yOffset = 1; mountData11.playerHeadOffset = 31; mountData11.standingFrameCount = 1; mountData11.standingFrameDelay = 12; mountData11.standingFrameStart = 0; mountData11.runningFrameCount = 7; mountData11.runningFrameDelay = 15; mountData11.runningFrameStart = 1; mountData11.dashingFrameCount = 6; mountData11.dashingFrameDelay = 40; mountData11.dashingFrameStart = 9; mountData11.flyingFrameCount = 6; mountData11.flyingFrameDelay = 6; mountData11.flyingFrameStart = 1; mountData11.inAirFrameCount = 1; mountData11.inAirFrameDelay = 12; mountData11.inAirFrameStart = 15; mountData11.idleFrameCount = 0; mountData11.idleFrameDelay = 0; mountData11.idleFrameStart = 0; mountData11.idleFrameLoop = false; mountData11.swimFrameCount = mountData11.inAirFrameCount; mountData11.swimFrameDelay = mountData11.inAirFrameDelay; mountData11.swimFrameStart = mountData11.inAirFrameStart; if (Main.netMode != 2) { mountData11.backTexture = Main.unicornMountTexture; mountData11.backTextureExtra = (Texture2D)null; mountData11.frontTexture = (Texture2D)null; mountData11.frontTextureExtra = (Texture2D)null; mountData11.textureWidth = mountData11.backTexture.Width; mountData11.textureHeight = mountData11.backTexture.Height; } Mount.MountData mountData12 = new Mount.MountData(); Mount.mounts[11] = mountData12; mountData12.Minecart = true; mountData12.MinecartDust = new Action<Vector2>(DelegateMethods.Minecart.SparksMech); mountData12.spawnDust = 213; mountData12.buff = 167; mountData12.extraBuff = 166; mountData12.heightBoost = 12; mountData12.flightTimeMax = 0; mountData12.fallDamage = 1f; mountData12.runSpeed = 20f; mountData12.dashSpeed = 20f; mountData12.acceleration = 0.1f; mountData12.jumpHeight = 15; mountData12.jumpSpeed = 5.15f; mountData12.blockExtraJumps = true; mountData12.totalFrames = 3; int[] numArray12 = new int[mountData12.totalFrames]; for (int index = 0; index < numArray12.Length; ++index) numArray12[index] = 9; mountData12.playerYOffsets = numArray12; mountData12.xOffset = -1; mountData12.bodyFrame = 3; mountData12.yOffset = 11; mountData12.playerHeadOffset = 14; mountData12.standingFrameCount = 1; mountData12.standingFrameDelay = 12; mountData12.standingFrameStart = 0; mountData12.runningFrameCount = 3; mountData12.runningFrameDelay = 12; mountData12.runningFrameStart = 0; mountData12.flyingFrameCount = 0; mountData12.flyingFrameDelay = 0; mountData12.flyingFrameStart = 0; mountData12.inAirFrameCount = 0; mountData12.inAirFrameDelay = 0; mountData12.inAirFrameStart = 0; mountData12.idleFrameCount = 0; mountData12.idleFrameDelay = 0; mountData12.idleFrameStart = 0; mountData12.idleFrameLoop = false; if (Main.netMode != 2) { mountData12.backTexture = (Texture2D)null; mountData12.backTextureExtra = (Texture2D)null; mountData12.frontTexture = Main.minecartMechMountTexture[0]; mountData12.frontTextureGlow = Main.minecartMechMountTexture[1]; mountData12.frontTextureExtra = (Texture2D)null; mountData12.textureWidth = mountData12.frontTexture.Width; mountData12.textureHeight = mountData12.frontTexture.Height; } Mount.MountData mountData13 = new Mount.MountData(); Mount.mounts[12] = mountData13; mountData13.spawnDust = 15; mountData13.buff = 168; mountData13.heightBoost = 20; mountData13.flightTimeMax = 320; mountData13.fatigueMax = 320; mountData13.fallDamage = 0.0f; mountData13.usesHover = true; mountData13.runSpeed = 2f; mountData13.dashSpeed = 1f; mountData13.acceleration = 0.2f; mountData13.jumpHeight = 4; mountData13.jumpSpeed = 3f; mountData13.swimSpeed = 16f; mountData13.blockExtraJumps = true; mountData13.totalFrames = 23; int[] numArray13 = new int[mountData13.totalFrames]; for (int index = 0; index < numArray13.Length; ++index) numArray13[index] = 12; mountData13.playerYOffsets = numArray13; mountData13.xOffset = 2; mountData13.bodyFrame = 3; mountData13.yOffset = 16; mountData13.playerHeadOffset = 31; mountData13.standingFrameCount = 1; mountData13.standingFrameDelay = 12; mountData13.standingFrameStart = 8; mountData13.runningFrameCount = 7; mountData13.runningFrameDelay = 14; mountData13.runningFrameStart = 8; mountData13.flyingFrameCount = 8; mountData13.flyingFrameDelay = 16; mountData13.flyingFrameStart = 0; mountData13.inAirFrameCount = 8; mountData13.inAirFrameDelay = 6; mountData13.inAirFrameStart = 0; mountData13.idleFrameCount = 0; mountData13.idleFrameDelay = 0; mountData13.idleFrameStart = 0; mountData13.idleFrameLoop = false; mountData13.swimFrameCount = 8; mountData13.swimFrameDelay = 4; mountData13.swimFrameStart = 15; if (Main.netMode != 2) { mountData13.backTexture = Main.cuteFishronMountTexture[0]; mountData13.backTextureGlow = Main.cuteFishronMountTexture[1]; mountData13.frontTexture = (Texture2D)null; mountData13.frontTextureExtra = (Texture2D)null; mountData13.textureWidth = mountData13.backTexture.Width; mountData13.textureHeight = mountData13.backTexture.Height; } Mount.MountData mountData14 = new Mount.MountData(); Mount.mounts[13] = mountData14; mountData14.Minecart = true; mountData14.MinecartDirectional = true; mountData14.MinecartDust = new Action<Vector2>(DelegateMethods.Minecart.Sparks); mountData14.spawnDust = 213; mountData14.buff = 184; mountData14.extraBuff = 185; mountData14.heightBoost = 10; mountData14.flightTimeMax = 0; mountData14.fallDamage = 1f; mountData14.runSpeed = 10f; mountData14.dashSpeed = 10f; mountData14.acceleration = 0.03f; mountData14.jumpHeight = 12; mountData14.jumpSpeed = 5.15f; mountData14.blockExtraJumps = true; mountData14.totalFrames = 3; int[] numArray14 = new int[mountData14.totalFrames]; for (int index = 0; index < numArray14.Length; ++index) numArray14[index] = 8; mountData14.playerYOffsets = numArray14; mountData14.xOffset = 1; mountData14.bodyFrame = 3; mountData14.yOffset = 13; mountData14.playerHeadOffset = 14; mountData14.standingFrameCount = 1; mountData14.standingFrameDelay = 12; mountData14.standingFrameStart = 0; mountData14.runningFrameCount = 3; mountData14.runningFrameDelay = 12; mountData14.runningFrameStart = 0; mountData14.flyingFrameCount = 0; mountData14.flyingFrameDelay = 0; mountData14.flyingFrameStart = 0; mountData14.inAirFrameCount = 0; mountData14.inAirFrameDelay = 0; mountData14.inAirFrameStart = 0; mountData14.idleFrameCount = 0; mountData14.idleFrameDelay = 0; mountData14.idleFrameStart = 0; mountData14.idleFrameLoop = false; if (Main.netMode == 2) return; mountData14.backTexture = (Texture2D)null; mountData14.backTextureExtra = (Texture2D)null; mountData14.frontTexture = Main.minecartWoodMountTexture; mountData14.frontTextureExtra = (Texture2D)null; mountData14.textureWidth = mountData14.frontTexture.Width; mountData14.textureHeight = mountData14.frontTexture.Height; }
public void SetMount(int m, Player mountedPlayer, bool faceLeft = false) { if (this._type == m || m <= -1 || m >= 14 || m == 5 && mountedPlayer.wet) return; if (this._active) { mountedPlayer.ClearBuff(this._data.buff); if (this.Cart) { mountedPlayer.ClearBuff(this._data.extraBuff); mountedPlayer.cartFlip = false; mountedPlayer.lastBoost = Vector2.Zero; } mountedPlayer.fullRotation = 0.0f; mountedPlayer.fullRotationOrigin = Vector2.Zero; this._mountSpecificData = (object)null; } else this._active = true; this._flyTime = 0; this._type = m; this._data = Mount.mounts[m]; this._fatigueMax = (float)this._data.fatigueMax; if (this.Cart && !faceLeft && !this.Directional) { mountedPlayer.AddBuff(this._data.extraBuff, 3600, true); this._flipDraw = true; } else { mountedPlayer.AddBuff(this._data.buff, 3600, true); this._flipDraw = false; } if (this._type == 9 && this._abilityCooldown < 20) this._abilityCooldown = 20; mountedPlayer.position.Y += (float)mountedPlayer.height; for (int index = 0; index < mountedPlayer.shadowPos.Length; ++index) mountedPlayer.shadowPos[index].Y += (float)mountedPlayer.height; mountedPlayer.height = 42 + this._data.heightBoost; mountedPlayer.position.Y -= (float)mountedPlayer.height; for (int index = 0; index < mountedPlayer.shadowPos.Length; ++index) mountedPlayer.shadowPos[index].Y -= (float)mountedPlayer.height; if (this._type == 7 || this._type == 8) mountedPlayer.fullRotationOrigin = new Vector2((float)(mountedPlayer.width / 2), (float)(mountedPlayer.height / 2)); if (this._type == 8) this._mountSpecificData = (object)new Mount.DrillMountData(); if (Main.netMode != 2) { for (int index1 = 0; index1 < 100; ++index1) { if (this._type == 6 || this._type == 11 || this._type == 13) { if (index1 % 10 == 0) { int Type = Main.rand.Next(61, 64); int index2 = Gore.NewGore(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), Vector2.Zero, Type, 1f); Main.gore[index2].alpha = 100; Main.gore[index2].velocity = Vector2.Transform(new Vector2(1f, 0.0f), Matrix.CreateRotationZ((float)(Main.rand.NextDouble() * 6.28318548202515))); } } else { int index2 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, this._data.spawnDust, 0.0f, 0.0f, 0, new Color(), 1f); Main.dust[index2].scale += (float)Main.rand.Next(-10, 21) * 0.01f; if (this._data.spawnDustNoGravity) Main.dust[index2].noGravity = true; else if (Main.rand.Next(2) == 0) { Main.dust[index2].scale *= 1.3f; Main.dust[index2].noGravity = true; } else Main.dust[index2].velocity *= 0.5f; Main.dust[index2].velocity += mountedPlayer.velocity * 0.8f; } } } if (mountedPlayer.whoAmI != Main.myPlayer) return; NetMessage.SendData(13, -1, -1, "", mountedPlayer.whoAmI, 0.0f, 0.0f, 0.0f, 0, 0, 0); }
public static void Initialize() { Mount.mounts = new Mount.MountData[7]; Mount.MountData mountData = new Mount.MountData(); Mount.mounts[0] = mountData; mountData.spawnDust = 57; mountData.buff = 90; mountData.heightBoost = 20; mountData.flightTimeMax = 160; mountData.runSpeed = 5.5f; mountData.dashSpeed = 12f; mountData.acceleration = 0.09f; mountData.jumpHeight = 17; mountData.jumpSpeed = 5.31f; /*if (Main.netMode != 2) * { * mountData.backTexture = Main.rudolphMountTexture[0]; * mountData.backTextureExtra = null; * mountData.frontTexture = Main.rudolphMountTexture[1]; * mountData.frontTextureExtra = Main.rudolphMountTexture[2]; * mountData.textureWidth = mountData.backTexture.Width; * mountData.textureHeight = mountData.backTexture.Height; * mountData.totalFrames = 12; * int[] array = new int[mountData.totalFrames]; * for (int i = 0; i < array.Length; i++) * { * array[i] = 30; * } * array[1] += 2; * array[11] += 2; * mountData.playerYOffsets = array; * mountData.xOffset = 13; * mountData.bodyFrame = 3; * mountData.yOffset = -7; * mountData.playerHeadOffset = 22; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 0; * mountData.runningFrameCount = 6; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 6; * mountData.flyingFrameCount = 6; * mountData.flyingFrameDelay = 6; * mountData.flyingFrameStart = 6; * mountData.inAirFrameCount = 1; * mountData.inAirFrameDelay = 12; * mountData.inAirFrameStart = 1; * mountData.idleFrameCount = 4; * mountData.idleFrameDelay = 30; * mountData.idleFrameStart = 2; * mountData.idleFrameLoop = true; * }*/ mountData = new Mount.MountData(); Mount.mounts[2] = mountData; mountData.spawnDust = 58; mountData.buff = 129; mountData.heightBoost = 20; mountData.flightTimeMax = 160; mountData.runSpeed = 5f; mountData.dashSpeed = 9f; mountData.acceleration = 0.08f; mountData.jumpHeight = 10; mountData.jumpSpeed = 6.01f; /*if (Main.netMode != 2) * { * mountData.backTexture = Main.pigronMountTexture; * mountData.backTextureExtra = null; * mountData.frontTexture = null; * mountData.frontTextureExtra = null; * mountData.textureWidth = mountData.backTexture.Width; * mountData.textureHeight = mountData.backTexture.Height; * mountData.totalFrames = 16; * int[] array = new int[mountData.totalFrames]; * for (int j = 0; j < array.Length; j++) * { * array[j] = 22; * } * array[12] += 2; * array[13] += 4; * array[14] += 2; * mountData.playerYOffsets = array; * mountData.xOffset = 1; * mountData.bodyFrame = 3; * mountData.yOffset = 8; * mountData.playerHeadOffset = 22; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 7; * mountData.runningFrameCount = 5; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 11; * mountData.flyingFrameCount = 6; * mountData.flyingFrameDelay = 6; * mountData.flyingFrameStart = 1; * mountData.inAirFrameCount = 1; * mountData.inAirFrameDelay = 12; * mountData.inAirFrameStart = 0; * mountData.idleFrameCount = 3; * mountData.idleFrameDelay = 30; * mountData.idleFrameStart = 8; * mountData.idleFrameLoop = false; * }*/ mountData = new Mount.MountData(); Mount.mounts[1] = mountData; mountData.spawnDust = 15; mountData.buff = 128; mountData.heightBoost = 20; mountData.flightTimeMax = 0; mountData.fallDamage = 0.8f; mountData.runSpeed = 4f; mountData.dashSpeed = 7.5f; mountData.acceleration = 0.13f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.01f; /*if (Main.netMode != 2) * { * mountData.backTexture = Main.bunnyMountTexture; * mountData.backTextureExtra = null; * mountData.frontTexture = null; * mountData.frontTextureExtra = null; * mountData.textureWidth = mountData.backTexture.Width; * mountData.textureHeight = mountData.backTexture.Height; * mountData.totalFrames = 7; * int[] array = new int[mountData.totalFrames]; * for (int k = 0; k < array.Length; k++) * { * array[k] = 14; * } * array[2] += 2; * array[3] += 4; * array[4] += 8; * array[5] += 8; * mountData.playerYOffsets = array; * mountData.xOffset = 1; * mountData.bodyFrame = 3; * mountData.yOffset = 4; * mountData.playerHeadOffset = 22; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 0; * mountData.runningFrameCount = 7; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 0; * mountData.flyingFrameCount = 6; * mountData.flyingFrameDelay = 6; * mountData.flyingFrameStart = 1; * mountData.inAirFrameCount = 1; * mountData.inAirFrameDelay = 12; * mountData.inAirFrameStart = 5; * mountData.idleFrameCount = 0; * mountData.idleFrameDelay = 0; * mountData.idleFrameStart = 0; * mountData.idleFrameLoop = false; * }*/ mountData = new Mount.MountData(); Mount.mounts[3] = mountData; mountData.spawnDust = 56; mountData.buff = 130; mountData.heightBoost = 20; mountData.flightTimeMax = 0; mountData.fallDamage = 0.5f; mountData.runSpeed = 4f; mountData.dashSpeed = 4f; mountData.acceleration = 0.08f; mountData.jumpHeight = 22; mountData.jumpSpeed = 7.25f; mountData.constantJump = true; /*if (Main.netMode != 2) * { * mountData.backTexture = Main.slimeMountTexture; * mountData.backTextureExtra = null; * mountData.frontTexture = null; * mountData.frontTextureExtra = null; * mountData.textureWidth = mountData.backTexture.Width; * mountData.textureHeight = mountData.backTexture.Height; * mountData.totalFrames = 4; * int[] array = new int[mountData.totalFrames]; * for (int l = 0; l < array.Length; l++) * { * array[l] = 20; * } * array[1] += 2; * array[3] -= 2; * mountData.playerYOffsets = array; * mountData.xOffset = 1; * mountData.bodyFrame = 3; * mountData.yOffset = 10; * mountData.playerHeadOffset = 22; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 0; * mountData.runningFrameCount = 4; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 0; * mountData.flyingFrameCount = 0; * mountData.flyingFrameDelay = 0; * mountData.flyingFrameStart = 0; * mountData.inAirFrameCount = 1; * mountData.inAirFrameDelay = 12; * mountData.inAirFrameStart = 1; * mountData.idleFrameCount = 0; * mountData.idleFrameDelay = 0; * mountData.idleFrameStart = 0; * mountData.idleFrameLoop = false; * }*/ mountData = new Mount.MountData(); Mount.mounts[6] = mountData; mountData.spawnDust = 213; mountData.buff = 118; mountData.extraBuff = 138; mountData.heightBoost = 10; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 13f; mountData.dashSpeed = 13f; mountData.acceleration = 0.04f; mountData.jumpHeight = 15; mountData.jumpSpeed = 5.15f; mountData.blockExtraJumps = true; /*if (Main.netMode != 2) * { * mountData.backTexture = null; * mountData.backTextureExtra = null; * mountData.frontTexture = Main.minecartMountTexture; * mountData.frontTextureExtra = null; * mountData.textureWidth = mountData.frontTexture.Width; * mountData.textureHeight = mountData.frontTexture.Height; * mountData.totalFrames = 3; * int[] array = new int[mountData.totalFrames]; * for (int m = 0; m < array.Length; m++) * { * array[m] = 8; * } * mountData.playerYOffsets = array; * mountData.xOffset = 1; * mountData.bodyFrame = 3; * mountData.yOffset = 13; * mountData.playerHeadOffset = 14; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 0; * mountData.runningFrameCount = 3; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 0; * mountData.flyingFrameCount = 0; * mountData.flyingFrameDelay = 0; * mountData.flyingFrameStart = 0; * mountData.inAirFrameCount = 0; * mountData.inAirFrameDelay = 0; * mountData.inAirFrameStart = 0; * mountData.idleFrameCount = 0; * mountData.idleFrameDelay = 0; * mountData.idleFrameStart = 0; * mountData.idleFrameLoop = false; * }*/ mountData = new Mount.MountData(); Mount.mounts[4] = mountData; mountData.spawnDust = 56; mountData.buff = 131; mountData.heightBoost = 26; mountData.flightTimeMax = 0; mountData.fallDamage = 1f; mountData.runSpeed = 2f; mountData.dashSpeed = 2f; mountData.swimSpeed = 6f; mountData.acceleration = 0.08f; mountData.jumpHeight = 10; mountData.jumpSpeed = 3.15f; /*if (Main.netMode != 2) * { * mountData.backTexture = Main.turtleMountTexture; * mountData.backTextureExtra = null; * mountData.frontTexture = null; * mountData.frontTextureExtra = null; * mountData.textureWidth = mountData.backTexture.Width; * mountData.textureHeight = mountData.backTexture.Height; * mountData.totalFrames = 12; * int[] array = new int[mountData.totalFrames]; * for (int n = 0; n < array.Length; n++) * { * array[n] = 26; * } * mountData.playerYOffsets = array; * mountData.xOffset = 1; * mountData.bodyFrame = 3; * mountData.yOffset = 13; * mountData.playerHeadOffset = 30; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 0; * mountData.runningFrameCount = 6; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 0; * mountData.flyingFrameCount = 0; * mountData.flyingFrameDelay = 0; * mountData.flyingFrameStart = 0; * mountData.inAirFrameCount = 1; * mountData.inAirFrameDelay = 12; * mountData.inAirFrameStart = 3; * mountData.idleFrameCount = 0; * mountData.idleFrameDelay = 0; * mountData.idleFrameStart = 0; * mountData.idleFrameLoop = false; * mountData.swimFrameCount = 6; * mountData.swimFrameDelay = 12; * mountData.swimFrameStart = 6; * }*/ mountData = new Mount.MountData(); Mount.mounts[5] = mountData; mountData.spawnDust = 152; mountData.buff = 132; mountData.heightBoost = 16; mountData.flightTimeMax = 320; mountData.fatigueMax = 320; mountData.fallDamage = 0f; mountData.runSpeed = 2f; mountData.dashSpeed = 2f; mountData.acceleration = 0.16f; mountData.jumpHeight = 10; mountData.jumpSpeed = 4f; mountData.blockExtraJumps = true; /*if (Main.netMode != 2) * { * mountData.backTexture = Main.beeMountTexture[0]; * mountData.backTextureExtra = Main.beeMountTexture[1]; * mountData.frontTexture = null; * mountData.frontTextureExtra = null; * mountData.textureWidth = mountData.backTexture.Width; * mountData.textureHeight = mountData.backTexture.Height; * mountData.totalFrames = 12; * int[] array = new int[mountData.totalFrames]; * for (int num = 0; num < array.Length; num++) * { * array[num] = 16; * } * array[8] = 18; * mountData.playerYOffsets = array; * mountData.xOffset = 1; * mountData.bodyFrame = 3; * mountData.yOffset = 4; * mountData.playerHeadOffset = 18; * mountData.standingFrameCount = 1; * mountData.standingFrameDelay = 12; * mountData.standingFrameStart = 0; * mountData.runningFrameCount = 5; * mountData.runningFrameDelay = 12; * mountData.runningFrameStart = 0; * mountData.flyingFrameCount = 3; * mountData.flyingFrameDelay = 12; * mountData.flyingFrameStart = 5; * mountData.inAirFrameCount = 3; * mountData.inAirFrameDelay = 12; * mountData.inAirFrameStart = 5; * mountData.idleFrameCount = 4; * mountData.idleFrameDelay = 12; * mountData.idleFrameStart = 8; * mountData.idleFrameLoop = true; * mountData.swimFrameCount = 0; * mountData.swimFrameDelay = 12; * mountData.swimFrameStart = 0; * }*/ }
public void SetMount(int m, Player mountedPlayer, bool faceLeft = false) { if (this._type == m || m <= -1 || m >= 7) { return; } if (m == 5 && mountedPlayer.wet) { return; } if (this._active) { mountedPlayer.ClearBuff(this._data.buff); if (this._type == 6) { mountedPlayer.ClearBuff(this._data.extraBuff); } } else { this._active = true; } this._flyTime = 0; this._type = m; this._data = Mount.mounts[m]; this._fatigueMax = (float)this._data.fatigueMax; if (this._type == 6 && !faceLeft) { mountedPlayer.AddBuff(this._data.extraBuff, 3600, true); this._flipDraw = true; } else { mountedPlayer.AddBuff(this._data.buff, 3600, true); this._flipDraw = false; } mountedPlayer.position.Y = mountedPlayer.position.Y + (float)mountedPlayer.height; mountedPlayer.height = 42 + this._data.heightBoost; mountedPlayer.position.Y = mountedPlayer.position.Y - (float)mountedPlayer.height; if (Main.netMode != 2) { for (int i = 0; i < 100; i++) { if (this._type == 6) { if (i % 10 == 0) { int type = Main.rand.Next(61, 64); int num = Gore.NewGore(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), Vector2.Zero, type, 1f); Main.gore[num].alpha = 100; Main.gore[num].velocity = Vector2.Transform(new Vector2(1f, 0f), Matrix.CreateRotationZ((float)(Main.rand.NextDouble() * 6.2831854820251465))); } } else { int num2 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, this._data.spawnDust, 0f, 0f, 0, default(Color), 1f); Main.dust[num2].scale += (float)Main.rand.Next(-10, 21) * 0.01f; if (Main.rand.Next(2) == 0) { Main.dust[num2].scale *= 1.3f; Main.dust[num2].noGravity = true; } else { Main.dust[num2].velocity *= 0.5f; } Main.dust[num2].velocity += mountedPlayer.velocity * 0.8f; } } } if (mountedPlayer.whoAmi == Main.myPlayer) { NetMessage.SendData(13, -1, -1, "", mountedPlayer.whoAmi, 0f, 0f, 0f, 0); } }
public Mount.MountData setMountData(int m, int dust, int height, float moveSpeed, float dashSpeed, float acc, int jump, float jumpSpeed, int frames, int xOff, int yOff, int headOff, int standingFrameCount, int standingFrameDelay, int standingFrameStart, int runningFrameCount, int runningFrameDelay, int runningFrameStart, int flyingFrameCount, int flyingFrameDelay, int flyingFrameStart, int inAirFrameCount, int inAirFrameDelay, int inAirFrameStart, int idleFrameCount, int idleFrameDelay, int idleFrameStart, int swimFrameCount, int swimFrameDelay, int swimFrameStart, bool idleFrameLoop, Texture2D backTexture, int[] array, float fallDamage = 1f, int dashingFrameCount = 0, int dashingFrameDelay = 0, int dashingFrameStart = 0, int buff = 2, int flightTime = 0) { Mount.Initialize(); Mount.MountData mountData = new Mount.MountData(); mountData = new Mount.MountData(); Mount.mounts[m] = mountData; mountData.spawnDust = dust; mountData.buff = buff; mountData.heightBoost = height; mountData.flightTimeMax = flightTime; mountData.runSpeed = moveSpeed; mountData.fallDamage = fallDamage; mountData.dashSpeed = dashSpeed; mountData.acceleration = acc; mountData.jumpHeight = jump; mountData.jumpSpeed = jumpSpeed; mountData.totalFrames = frames; mountData.playerYOffsets = array; mountData.xOffset = xOff; mountData.bodyFrame = frames + 1; mountData.yOffset = xOff; mountData.playerHeadOffset = headOff; mountData.standingFrameCount = standingFrameCount; mountData.standingFrameDelay = standingFrameDelay; mountData.standingFrameStart = standingFrameStart; mountData.runningFrameCount = runningFrameCount; mountData.runningFrameDelay = runningFrameDelay; mountData.runningFrameStart = runningFrameStart; mountData.flyingFrameCount = flyingFrameCount; mountData.flyingFrameDelay = flyingFrameDelay; mountData.flyingFrameStart = flyingFrameStart; mountData.inAirFrameCount = inAirFrameCount; mountData.inAirFrameDelay = inAirFrameDelay; mountData.inAirFrameStart = inAirFrameStart; mountData.idleFrameCount = idleFrameCount; mountData.idleFrameDelay = idleFrameDelay; mountData.idleFrameStart = idleFrameStart; mountData.idleFrameLoop = idleFrameLoop; mountData.dashingFrameStart = dashingFrameStart; mountData.dashingFrameCount = dashingFrameCount; mountData.dashingFrameDelay = dashingFrameDelay; mountData.swimFrameCount = swimFrameCount; mountData.swimFrameDelay = swimFrameDelay; mountData.swimFrameStart = swimFrameStart; if (Main.netMode != 2) { mountData.backTexture = backTexture; mountData.backTextureExtra = null; mountData.backTextureGlow = backTexture; mountData.frontTexture = null; mountData.frontTextureExtra = null; mountData.textureWidth = mountData.backTexture.Width; mountData.textureHeight = mountData.backTexture.Height; } _data = mountData; _type = m; return mountData; }