Skip to content

Commit

Permalink
Merge pull request Simple-Station#71 from FoxxoTrystan/chat-fix
Browse files Browse the repository at this point in the history
Fix Whisper
  • Loading branch information
FoxxoTrystan authored Jul 27, 2024
2 parents 58b37aa + 473f102 commit 673a331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,19 +528,19 @@ private void SendEntityWhisper(
{
// Scenario 1: the listener can clearly understand the message
result = perceivedMessage;
wrappedMessage = WrapWhisperMessage(source, "chat-manager-entity-whisper-wrap-message", name, perceivedMessage, language);
wrappedMessage = WrapWhisperMessage(source, "chat-manager-entity-whisper-wrap-message", name, result, language);
}
else if (_interactionSystem.InRangeUnobstructed(source, listener, WhisperMuffledRange, Shared.Physics.CollisionGroup.Opaque))
{
// Scenerio 2: if the listener is too far, they only hear fragments of the message
result = ObfuscateMessageReadability(perceivedMessage);
wrappedMessage = WrapWhisperMessage(source, "chat-manager-entity-whisper-wrap-message", nameIdentity, perceivedMessage, language);
wrappedMessage = WrapWhisperMessage(source, "chat-manager-entity-whisper-wrap-message", nameIdentity, result, language);
}
else
{
// Scenario 3: If listener is too far and has no line of sight, they can't identify the whisperer's identity
result = ObfuscateMessageReadability(perceivedMessage);
wrappedMessage = WrapWhisperMessage(source, "chat-manager-entity-whisper-unknown-wrap-message", string.Empty, perceivedMessage, language);
wrappedMessage = WrapWhisperMessage(source, "chat-manager-entity-whisper-unknown-wrap-message", string.Empty, result, language);
}

_chatManager.ChatMessageToOne(ChatChannel.Whisper, result, wrappedMessage, source, false, session.Channel);
Expand Down

0 comments on commit 673a331

Please sign in to comment.