Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Fix round restart loops (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
DebugOk authored May 18, 2023
1 parent 0c4ea2c commit 0b068a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Content.Server/Traits/TraitSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ private void OnPlayerSpawnComplete(PlayerSpawnCompleteEvent args)
// Add all components required by the prototype
foreach (var entry in traitPrototype.Components.Values)
{
if (HasComp(args.Mob, entry.Component.GetType()))
continue;

var comp = (Component) _serializationManager.CreateCopy(entry.Component, notNullableOverride: true);
comp.Owner = args.Mob;
EntityManager.AddComponent(args.Mob, comp);
Expand Down
6 changes: 6 additions & 0 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ Entries:
type: Tweak
id: 9
time: '2023-05-16T08:00:00.0000000+00:00'
- author: Debug
changes:
- message: Mimes with the muted trait should no longer cause round restart loops, if only they spoke up about it sooner.
type: Fix
id: 10
time: '2023-05-18T00:00:00.0000000+00:00'

0 comments on commit 0b068a6

Please sign in to comment.