Fixes ServerPortalComponent spamming exceptions and crashing server if spawned manually.
Also makes the prototype abstract because it doesn't work straight up.
This commit is contained in:
@@ -193,9 +193,11 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
|
|
||||||
public void TryPortalEntity(IEntity entity)
|
public void TryPortalEntity(IEntity entity)
|
||||||
{
|
{
|
||||||
|
if (immuneEntities.Contains(entity) || _connectingTeleporter == null)
|
||||||
if (!immuneEntities.Contains(entity))
|
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var position = _connectingTeleporter.Transform.GridPosition;
|
var position = _connectingTeleporter.Transform.GridPosition;
|
||||||
var soundPlayer = EntitySystem.Get<AudioSystem>();
|
var soundPlayer = EntitySystem.Get<AudioSystem>();
|
||||||
|
|
||||||
@@ -213,5 +215,4 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
StartCooldown();
|
StartCooldown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
name: Portal
|
name: Portal
|
||||||
id: Portal
|
id: Portal
|
||||||
|
abstract: true
|
||||||
description: "Portal to another location"
|
description: "Portal to another location"
|
||||||
components:
|
components:
|
||||||
- type: Collidable
|
- type: Collidable
|
||||||
|
|||||||
Reference in New Issue
Block a user