MonsterEvent switches state back to "not started" if the sub gets far enough from the monsters (prevents monster music from staying on), SoundPlayer plays a random default music clip if a suitable clip isn't found for the highest priority task
This commit is contained in:
@@ -94,12 +94,13 @@ namespace Barotrauma
|
||||
|
||||
if (isFinished) return;
|
||||
|
||||
isStarted = false;
|
||||
bool monstersDead = true;
|
||||
foreach (Character monster in monsters)
|
||||
{
|
||||
if (monster.IsDead) continue;
|
||||
|
||||
if (!isStarted && Vector2.Distance(monster.WorldPosition, Submarine.MainSub.WorldPosition) < 5000.0f) isStarted = true;
|
||||
if (!isStarted && Vector2.DistanceSquared(monster.WorldPosition, Submarine.MainSub.WorldPosition) < 5000.0f*5000.0f) isStarted = true;
|
||||
|
||||
monstersDead = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user