disable observer respawn metatrolling (#3044)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
parent
63bd3662e8
commit
8bc6f7ce14
|
|
@ -381,6 +381,7 @@ namespace Content.Server.GameTicking
|
|||
_adminLogger.Add(LogType.LateJoin,
|
||||
LogImpact.Low,
|
||||
$"{player.Name} late joined the round as an Observer with {ToPrettyString(ghost):entity}.");
|
||||
_respawn.SetDeathRespawnTime(player.UserId); // DeltaV - no seeing all the valids then respawning immediately
|
||||
}
|
||||
|
||||
#region Spawn Points
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Content.Server._Corvax.Respawn; // DeltaV
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Administration.Managers;
|
||||
using Content.Server.Chat.Managers;
|
||||
|
|
@ -62,6 +63,7 @@ namespace Content.Server.GameTicking
|
|||
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
||||
[Dependency] private readonly SharedRoleSystem _roles = default!;
|
||||
[Dependency] private readonly ServerDbEntryManager _dbEntryManager = default!;
|
||||
[Dependency] private readonly RespawnSystem _respawn = default!; // DeltaV
|
||||
|
||||
[ViewVariables] private bool _initialized;
|
||||
[ViewVariables] private bool _postInitialized;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,15 @@ public sealed class RespawnSystem : EntitySystem
|
|||
SetRespawnTime(session.UserId, ref respawnData, _timing.CurTime + TimeSpan.FromSeconds(_respawnTime));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DeltaV: Sets the respawn time for a player to the full death cooldown.
|
||||
/// </summary>
|
||||
public void SetDeathRespawnTime(NetUserId player)
|
||||
{
|
||||
var respawnData = GetRespawnData(player);
|
||||
SetRespawnTime(player, ref respawnData, _timing.CurTime + TimeSpan.FromSeconds(_respawnTime));
|
||||
}
|
||||
|
||||
private void OnMindRemoved(EntityUid entity, MindContainerComponent _, MindRemovedMessage e)
|
||||
{
|
||||
if (e.Mind.Comp.UserId is null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue