Skip to content

Commit

Permalink
I forgot
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Sep 20, 2024
1 parent 8c85700 commit b71da62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Server/Language/LanguageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void OnClientSetLanguage(LanguagesSetMessage message, EntitySessionEvent

public bool CanUnderstand(Entity<LanguageSpeakerComponent?> ent, ProtoId<LanguagePrototype> language)
{
if (language == UniversalPrototype || HasComp<UniversalLanguageSpeakerComponent>(ent))
if (language == UniversalPrototype || TryComp<UniversalLanguageSpeakerComponent>(ent, out var uni) && uni.Enabled)
return true;

return Resolve(ent, ref ent.Comp, logMissing: false) && ent.Comp.UnderstoodLanguages.Contains(language);
Expand Down

0 comments on commit b71da62

Please sign in to comment.