This commit is contained in:
Altixal committed 2024-10-23 21:58:02 +07:00
commit 36a97c2269
49 files changed
+224 -53

No files matched your search

+1 -1
View File
@@ -2758,7 +2758,7 @@ namespace CalamityMod.CalPlayer
if (gravityNormalizer)
{
Player.buffImmune[BuffID.VortexDebuff] = true;
if (Player.InSpace())
if (Player.ReducedSpaceGravity())
{
Player.gravity = Player.defaultGravity;
if (Player.wet)
@@ -30,10 +30,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
// Breaks with being behind tiles, and causes a funny interaction where his head goes behind his neck.
NPCID.MoonLordCore,
NPCID.MoonLordHand,
NPCID.MoonLordHead,
// Crashes the fucking game when killed
NPCID.WallofFlesh
NPCID.MoonLordHead
};
/// <summary>
@@ -63,24 +60,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
if (!npc.active || npc.type <= NPCID.None)
return false;
// Do not draw other mod's bosses.
if (npc.ModNPC != null && npc.ModNPC.Mod != CalamityMod.Instance && npc.boss)
return false;
// Don't draw excluded NPCs, or if the npc is a bestiary dummy.
if (ExcludedNPCs.Contains(npc.type) || npc.IsABestiaryIconDummy)
return false;
// Safety check for weird MP bug when getting global npcs.
if (!npc.TryGetGlobalNPCSafer<CalamityGlobalNPC>(out var calNPC) || !npc.TryGetGlobalNPCSafer<CalamityPolarityNPC>(out var polNPC))
return false;
// Do not draw if the npc does not have miracle blight, or has the polarity effect.
if (calNPC.miracleBlight <= 0 || polNPC.CurPolarity > 0f)
return false;
// Do not draw if the current player has the trippy effect.
if (Main.LocalPlayer.Calamity().trippy)
if (!CalamityDrawParameterNPC.DrawingMiracleBlight[npc.whoAmI])
return false;
return true;
+10 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
@@ -27,7 +28,14 @@ namespace CalamityMod.Items.Weapons.Melee
Item.UseSound = SoundID.Item1;
Item.shoot = ModContent.ProjectileType<SeashineSwordProj>();
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
}
public override void AddRecipes()
{
CreateRecipe().
+3 -5
View File
@@ -12,8 +12,6 @@ namespace CalamityMod.Items.Weapons.Ranged
public class ReedBlowgun : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public static readonly SoundStyle BubbleBurstSound = new("CalamityMod/Sounds/Custom/PistolShrimpBubbleBurst") { PitchVariance = 0.15f, Volume = 0.2f };
public override void SetStaticDefaults()
{
ItemID.Sets.IsRangedSpecialistWeapon[Type] = true;
@@ -23,10 +21,10 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Item.width = 22;
Item.height = 46;
Item.damage = 21;
Item.damage = 25;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 25;
Item.useAnimation = 25;
Item.useTime = 32;
Item.useAnimation = 32;
Item.useStyle = ItemUseStyleID.Shoot;
Item.holdStyle = 16;
Item.noMelee = true;
+1 -1
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.rare = ModContent.RarityType<Turquoise>();
Item.UseSound = SoundID.Item11;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<ArcherfishShot>();
Item.shoot = ModContent.ProjectileType<MegalodonShot>();
Item.shootSpeed = 16f;
Item.useAmmo = AmmoID.Bullet;
Item.Calamity().canFirePointBlankShots = true;
+134
View File
@@ -0,0 +1,134 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CalamityMod.NPCs.ExoMechs.Ares;
using Steamworks;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.NPCs
{
// Why this class is exist?
// It because we want to avoid Threading Issues while We using NPC's properties on Draw Thread
public sealed class CalamityDrawParameterNPC : GlobalNPC
{
public override bool InstancePerEntity => false;
#region Draw Parameters
public static bool[] DrawingMiracleBlight { get; private set; }
public static bool[] DrawingPolarity { get; private set; }
#endregion
#region Filtering Fields
public static List<int> MiracleBlightExcludedNPCs => new()
{
// List the reason why the NPC(s) are excluded :)
// The particle sets break with the visuals and this is the easiest way to fix this that isn't stupidly complex.
ModContent.NPCType<AresBody>(),
ModContent.NPCType<AresGaussNuke>(),
ModContent.NPCType<AresLaserCannon>(),
ModContent.NPCType<AresPlasmaFlamethrower>(),
ModContent.NPCType<AresTeslaCannon>(),
// Breaks with being behind tiles, and causes a funny interaction where his head goes behind his neck.
NPCID.MoonLordCore,
NPCID.MoonLordHand,
NPCID.MoonLordHead
};
#endregion
#region Load / Unload
public override void Load()
{
DrawingMiracleBlight = new bool[Main.maxNPCs];
DrawingPolarity = new bool[Main.maxNPCs];
}
public override void Unload()
{
DrawingMiracleBlight = null;
DrawingPolarity = null;
}
#endregion
public override void SetDefaults(NPC entity) => ResetParameters(entity);
public override bool PreAI(NPC npc)
{
if (npc is null)
return true;
var whoAmI = npc.whoAmI;
DrawingMiracleBlight[whoAmI] = ShouldDrawMiracleBlight(npc);
DrawingPolarity[whoAmI] = ShouldDrawPolarity(npc);
return true;
}
public static void ResetParameters(NPC npc)
{
if (npc is null)
return;
var whoAmI = npc.whoAmI;
DrawingMiracleBlight[whoAmI] = false;
DrawingPolarity[whoAmI] = false;
}
public static bool ShouldDrawMiracleBlight(NPC npc)
{
if (npc is null || !npc.active)
return false;
// Do not draw weird MP types less than or equal to 0.
if (npc.type <= NPCID.None)
return false;
// Do not draw other mod's bosses.
if (npc.ModNPC != null && npc.ModNPC.Mod != CalamityMod.Instance && npc.boss)
return false;
// Don't draw excluded NPCs, or if the npc is a bestiary dummy.
if (MiracleBlightExcludedNPCs.Contains(npc.type) || npc.IsABestiaryIconDummy)
return false;
// Safety check for weird MP bug when getting global npcs.
if (!npc.TryGetGlobalNPCSafer<CalamityGlobalNPC>(out var calNPC) || !npc.TryGetGlobalNPCSafer<CalamityPolarityNPC>(out var polNPC))
return false;
// Do not draw if the npc does not have miracle blight, or has the polarity effect.
if (calNPC.miracleBlight <= 0 || polNPC.CurPolarity > 0f)
return false;
// Do not draw if the current player has the trippy effect.
if (Main.LocalPlayer.Calamity().trippy)
return false;
return true;
}
public static bool ShouldDrawPolarity(NPC npc)
{
if (npc is null || !npc.active)
return false;
// Safety check for weird MP bug when getting global npcs.
if (!npc.TryGetGlobalNPCSafer<CalamityGlobalNPC>(out var calNPC) || !npc.TryGetGlobalNPCSafer<CalamityPolarityNPC>(out var polNPC))
return false;
// I don't know who would be using this while also inflicting miracle blight, but in that rare case, do not draw these.
if (calNPC.miracleBlight > 0)
return false;
// Do not draw if the npc doesn't have the polarity effect.
if (polNPC.CurPolarity <= 0f)
return false;
return true;
}
}
}
+1 -1
View File
@@ -96,7 +96,7 @@ namespace CalamityMod.NPCs
public override void PostDraw(NPC npc, SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
// I don't know who would be using this while also inflicting miracle blight, but in that rare case, do not draw these.
if (npc.Calamity().miracleBlight > 0)
if (CalamityDrawParameterNPC.DrawingMiracleBlight[npc.whoAmI])
return;
Main.spriteBatch.End();
+1
View File
@@ -13,6 +13,7 @@ namespace CalamityMod.Projectiles.Boss
public class MushBombFall : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Boss";
public override string Texture => "CalamityMod/Projectiles/Boss/MushBomb";
public override void SetStaticDefaults()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

+4 -2
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -39,7 +40,8 @@ namespace CalamityMod.Projectiles.Magic
}
Projectile.rotation += 0.3f * (float)Projectile.direction;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
public override bool PreDraw(ref Color lightColor)
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Magic
public class CosmicRainbowFront : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override string Texture => "CalamityMod/Projectiles/Ranged/RainbowFront";
public override string Texture => "Terraria/Images/Projectile_251";
public override void SetDefaults()
{
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Magic
public class CosmicRainbowTrail : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override string Texture => "CalamityMod/Projectiles/Ranged/RainbowFront";
public override string Texture => "Terraria/Images/Projectile_251";
public const int Lifetime = 25;
public override void SetDefaults()
+3
View File
@@ -10,6 +10,9 @@ namespace CalamityMod.Projectiles.Magic
public class PartySparkle : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override string Texture => "CalamityMod/Projectiles/StarProj";
public float Time
{
get => Projectile.ai[0];
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

@@ -12,6 +12,7 @@ namespace CalamityMod.Projectiles.Magic
public class VeeringWindFrostWave : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override string Texture => "Terraria/Images/Projectile_348";
public override void SetStaticDefaults()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

+3 -1
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -139,7 +140,8 @@ namespace CalamityMod.Projectiles.Melee
{
return new Color(30, 255, 253);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item10, Projectile.position);
+2
View File
@@ -10,6 +10,8 @@ namespace CalamityMod.Projectiles.Melee
public class BrinyTyphoonBubble : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public override string Texture => "Terraria/Images/Projectile_385";
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 3;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

+3 -1
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -54,7 +55,8 @@ namespace CalamityMod.Projectiles.Melee
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.NPCDeath19, Projectile.position);
+3 -2
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -92,9 +93,9 @@ namespace CalamityMod.Projectiles.Melee
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2);
return false;
}
public override Color? GetAlpha(Color lightColor) => new Color(128, byte.MaxValue, byte.MaxValue);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 60);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 60);
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item10, Projectile.Center);
+1
View File
@@ -8,6 +8,7 @@ namespace CalamityMod.Projectiles.Melee
public new string LocalizationCategory => "Projectiles.Melee";
private const int speedTimerMax = 30;
private int speedTimer = speedTimerMax;
public override string Texture => "Terraria/Images/Item_527";
public override void SetStaticDefaults()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

