Skip to content

Commit 774708d

Browse files
committed
Fixed problem with avatars rotating suddenly while sitting on a bench
It happened when a user updated the profile. That causes the cached profile data to reset and there is a condition that compared that empty wallet address of that profile with the target of a directed emote operation (which is not happening). Due to both are empty strings it was meeting the condition and making avatars look at an inexistent initiator of a social emote.
1 parent 80bbe7b commit 774708d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/SocialEmoteInteractionSystem.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ private void WalkToInitiatorPositionBeforePlayingOutcomeAnimation(in Entity enti
194194
[None(typeof(PlayerComponent))]
195195
private void InitiatorLooksAtSocialEmoteTarget([Data] string targetWalletAddress, [Data] bool isInitiatorPlayingEmote, in CharacterTransform targetTransform, Profile targetProfile)
196196
{
197-
if (targetWalletAddress == targetProfile.UserId && isInitiatorPlayingEmote)
197+
// A remote initiator looks at the target of a directed social emote it sent
198+
if (!string.IsNullOrEmpty(targetProfile.UserId) && targetWalletAddress == targetProfile.UserId && isInitiatorPlayingEmote)
198199
World.Add(playerEntity, new PlayerLookAtIntent(targetTransform.Position));
199200
}
200201

0 commit comments

Comments
 (0)