Browse Source

Mute the linking sound on client kicks

This commit is really quite awesome in that you can now propagate any
plLinkToAgeMsg that will mute the link out, link in sounds, or both. Some
garbage fields were repurposed for this functionality. The messages were
passed correctly on Cyan's MOULa server.

Conflicts:

	Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h
	Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp
	Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h
	Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp
Adam Johnson 13 years ago
parent
commit
af1db55f67
  1. 38
      Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp
  2. 22
      Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h
  3. 1
      Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp
  4. 40
      Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp
  5. 1
      Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.h
  6. 14
      Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.cpp
  7. 1
      Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.h
  8. 63
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp
  9. 3
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h
  10. 6
      Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

38
Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp

@ -53,11 +53,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
// plLinkToAgeMsg // plLinkToAgeMsg
plLinkToAgeMsg::plLinkToAgeMsg() : fLinkInAnimName(nil) plLinkToAgeMsg::plLinkToAgeMsg() : fLinkInAnimName(nil), fFlags(0)
{ {
} }
plLinkToAgeMsg::plLinkToAgeMsg( const plAgeLinkStruct * link ) : fLinkInAnimName(nil) plLinkToAgeMsg::plLinkToAgeMsg( const plAgeLinkStruct * link ) : fLinkInAnimName(nil), fFlags(0)
{ {
fAgeLink.CopyFrom( link ); fAgeLink.CopyFrom( link );
} }
@ -67,12 +67,22 @@ plLinkToAgeMsg::~plLinkToAgeMsg()
delete [] fLinkInAnimName; delete [] fLinkInAnimName;
} }
// StreamVersion needed for back compatibility. void plLinkToAgeMsg::PlayLinkSfx(bool linkIn, bool linkOut)
uint8_t plLinkToAgeInfo_StreamVersion = 0; {
if (linkIn)
fFlags &= ~kMuteLinkInSfx;
else
fFlags |= kMuteLinkInSfx;
if (linkOut)
fFlags &= ~kMuteLinkOutSfx;
else
fFlags |= kMuteLinkOutSfx;
}
void plLinkToAgeMsg::Read(hsStream* stream, hsResMgr* mgr) void plLinkToAgeMsg::Read(hsStream* stream, hsResMgr* mgr)
{ {
plMessage::IMsgRead( stream, mgr ); plMessage::IMsgRead( stream, mgr );
uint8_t ltaVer = stream->ReadByte(); fFlags = stream->ReadByte();
fAgeLink.Read( stream, mgr ); fAgeLink.Read( stream, mgr );
fLinkInAnimName = stream->ReadSafeString(); fLinkInAnimName = stream->ReadSafeString();
} }
@ -80,7 +90,7 @@ void plLinkToAgeMsg::Read(hsStream* stream, hsResMgr* mgr)
void plLinkToAgeMsg::Write(hsStream* stream, hsResMgr* mgr) void plLinkToAgeMsg::Write(hsStream* stream, hsResMgr* mgr)
{ {
plMessage::IMsgWrite( stream, mgr ); plMessage::IMsgWrite( stream, mgr );
stream->WriteByte( plLinkToAgeInfo_StreamVersion ); stream->WriteByte( fFlags );
fAgeLink.Write( stream, mgr ); fAgeLink.Write( stream, mgr );
stream->WriteSafeString(fLinkInAnimName); stream->WriteSafeString(fLinkInAnimName);
} }
@ -185,6 +195,14 @@ plLinkEffectsTriggerMsg::~plLinkEffectsTriggerMsg()
{ {
} }
void plLinkEffectsTriggerMsg::MuteLinkSfx(bool mute)
{
if (mute)
fFlags |= kMuteLinkSfx;
else
fFlags &= ~kMuteLinkSfx;
}
void plLinkEffectsTriggerMsg::Read(hsStream* stream, hsResMgr* mgr) void plLinkEffectsTriggerMsg::Read(hsStream* stream, hsResMgr* mgr)
{ {
plMessage::IMsgRead( stream, mgr ); plMessage::IMsgRead( stream, mgr );
@ -192,11 +210,7 @@ void plLinkEffectsTriggerMsg::Read(hsStream* stream, hsResMgr* mgr)
fInvisLevel = stream->ReadLE32(); fInvisLevel = stream->ReadLE32();
fLeavingAge = stream->ReadBool(); fLeavingAge = stream->ReadBool();
fLinkKey = mgr->ReadKey(stream); fLinkKey = mgr->ReadKey(stream);
fFlags = stream->ReadLE32();
// This variable is for internal use only. Still read/written for backwards compatability.
fEffects = stream->ReadLE32();
fEffects = 0;
fLinkInAnimKey = mgr->ReadKey(stream); fLinkInAnimKey = mgr->ReadKey(stream);
} }
@ -207,7 +221,7 @@ void plLinkEffectsTriggerMsg::Write(hsStream* stream, hsResMgr* mgr)
stream->WriteLE32(fInvisLevel); stream->WriteLE32(fInvisLevel);
stream->WriteBool(fLeavingAge); stream->WriteBool(fLeavingAge);
mgr->WriteKey(stream, fLinkKey); mgr->WriteKey(stream, fLinkKey);
stream->WriteLE32(fEffects); stream->WriteLE32(fFlags);
mgr->WriteKey(stream, fLinkInAnimKey); mgr->WriteKey(stream, fLinkInAnimKey);
} }