+1
View File
@@ -8,6 +8,7 @@ namespace CalamityMod.Projectiles.Melee
public new string LocalizationCategory => "Projectiles.Melee";
private const int speedTimerMax = 30;
private int speedTimer = 0;
public override string Texture => "Terraria/Images/Item_528";
public override void SetStaticDefaults()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

+12 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -59,6 +60,15 @@ namespace CalamityMod.Projectiles.Ranged
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Wet, 240);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Wet, 120);
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
target.AddBuff(BuffID.Wet, 120);
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
}
}
}
+1
View File
@@ -10,6 +10,7 @@ namespace CalamityMod.Projectiles.Ranged
public class FeatherLarge : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "Terraria/Images/Item_1516";
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailCacheLength[Type] = 6;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Ranged
bubble.type = Main.rand.NextBool(3) ? 412 : 411;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<CrushDepth>(), 240);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<CrushDepth>(), 240);
}
}
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
@@ -32,9 +33,11 @@ namespace CalamityMod.Projectiles.Ranged
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.DamageType = DamageClass.Ranged;
Projectile.penetrate = 1;
Projectile.penetrate = 3;
Projectile.extraUpdates = 4;
Projectile.timeLeft = FireTime + ChargeupTime;
Projectile.usesIDStaticNPCImmunity = true;
Projectile.idStaticNPCHitCooldown = 10;
}
public override bool ShouldUpdatePosition()
@@ -80,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged
Vector2 bubblePosition = Owner.MountedCenter - Vector2.UnitY * 4f + bubbleRotation.ToRotationVector2() * 55f;
SoundEngine.PlaySound(ReedBlowgun.BubbleBurstSound, bubblePosition);
SoundEngine.PlaySound(SoundID.Item64, bubblePosition);
}
Projectile.velocity *= 0.985f;
@@ -130,7 +133,8 @@ namespace CalamityMod.Projectiles.Ranged
waterDust.velocity -= Projectile.velocity * 0.1f;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item21, Projectile.position);
+1
View File
@@ -7,6 +7,7 @@ namespace CalamityMod.Projectiles.Ranged
public class RainbowFront : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "Terraria/Images/Projectile_251";
public override void SetDefaults()
{
Projectile.width = 12;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

+1 -1
View File
@@ -6,7 +6,7 @@ namespace CalamityMod.Projectiles.Ranged
public class RainbowTrail : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "CalamityMod/Projectiles/Ranged/RainbowFront";
public override string Texture => "Terraria/Images/Projectile_251";
public override void SetDefaults()
{
+2
View File
@@ -8,6 +8,8 @@ namespace CalamityMod.Projectiles.Ranged
public class Shroom : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "Terraria/Images/Item_183";
public override void SetStaticDefaults()
{
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Ranged
public class TyphoonBubble : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "CalamityMod/Projectiles/Melee/BrinyTyphoonBubble";
public override string Texture => "Terraria/Images/Projectile_385";
public override void SetStaticDefaults()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

+4 -2
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -42,7 +43,8 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.damage *= 2;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 120);
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item54, Projectile.position);
+10
View File
@@ -10,6 +10,7 @@ namespace CalamityMod.Projectiles.Summon
public class BelladonnaPetal : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Summon";
public override string Texture => "Terraria/Images/Projectile_276";
public Player Owner => Main.player[Projectile.owner];
// The timer for the AI to do it's actions.
@@ -27,6 +28,7 @@ namespace CalamityMod.Projectiles.Summon
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
ProjectileID.Sets.TrailCacheLength[Type] = 5;
ProjectileID.Sets.TrailingMode[Type] = 0;
Main.projFrames[Type] = 2;
}
public override void SetDefaults()
@@ -55,6 +57,14 @@ namespace CalamityMod.Projectiles.Summon
// Gives it a jungl-y green color.
Lighting.AddLight(Projectile.Center, 0.5f, 1f, 0.3f);
// Animation
Projectile.frameCounter++;
if (Projectile.frameCounter >= 8)
{
Projectile.frameCounter = 0;
Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type];
}
Projectile.netUpdate = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

