Build 1.1.4.0
This commit is contained in:
@@ -554,7 +554,7 @@ namespace Barotrauma
|
||||
float damage = 0;
|
||||
foreach (var affliction in result.Afflictions)
|
||||
{
|
||||
if (affliction.Prefab.DamageParticles && affliction.Prefab.AfflictionType == "damage")
|
||||
if (affliction.Prefab.DamageParticles && affliction.Prefab.AfflictionType == AfflictionPrefab.DamageType)
|
||||
{
|
||||
damage += affliction.GetVitalityDecrease(null);
|
||||
}
|
||||
@@ -563,11 +563,11 @@ namespace Barotrauma
|
||||
float bleedingDamageMultiplier = 1;
|
||||
foreach (DamageModifier damageModifier in result.AppliedDamageModifiers)
|
||||
{
|
||||
if (damageModifier.MatchesAfflictionType("damage"))
|
||||
if (damageModifier.MatchesAfflictionType(AfflictionPrefab.DamageType))
|
||||
{
|
||||
damageMultiplier *= damageModifier.DamageMultiplier;
|
||||
}
|
||||
else if (damageModifier.MatchesAfflictionType("bleeding"))
|
||||
else if (damageModifier.MatchesAfflictionType(AfflictionPrefab.BleedingType))
|
||||
{
|
||||
bleedingDamageMultiplier *= damageModifier.DamageMultiplier;
|
||||
}
|
||||
@@ -599,7 +599,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (damageModifier.DamageMultiplier > 0 && !string.IsNullOrWhiteSpace(damageModifier.DamageParticle))
|
||||
{
|
||||
overrideParticle = GameMain.ParticleManager?.FindPrefab(damageModifier.DamageParticle);
|
||||
overrideParticle = ParticleManager.FindPrefab(damageModifier.DamageParticle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -646,7 +646,7 @@ namespace Barotrauma
|
||||
dripParticleTimer += wetTimer * deltaTime * Mass * (wetTimer > 0.9f ? 50.0f : 5.0f);
|
||||
if (dripParticleTimer > 1.0f)
|
||||
{
|
||||
float dropRadius = body.BodyShape == PhysicsBody.Shape.Rectangle ? Math.Min(body.width, body.height) : body.radius;
|
||||
float dropRadius = body.BodyShape == PhysicsBody.Shape.Rectangle ? Math.Min(body.Width, body.Height) : body.Radius;
|
||||
GameMain.ParticleManager.CreateParticle(
|
||||
"waterdrop",
|
||||
WorldPosition + Rand.Vector(Rand.Range(0.0f, ConvertUnits.ToDisplayUnits(dropRadius))),
|
||||
@@ -683,10 +683,10 @@ namespace Barotrauma
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch, Camera cam, Color? overrideColor = null, bool disableDeformations = false)
|
||||
{
|
||||
float brightness = Math.Max(1.0f - burnOverLayStrength, 0.2f);
|
||||
var spriteParams = Params.GetSprite();
|
||||
if (spriteParams == null) { return; }
|
||||
|
||||
float burn = spriteParams.IgnoreTint ? 0 : burnOverLayStrength;
|
||||
float brightness = Math.Max(1.0f - burn, 0.2f);
|
||||
Color clr = spriteParams.Color;
|
||||
if (!spriteParams.IgnoreTint)
|
||||
{
|
||||
@@ -727,7 +727,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
float herpesStrength = character.CharacterHealth.GetAfflictionStrength("spaceherpes");
|
||||
float herpesStrength = character.CharacterHealth.GetAfflictionStrength(AfflictionPrefab.SpaceHerpesType);
|
||||
|
||||
bool hideLimb = Hide ||
|
||||
OtherWearables.Any(w => w.HideLimb) ||
|
||||
@@ -1245,6 +1245,12 @@ namespace Barotrauma
|
||||
};
|
||||
|
||||
paramsToPass.Params["wearableUvToClipperUv"] = wearableUvToClipperUv;
|
||||
paramsToPass.Params["stencilUVmin"] = new Vector2(
|
||||
(float)alphaClipper.Sprite.SourceRect.X / alphaClipper.Sprite.Texture.Width,
|
||||
(float)alphaClipper.Sprite.SourceRect.Y / alphaClipper.Sprite.Texture.Height);
|
||||
paramsToPass.Params["stencilUVmax"] = new Vector2(
|
||||
(float)alphaClipper.Sprite.SourceRect.Right / alphaClipper.Sprite.Texture.Width,
|
||||
(float)alphaClipper.Sprite.SourceRect.Bottom / alphaClipper.Sprite.Texture.Height);
|
||||
paramsToPass.Params["clipperTexelSize"] = 2f / alphaClipper.Sprite.Texture.Width;
|
||||
paramsToPass.Params["aCutoff"] = 2f / 255f;
|
||||
paramsToPass.Params["xTexture"] = wearable.Sprite.Texture;
|
||||
|
||||
Reference in New Issue
Block a user