Unstable 0.1500.1.0 (BaroDev edition)

This commit is contained in:
Markus Isberg
2021-09-03 21:56:31 +09:00
parent 501e02c026
commit e7b7c1a748
143 changed files with 2928 additions and 1356 deletions
@@ -8,7 +8,8 @@ namespace Barotrauma
public enum HitDetection
{
Distance,
Contact
Contact,
None
}
public enum AttackContext
@@ -74,20 +75,6 @@ namespace Barotrauma
}
}
class AttackData
{
public float DamageMultiplier { get; set; } = 1f;
public float AddedPenetration { get; set; } = 0f;
public List<Affliction> Afflictions { get; set; }
public Attack SourceAttack { get; }
public AttackData(Attack sourceAttack)
{
SourceAttack = sourceAttack;
}
}
partial class Attack : ISerializableEntity
{
[Serialize(AttackContext.Any, true, description: "The attack will be used only in this context."), Editable]
@@ -466,7 +453,7 @@ namespace Barotrauma
DamageParticles(deltaTime, worldPosition);
var attackResult = target.AddDamage(attacker, worldPosition, this, deltaTime, playSound);
var attackResult = target?.AddDamage(attacker, worldPosition, this, deltaTime, playSound) ?? new AttackResult();
var effectType = attackResult.Damage > 0.0f ? ActionType.OnUse : ActionType.OnFailure;
if (targetCharacter != null && targetCharacter.IsDead)
{