mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix EntityManager.InitializeEntity being static for no reason at all.
- Also fixes `EntityInitialized` not being invoked on many cases. (On the client, on entities created by `ClientGameStateManager`, for example...)
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Robust.Client.GameObjects
|
||||
|
||||
void IClientEntityManagerInternal.InitializeEntity(IEntity entity)
|
||||
{
|
||||
EntityManager.InitializeEntity((Entity)entity);
|
||||
base.InitializeEntity((Entity)entity);
|
||||
}
|
||||
|
||||
void IClientEntityManagerInternal.StartEntity(IEntity entity)
|
||||
|
||||
@@ -405,7 +405,6 @@ namespace Robust.Shared.GameObjects
|
||||
try
|
||||
{
|
||||
InitializeEntity(entity);
|
||||
EntityInitialized?.Invoke(this, entity.Uid);
|
||||
StartEntity(entity);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -415,9 +414,10 @@ namespace Robust.Shared.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
private protected static void InitializeEntity(Entity entity)
|
||||
protected void InitializeEntity(Entity entity)
|
||||
{
|
||||
entity.InitializeComponents();
|
||||
EntityInitialized?.Invoke(this, entity.Uid);
|
||||
}
|
||||
|
||||
protected void StartEntity(Entity entity)
|
||||
|
||||
Reference in New Issue
Block a user