Fix DefaultLocalPlayerProfile and DefaultProfile conflicting, fix commands, bump IPC version, send Profile.OnUpdate for DefaultProfile and DefaultLocalPlayerProfile
This commit is contained in:
@@ -283,24 +283,12 @@ public partial class CustomizePlusIpc
|
||||
else
|
||||
(activeProfile, oldProfile) = ((Profile?, Profile?))arg3;
|
||||
|
||||
if (activeProfile != null)
|
||||
{
|
||||
if (activeProfile == _profileManager.DefaultProfile || activeProfile.ProfileType == ProfileType.Editor)
|
||||
{
|
||||
//ignore any changes while player is in editor or if player changes between default profiles
|
||||
//also do not send event if there were no active profile before
|
||||
if (activeProfile == oldProfile || oldProfile == null)
|
||||
return;
|
||||
//do not send event if we are entering editor
|
||||
if (activeProfile != null && activeProfile.ProfileType == ProfileType.Editor)
|
||||
return;
|
||||
|
||||
OnProfileUpdateInternal(localPlayerCharacter, null); //send empty profile when player enters editor or turns on default profile
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//do not send event if we are exiting editor or disabling default profile and don't have any active profile
|
||||
if (oldProfile != null &&
|
||||
(oldProfile == _profileManager.DefaultProfile || oldProfile.ProfileType == ProfileType.Editor) &&
|
||||
activeProfile == null)
|
||||
//do not send event if we are exiting editor
|
||||
if (oldProfile != null && oldProfile.ProfileType == ProfileType.Editor)
|
||||
return;
|
||||
|
||||
OnProfileUpdateInternal(localPlayerCharacter, activeProfile);
|
||||
@@ -309,8 +297,9 @@ public partial class CustomizePlusIpc
|
||||
|
||||
if (type == ArmatureChanged.Type.Deleted)
|
||||
{
|
||||
//Do not send event if default or editor profile was used
|
||||
if (armature.Profile == _profileManager.DefaultProfile || armature.Profile.ProfileType == ProfileType.Editor) //todo: never send if ProfileType != normal?
|
||||
//Do not send event if editor profile was used
|
||||
//todo: never send if ProfileType != normal?
|
||||
if (armature.Profile.ProfileType == ProfileType.Editor)
|
||||
return;
|
||||
|
||||
OnProfileUpdateInternal(localPlayerCharacter, null);
|
||||
|
||||
Reference in New Issue
Block a user