Fixed AICharacters not playing sounds in mp
This commit is contained in:
@@ -28,8 +28,10 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
base.Update(deltaTime, cam);
|
base.Update(deltaTime, cam);
|
||||||
|
|
||||||
if (!Enabled || IsRemotePlayer) return;
|
if (!Enabled) return;
|
||||||
|
|
||||||
|
if (!IsRemotePlayer)
|
||||||
|
{
|
||||||
float dist = Vector2.DistanceSquared(cam.WorldViewCenter, WorldPosition);
|
float dist = Vector2.DistanceSquared(cam.WorldViewCenter, WorldPosition);
|
||||||
if (dist > 8000.0f * 8000.0f)
|
if (dist > 8000.0f * 8000.0f)
|
||||||
{
|
{
|
||||||
@@ -39,15 +41,18 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
AnimController.SimplePhysicsEnabled = false;
|
AnimController.SimplePhysicsEnabled = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IsDead || Health <= 0.0f || IsUnconscious || Stun > 0.0f) return;
|
if (IsDead || Health <= 0.0f || IsUnconscious || Stun > 0.0f) return;
|
||||||
|
|
||||||
if (Controlled == this || !aiController.Enabled) return;
|
if (Controlled == this || !aiController.Enabled) return;
|
||||||
|
|
||||||
SoundUpdate(deltaTime);
|
SoundUpdate(deltaTime);
|
||||||
|
|
||||||
|
if (!IsRemotePlayer)
|
||||||
|
{
|
||||||
aiController.Update(deltaTime);
|
aiController.Update(deltaTime);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
partial void SoundUpdate(float deltaTime);
|
partial void SoundUpdate(float deltaTime);
|
||||||
|
|
||||||
public override void AddDamage(CauseOfDeath causeOfDeath, float amount, IDamageable attacker)
|
public override void AddDamage(CauseOfDeath causeOfDeath, float amount, IDamageable attacker)
|
||||||
|
|||||||
Reference in New Issue
Block a user