Null reference fixes
This commit is contained in:
@@ -93,7 +93,7 @@ namespace Barotrauma
|
||||
|
||||
item.ApplyStatusEffects(ActionType.OnFire, 1.0f);
|
||||
|
||||
if (item.Condition <= 0.0f)
|
||||
if (item.Condition <= 0.0f && GameMain.Server != null)
|
||||
{
|
||||
GameMain.Server.CreateEntityEvent(item, new object[] { NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnFire });
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ namespace Barotrauma
|
||||
if (item.Position.Y < position.Y - size.Y || item.Position.Y > hull.Rect.Y) continue;
|
||||
|
||||
item.ApplyStatusEffects(ActionType.OnFire, deltaTime);
|
||||
if (item.Condition <= 0.0f)
|
||||
if (item.Condition <= 0.0f && GameMain.Server != null)
|
||||
{
|
||||
GameMain.Server.CreateEntityEvent(item, new object[] { NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnFire });
|
||||
}
|
||||
|
||||
@@ -382,8 +382,8 @@ namespace Barotrauma
|
||||
{
|
||||
item.Update(cam, deltaTime);
|
||||
}
|
||||
|
||||
Entity.Spawner.Update();
|
||||
|
||||
Spawner?.Update();
|
||||
}
|
||||
|
||||
public virtual void Update(Camera cam, float deltaTime) { }
|
||||
|
||||
Reference in New Issue
Block a user