This commit is contained in:
Mister_Nebula 2021-03-08 15:41:17 +00:00
parent 77949ebce1
commit c6db6044c9
2 changed files with 6 additions and 5 deletions

View File

@ -32,7 +32,7 @@ namespace QSB.ConversationSync.Events
{
case ConversationType.Character:
var translated = TextTranslation.Translate(message.Message).Trim();
translated = Regex.Replace(translated, @"<Pause=?\d*\.?\d*\/>", "");
translated = Regex.Replace(translated, @"<Pause=?\d*\.?\d*\s\/>", "");
ConversationManager.Instance.DisplayCharacterConversationBox(message.ObjectId, translated);
break;

View File

@ -97,12 +97,13 @@ namespace QSB.ConversationSync.Patches
var position = playerId == uint.MaxValue
? Locator.GetActiveCamera().transform.position
: QSBPlayerManager.GetPlayer(playerId).CameraBody.transform.position;
var b = ___headTrackingWeight * Mathf.Min(1, !___lookOnlyWhenTalking
var localPosition = ____animator.transform.InverseTransformPoint(position);
var targetWeight = ___headTrackingWeight * Mathf.Min(1, !___lookOnlyWhenTalking
? !____playerInHeadZone ? 0 : 1
: !____inConversation || !____playerInHeadZone ? 0 : 1);
____currentLookWeight = Mathf.Lerp(____currentLookWeight, b, Time.deltaTime * 2f);
____currentLookTarget = ___lookSpring.Update(____currentLookTarget, position, Time.deltaTime);
____animator.SetLookAtPosition(____currentLookTarget);
____currentLookWeight = Mathf.Lerp(____currentLookWeight, targetWeight, Time.deltaTime * 2f);
____currentLookTarget = ___lookSpring.Update(____currentLookTarget, localPosition, Time.deltaTime);
____animator.SetLookAtPosition(____animator.transform.TransformPoint(____currentLookTarget));
____animator.SetLookAtWeight(____currentLookWeight);
return false;
}