22
Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.h

@ -58,6 +58,13 @@ class hsResMgr;
class plLinkToAgeMsg : public plMessage class plLinkToAgeMsg : public plMessage
{ {
enum
{
kMuteLinkOutSfx = 1<<0,
kMuteLinkInSfx = 1<<1,
};
uint8_t fFlags;
plAgeLinkStruct fAgeLink; plAgeLinkStruct fAgeLink;
char* fLinkInAnimName; char* fLinkInAnimName;
@ -72,6 +79,10 @@ public:
plAgeLinkStruct * GetAgeLink() { return &fAgeLink; } plAgeLinkStruct * GetAgeLink() { return &fAgeLink; }
const plAgeLinkStruct * GetAgeLink() const { return &fAgeLink; } const plAgeLinkStruct * GetAgeLink() const { return &fAgeLink; }
void PlayLinkSfx(bool linkIn = true, bool linkOut = true);
bool PlayLinkInSfx() const { return (fFlags & kMuteLinkInSfx) == 0; }
bool PlayLinkOutSfx() const { return (fFlags & kMuteLinkOutSfx) == 0; }
const char * GetLinkInAnimName() { return fLinkInAnimName; } const char * GetLinkInAnimName() { return fLinkInAnimName; }
void SetLinkInAnimName(const char* name) { delete [] fLinkInAnimName; fLinkInAnimName = hsStrcpy(name); } void SetLinkInAnimName(const char* name) { delete [] fLinkInAnimName; fLinkInAnimName = hsStrcpy(name); }
@ -117,12 +128,18 @@ public:
class plLinkEffectsTriggerMsg : public plMessage class plLinkEffectsTriggerMsg : public plMessage
{ {
protected: protected:
enum
{
kMuteLinkSfx = 1<<0
};
bool fLeavingAge; bool fLeavingAge;
plKey fLinkKey; plKey fLinkKey;
plKey fLinkInAnimKey; plKey fLinkInAnimKey;
int fInvisLevel; int fInvisLevel;
int fFlags;
public: public:
plLinkEffectsTriggerMsg() : fLeavingAge(true), fLinkKey(nil), fLinkInAnimKey(nil), fEffects(0), fInvisLevel(0) { } plLinkEffectsTriggerMsg() : fLeavingAge(true), fLinkKey(nil), fLinkInAnimKey(nil), fEffects(0), fInvisLevel(0), fFlags(0) { }
~plLinkEffectsTriggerMsg(); ~plLinkEffectsTriggerMsg();
CLASSNAME_REGISTER( plLinkEffectsTriggerMsg ); CLASSNAME_REGISTER( plLinkEffectsTriggerMsg );
@ -140,6 +157,9 @@ public:
void SetLinkInAnimKey(plKey &key); void SetLinkInAnimKey(plKey &key);
plKey GetLinkInAnimKey() { return fLinkInAnimKey; } plKey GetLinkInAnimKey() { return fLinkInAnimKey; }
void MuteLinkSfx(bool mute);
bool MuteLinkSfx() const { return (fFlags & kMuteLinkSfx) != 0; }
void Read(hsStream* stream, hsResMgr* mgr); void Read(hsStream* stream, hsResMgr* mgr);
void Write(hsStream* stream, hsResMgr* mgr); void Write(hsStream* stream, hsResMgr* mgr);

1
Sources/Plasma/PubUtilLib/plNetClient/plLinkEffectsMgr.cpp

@ -365,6 +365,7 @@ bool plLinkEffectsMgr::MsgReceive(plMessage *msg)
BCMsg->fLinkKey = linkKey; BCMsg->fLinkKey = linkKey;
BCMsg->SetLinkFlag(plLinkEffectBCMsg::kLeavingAge, pTriggerMsg->IsLeavingAge()); BCMsg->SetLinkFlag(plLinkEffectBCMsg::kLeavingAge, pTriggerMsg->IsLeavingAge());
BCMsg->SetLinkFlag(plLinkEffectBCMsg::kSendCallback, true); BCMsg->SetLinkFlag(plLinkEffectBCMsg::kSendCallback, true);
BCMsg->SetLinkFlag(plLinkEffectBCMsg::kMute, pTriggerMsg->MuteLinkSfx());
// Check if you have a Yeesha book, and mute sound if you don't. // Check if you have a Yeesha book, and mute sound if you don't.
// 'CleftSolved' gets set when you click on the linking panel in the cleft, // 'CleftSolved' gets set when you click on the linking panel in the cleft,

40
Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp

@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetCliAgeJoiner.h" #include "plNetCliAgeJoiner.h"
#include "plNetClientMgr.h" #include "plNetClientMgr.h"
#include "plNetLinkingMgr.h" #include "plNetLinkingMgr.h"
#include "plNetObjectDebugger.h"
#include "pnSceneObject/plSceneObject.h" #include "pnSceneObject/plSceneObject.h"
#include "pnSceneObject/plCoordinateInterface.h" #include "pnSceneObject/plCoordinateInterface.h"
@ -59,6 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetClientComm/plNetClientComm.h" #include "plNetClientComm/plNetClientComm.h"
#include "plAgeLoader/plAgeLoader.h" #include "plAgeLoader/plAgeLoader.h"
#include "plAvatar/plArmatureMod.h"
#include "plAvatar/plAvatarMgr.h" #include "plAvatar/plAvatarMgr.h"
#include "plVault/plVault.h" #include "plVault/plVault.h"
@ -100,11 +102,13 @@ struct plNCAgeJoiner {
FNCAgeJoinerCallback callback; FNCAgeJoinerCallback callback;
void * userState; void * userState;
bool complete; bool complete;
bool muteLinkSfx;
plOperationProgress* progressBar; plOperationProgress* progressBar;
plNCAgeJoiner ( plNCAgeJoiner (
const NetCommAge & age, const NetCommAge & age,
bool muteSfx,
FNCAgeJoinerCallback callback, FNCAgeJoinerCallback callback,
void * userState void * userState
); );
@ -157,10 +161,12 @@ void AgeVaultDownloadCallback (
//============================================================================ //============================================================================
plNCAgeJoiner::plNCAgeJoiner ( plNCAgeJoiner::plNCAgeJoiner (
const NetCommAge & age, const NetCommAge & age,
bool muteSfx,
FNCAgeJoinerCallback callback, FNCAgeJoinerCallback callback,
void * userState void * userState
) : nextOp(kNoOp) ) : nextOp(kNoOp)
, age(age) , age(age)
, muteLinkSfx(muteSfx)
, callback(callback) , callback(callback)
, userState(userState) , userState(userState)
, complete(false) , complete(false)
@ -354,7 +360,7 @@ void plNCAgeJoiner::ExecNextOp () {
nc->SetFlagsBit(plNetClientApp::kPlayingGame); nc->SetFlagsBit(plNetClientApp::kPlayingGame);
nc->SetFlagsBit(plNetClientApp::kNeedToSendInitialAgeStateLoadedMsg); nc->SetFlagsBit(plNetClientApp::kNeedToSendInitialAgeStateLoadedMsg);
plAgeLoader::GetInstance()->NotifyAgeLoaded(true); plAgeLoader::GetInstance()->NotifyAgeLoaded(true);
Complete(true, "Age joined"); nextOp = kNoOp;
} }
break; break;
@ -449,6 +455,36 @@ bool plNCAgeJoiner::MsgReceive (plMessage * msg) {
return true; return true;
} }
//========================================================================
// Done loading all states. Time to link in!
//========================================================================
plInitialAgeStateLoadedMsg * stateMsg = plInitialAgeStateLoadedMsg::ConvertNoRef(msg);
if(stateMsg) {
plNetObjectDebugger::GetInstance()->LogMsg("OnServerInitComplete");
nc->SetFlagsBit(plNetClientApp::kLoadingInitialAgeState, false);
const plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar();
plLinkEffectsTriggerMsg* lem = new plLinkEffectsTriggerMsg();
lem->SetLeavingAge(false); // linking in
lem->SetLinkKey(nc->GetLocalPlayerKey());
plKey animKey = avMod->GetLinkInAnimKey();
lem->SetLinkInAnimKey(animKey);
// indicate if we are invisible
if (avMod && avMod->IsInStealthMode() && avMod->GetTarget(0))
lem->SetInvisLevel(avMod->GetStealthLevel());
lem->SetBCastFlag(plMessage::kNetPropagate);
lem->MuteLinkSfx(muteLinkSfx);
lem->AddReceiver(hsgResMgr::ResMgr()->FindKey(plUoid(kLinkEffectsMgr_KEY)));
lem->AddReceiver(hsgResMgr::ResMgr()->FindKey(plUoid(kClient_KEY)));
lem->Send();
Complete(true, "Age joined");
return true;
}
return false; return false;
} }
@ -469,6 +505,7 @@ void plNCAgeJoiner::Update () {
void NCAgeJoinerCreate ( void NCAgeJoinerCreate (
plNCAgeJoiner ** pjoiner, plNCAgeJoiner ** pjoiner,
const NetCommAge & age, const NetCommAge & age,
bool muteSfx,
FNCAgeJoinerCallback callback, FNCAgeJoinerCallback callback,
void * userState void * userState
) { ) {
@ -478,6 +515,7 @@ void NCAgeJoinerCreate (
plNCAgeJoiner * joiner; plNCAgeJoiner * joiner;
*pjoiner = joiner = new plNCAgeJoiner( *pjoiner = joiner = new plNCAgeJoiner(
age, age,
muteSfx,
callback, callback,
userState userState
); );

1
Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.h

@ -85,6 +85,7 @@ typedef void (* FNCAgeJoinerCallback)(
void NCAgeJoinerCreate ( void NCAgeJoinerCreate (
plNCAgeJoiner ** joiner, plNCAgeJoiner ** joiner,
const NetCommAge & age, const NetCommAge & age,
bool muteSfx,
FNCAgeJoinerCallback callback, FNCAgeJoinerCallback callback,
void * userState void * userState
); );

14
Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.cpp

@ -81,12 +81,14 @@ struct plNCAgeLeaver {
NextOp nextOp; NextOp nextOp;
bool quitting; bool quitting;
bool muteLinkSfx;
bool complete; bool complete;
FNCAgeLeaverCallback callback; FNCAgeLeaverCallback callback;
void * userState; void * userState;
plNCAgeLeaver ( plNCAgeLeaver (
bool quitting, bool quitting,
bool muteSfx,
FNCAgeLeaverCallback callback, FNCAgeLeaverCallback callback,
void * userState void * userState
); );
@ -109,10 +111,12 @@ struct plNCAgeLeaver {
//============================================================================ //============================================================================
plNCAgeLeaver::plNCAgeLeaver ( plNCAgeLeaver::plNCAgeLeaver (
bool quitting, bool quitting,
bool muteSfx,
FNCAgeLeaverCallback callback, FNCAgeLeaverCallback callback,
void * userState void * userState
) : nextOp(kNoOp) ) : nextOp(kNoOp)
, quitting(quitting) , quitting(quitting)
, muteLinkSfx(muteSfx)
, complete(false) , complete(false)
, callback(callback) , callback(callback)
, userState(userState) , userState(userState)
@ -200,7 +204,13 @@ void plNCAgeLeaver::ExecNextOp () {
//==================================================================== //====================================================================
case kLinkOutFX: { case kLinkOutFX: {
nc->StartLinkOutFX(); plLinkEffectsTriggerMsg* lem = new plLinkEffectsTriggerMsg();
lem->MuteLinkSfx(muteLinkSfx);
lem->SetLeavingAge(true);
lem->SetLinkKey(nc->GetLocalPlayerKey());
lem->SetBCastFlag(plMessage::kNetPropagate);
lem->SetBCastFlag(plMessage::kNetForce); // Necessary?
lem->Send(hsgResMgr::ResMgr()->FindKey(plUoid(kLinkEffectsMgr_KEY)));
} }
break; break;
@ -264,6 +274,7 @@ void plNCAgeLeaver::Update () {
void NCAgeLeaverCreate ( void NCAgeLeaverCreate (
plNCAgeLeaver ** pleaver, plNCAgeLeaver ** pleaver,
bool quitting, bool quitting,
bool muteSfx,
FNCAgeLeaverCallback callback, FNCAgeLeaverCallback callback,
void * userState void * userState
) { ) {
@ -273,6 +284,7 @@ void NCAgeLeaverCreate (
plNCAgeLeaver * leaver; plNCAgeLeaver * leaver;
*pleaver = leaver = new plNCAgeLeaver( *pleaver = leaver = new plNCAgeLeaver(
quitting, quitting,
muteSfx,
callback, callback,
userState userState
); );

1
Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeLeaver.h

@ -85,6 +85,7 @@ typedef void (* FNCAgeLeaverCallback)(
void NCAgeLeaverCreate ( void NCAgeLeaverCreate (
plNCAgeLeaver ** leaver, plNCAgeLeaver ** leaver,
bool quitting, bool quitting,
bool muteSfx,
FNCAgeLeaverCallback callback, FNCAgeLeaverCallback callback,
void * userState void * userState
); );

63
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp

@ -437,55 +437,6 @@ void plNetClientMgr::IUnloadNPCs()
hsAssert(fNPCKeys.empty(), "Still npcs left when linking out"); hsAssert(fNPCKeys.empty(), "Still npcs left when linking out");
} }
//
// begin linking out sounds and gfx
//
void plNetClientMgr::StartLinkOutFX()
{
// send msg to trigger link out effect
if (fLocalPlayerKey)
{
plNetLinkingMgr * lm = plNetLinkingMgr::GetInstance();
plLinkEffectsTriggerMsg* lem = new plLinkEffectsTriggerMsg();
lem->SetLeavingAge(true);
lem->SetLinkKey(fLocalPlayerKey);
lem->SetBCastFlag(plMessage::kNetPropagate);
lem->SetBCastFlag(plMessage::kNetForce); // Necessary?
lem->AddReceiver(hsgResMgr::ResMgr()->FindKey(plUoid(kLinkEffectsMgr_KEY)));
lem->Send();
}
}
//
// beging linking in sounds snd gfx
//
void plNetClientMgr::StartLinkInFX()
{
if (fLocalPlayerKey)
{
const plArmatureMod *avMod = plAvatarMgr::GetInstance()->GetLocalAvatar();
plLinkEffectsTriggerMsg* lem = new plLinkEffectsTriggerMsg();
lem->SetLeavingAge(false); // linking in
lem->SetLinkKey(fLocalPlayerKey);
plKey animKey = avMod->GetLinkInAnimKey();
lem->SetLinkInAnimKey(animKey);
// indicate if we are invisible
if (avMod && avMod->IsInStealthMode() && avMod->GetTarget(0))
{
lem->SetInvisLevel(avMod->GetStealthLevel());
}
lem->SetBCastFlag(plMessage::kNetPropagate);
lem->AddReceiver(hsgResMgr::ResMgr()->FindKey(plUoid(kLinkEffectsMgr_KEY)));
lem->AddReceiver(hsgResMgr::ResMgr()->FindKey(plUoid(kClient_KEY)));
plgDispatch::MsgSend(lem);
}
}
// //
// compute the difference between our clock and the server's in unified time // compute the difference between our clock and the server's in unified time
// //
@ -1056,20 +1007,6 @@ bool plNetClientMgr::MsgReceive( plMessage* msg )
return true; return true;
} }
plInitialAgeStateLoadedMsg *stateMsg = plInitialAgeStateLoadedMsg::ConvertNoRef( msg );
if( stateMsg != nil )
{
// done receiving the initial state of the age from the server
plNetObjectDebugger::GetInstance()->LogMsg("OnServerInitComplete");
// delete fProgressBar;
// fProgressBar=nil;
SetFlagsBit(kLoadingInitialAgeState, false);
StartLinkInFX();
}
plNetVoiceListMsg* voxList = plNetVoiceListMsg::ConvertNoRef(msg); plNetVoiceListMsg* voxList = plNetVoiceListMsg::ConvertNoRef(msg);
if (voxList) if (voxList)
{ {

3
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h

@ -249,9 +249,6 @@ public:
static plNetClientMgr* GetInstance() { return plNetClientMgr::ConvertNoRef(fInstance); } static plNetClientMgr* GetInstance() { return plNetClientMgr::ConvertNoRef(fInstance); }
void StartLinkOutFX();
void StartLinkInFX();
bool MsgReceive(plMessage* msg); bool MsgReceive(plMessage* msg);
void Shutdown(); void Shutdown();
int Init(); int Init();

6
Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

@ -100,6 +100,7 @@ struct NlmOpWaitOp : NlmOp {
struct NlmJoinAgeOp : NlmOp { struct NlmJoinAgeOp : NlmOp {
NetCommAge age; NetCommAge age;
bool muteSfx;
NlmJoinAgeOp () NlmJoinAgeOp ()
: NlmOp(kNlmOpJoinAgeOp) : NlmOp(kNlmOpJoinAgeOp)
{ } { }
@ -107,6 +108,7 @@ struct NlmJoinAgeOp : NlmOp {
struct NlmLeaveAgeOp : NlmOp { struct NlmLeaveAgeOp : NlmOp {
bool quitting; bool quitting;
bool muteSfx;
NlmLeaveAgeOp () NlmLeaveAgeOp ()
: NlmOp(kNlmOpLeaveAgeOp), quitting(false) : NlmOp(kNlmOpLeaveAgeOp), quitting(false)
{ } { }
@ -237,6 +239,7 @@ void plNetLinkingMgr::ExecNextOp () {
NCAgeJoinerCreate( NCAgeJoinerCreate(
&s_ageJoiner, &s_ageJoiner,
joinAgeOp->age, joinAgeOp->age,
joinAgeOp->muteSfx,
NCAgeJoinerCallback, NCAgeJoinerCallback,
waitOp waitOp
); );
@ -258,6 +261,7 @@ void plNetLinkingMgr::ExecNextOp () {
NCAgeLeaverCreate( NCAgeLeaverCreate(
&s_ageLeaver, &s_ageLeaver,
leaveAgeOp->quitting, leaveAgeOp->quitting,
leaveAgeOp->muteSfx,
NCAgeLeaverCallback, NCAgeLeaverCallback,
waitOp waitOp
); );
@ -419,12 +423,14 @@ void plNetLinkingMgr::IDoLink(plLinkToAgeMsg* msg)
} }
// Queue leave op // Queue leave op
NlmLeaveAgeOp * leaveAgeOp = new NlmLeaveAgeOp; NlmLeaveAgeOp * leaveAgeOp = new NlmLeaveAgeOp;
leaveAgeOp->muteSfx = !msg->PlayLinkOutSfx();
QueueOp(leaveAgeOp); QueueOp(leaveAgeOp);
} }
// Queue join op // Queue join op
NlmJoinAgeOp * joinAgeOp = new NlmJoinAgeOp; NlmJoinAgeOp * joinAgeOp = new NlmJoinAgeOp;
joinAgeOp->age.ageInstId = *GetAgeLink()->GetAgeInfo()->GetAgeInstanceGuid(); joinAgeOp->age.ageInstId = *GetAgeLink()->GetAgeInfo()->GetAgeInstanceGuid();
joinAgeOp->muteSfx = !msg->PlayLinkInSfx();
StrCopy( StrCopy(
joinAgeOp->age.ageDatasetName, joinAgeOp->age.ageDatasetName,
GetAgeLink()->GetAgeInfo()->GetAgeFilename(), GetAgeLink()->GetAgeInfo()->GetAgeFilename(),

Loading…
Cancel
Save