mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 00:54:51 +01:00
place stored changeling identities next to each other (#39452)
This commit is contained in:
@@ -23,6 +23,7 @@ public sealed class ChangelingIdentitySystem : EntitySystem
|
||||
[Dependency] private readonly SharedPvsOverrideSystem _pvsOverrideSystem = default!;
|
||||
|
||||
public MapId? PausedMapId;
|
||||
private int _numberOfStoredIdentities = 0; // TODO: remove this
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -101,7 +102,11 @@ public sealed class ChangelingIdentitySystem : EntitySystem
|
||||
return null;
|
||||
|
||||
EnsurePausedMap();
|
||||
var mob = Spawn(speciesPrototype.Prototype, new MapCoordinates(Vector2.Zero, PausedMapId!.Value));
|
||||
// TODO: Setting the spawn location is a shitty bandaid to prevent admins from crashing our servers.
|
||||
// Movercontrollers and mob collisions are currently being calculated even for paused entities.
|
||||
// Spawning all of them in the same spot causes severe performance problems.
|
||||
// Cryopods and Polymorph have the same problem.
|
||||
var mob = Spawn(speciesPrototype.Prototype, new MapCoordinates(new Vector2(2 * _numberOfStoredIdentities++, 0), PausedMapId!.Value));
|
||||
|
||||
var storedIdentity = EnsureComp<ChangelingStoredIdentityComponent>(mob);
|
||||
storedIdentity.OriginalEntity = target; // TODO: network this once we have WeakEntityReference or the autonetworking source gen is fixed
|
||||
|
||||
Reference in New Issue
Block a user