@@ -8,6 +8,7 @@ namespace CalamityMod.Projectiles.Summon
public class IceClasperSummonProjectile : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Summon";
public override string Texture => "CalamityMod/Projectiles/Melee/DarkIceZero";
public override void SetStaticDefaults()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

@@ -11,6 +11,8 @@ namespace CalamityMod.Projectiles.Summon
{
public new string LocalizationCategory => "Projectiles.Summon";
public override string Texture => "CalamityMod/NPCs/OldDuke/OldDukeToothBall";
public ref float TargetShotID => ref Projectile.ai[0];
public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

+2
View File
@@ -11,6 +11,8 @@ namespace CalamityMod.Projectiles.Summon
{
public new string LocalizationCategory => "Projectiles.Summon";
public override string Texture => "CalamityMod/Projectiles/StarProj";
public override void SetStaticDefaults()
{
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

+2 -2
View File
@@ -317,11 +317,11 @@ namespace CalamityMod
#region Location and Biomes
public static bool IsUnderwater(this Player player) => Collision.DrownCollision(player.position, player.width, player.height, player.gravDir);
public static bool InSpace(this Player player)
public static bool ReducedSpaceGravity(this Player player)
{
float x = Main.maxTilesX / 4200f;
x *= x;
float spaceGravityMult = (float)((player.position.Y / 16f - (60f + 10f * x)) / (Main.worldSurface / 6.0));
float spaceGravityMult = (float)((player.position.Y / 16f - (60f + 10f * x)) / (Main.worldSurface / (Main.remixWorld ? 1.0 : 6.0)));
return spaceGravityMult < 1f;
}
+1 -1
View File
@@ -295,7 +295,7 @@ namespace CalamityMod.World
break;
}
}
while (tries <= 20000);
while (tries <= 50000);
}
#endregion