Unstable 0.1500.1.0 (BaroDev edition)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user