Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes when sharing relto book #1005

Merged
merged 1 commit into from
Oct 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest,

serial = serial % 999;

ST::string newName = ST::format("{}{}{3}\x000", host->GetName(), guest->GetName(), serial++);
ST::string newName = ST::format("{}{}{3}\x000", fHostKey->GetName(), fGuestKey->GetName(), serial++);

plKey newKey = hsgResMgr::ResMgr()->NewKey(newName, this, host->GetUoid().GetLocation());
plKey newKey = hsgResMgr::ResMgr()->NewKey(newName, this, fHostKey->GetUoid().GetLocation());

plKey avMgrKey = plAvatarMgr::GetInstance()->GetKey();

guestBrain->SetRecipient(avMgrKey);
hostBrain->SetRecipient(avMgrKey);
fGuestBrain->SetRecipient(avMgrKey);
fHostBrain->SetRecipient(avMgrKey);
// disable our clickability here if we are the guest
if (plNetClientApp::GetInstance()->GetLocalPlayerKey() == guest)
if (plNetClientApp::GetInstance()->GetLocalPlayerKey() == fGuestKey)
{
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kGUIDisableAvatarClickable);
pMsg->SetAvKey(guest);
pMsg->SetAvKey(fGuestKey);
pMsg->SetBCastFlag(plMessage::kNetPropagate);
pMsg->SetBCastFlag(plMessage::kNetForce);
pMsg->Send();
Expand Down