From 4924156ad477110ba34384eb6991961299312ee7 Mon Sep 17 00:00:00 2001 From: Edmond Mondor Date: Mon, 18 Sep 2023 09:50:23 -0700 Subject: [PATCH] Fix 3 problems with plSubWorldMsg. Co-authored-by: Adam Johnson --- Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp | 2 +- Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp index b3660d6a..e98068cc 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp @@ -1414,7 +1414,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg) if (fController) { fController->SetSubworld(subMsg->fWorldKey); - DirtySynchState(kSDLAvatar, plSynchedObject::kBCastToClients); + DirtyPhysicalSynchState(plSynchedObject::kBCastToClients); } return true; } diff --git a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp index f6ec11d5..f26fbd0f 100644 --- a/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp +++ b/Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp @@ -217,6 +217,8 @@ bool plResponderModifier::IIsLocalOnlyCmd(plMessage* cmd) return true; if (plCameraMsg::ConvertNoRef(cmd)) // don't want to change our camera return true; + if (plSubWorldMsg::ConvertNoRef(cmd)) // don't want to enter a subworld (changes the avatar SDL) + return true; plSoundMsg *snd = plSoundMsg::ConvertNoRef( cmd ); if( snd != nil && snd->Cmd( plSoundMsg::kIsLocalOnly ) ) @@ -362,6 +364,7 @@ bool plResponderModifier::IContinueSending() plArmatureMod *avatar = plAvatarMgr::GetInstance()->GetLocalAvatar(); if(avatar) { + swMsg->ClearReceivers(); swMsg->AddReceiver(avatar->GetKey()); } }