MonsterEvents and ArtifactEvents spawn the monsters/items during initialization instead of waiting for the round to start (prevents entity ID mismatches if a client starts the event before receiving a message about something the server has spawned)
This commit is contained in:
@@ -54,8 +54,10 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
SpawnMonsters();
|
||||
}
|
||||
|
||||
@@ -88,10 +90,6 @@ namespace Barotrauma
|
||||
}
|
||||
if (monsters == null) SpawnMonsters();
|
||||
|
||||
//base.Update(deltaTime);
|
||||
|
||||
//if (!isStarted) return;
|
||||
|
||||
if (isFinished) return;
|
||||
|
||||
bool monstersDead = true;
|
||||
@@ -99,8 +97,6 @@ namespace Barotrauma
|
||||
{
|
||||
if (monster.IsDead) continue;
|
||||
|
||||
if (!isStarted && Vector2.Distance(monster.WorldPosition, Submarine.MainSub.WorldPosition) < 5000.0f) isStarted = true;
|
||||
|
||||
monstersDead = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user