water ambience sounds change according to speed, oxygengenerator fills oxygen tanks even if their condition is 0, submarine refactoring & bugfixes, wire node editing bugfixes
This commit is contained in:
@@ -10,6 +10,8 @@ namespace Subsurface
|
||||
{
|
||||
class AICharacter : Character
|
||||
{
|
||||
const float AttackBackPriority = 1.0f;
|
||||
|
||||
private AIController aiController;
|
||||
|
||||
public AICharacter(string file) : this(file, Vector2.Zero, null)
|
||||
@@ -57,6 +59,15 @@ namespace Subsurface
|
||||
aiController.Update(deltaTime);
|
||||
}
|
||||
|
||||
public override AttackResult AddDamage(IDamageable attacker, Vector2 position, Attack attack, bool playSound = false)
|
||||
{
|
||||
AttackResult result = base.AddDamage(attacker, position, attack, playSound);
|
||||
|
||||
aiController.OnAttacked(attacker, (result.Damage + result.Bleeding)/Math.Max(health,1.0f));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override void FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
|
||||
{
|
||||
if (type == NetworkEventType.KillCharacter)
|
||||
|
||||
Reference in New Issue
Block a user