Browse Source

Add an error message for NCAgeJoiner failures

Since we have a pfSecurePreloader that doesn't redownload every single
launch, I don't feel bad about presenting an error message to the user and
killing the client. This is really better than letting them languish at a
black screen, groping for the relto book.
Adam Johnson 13 years ago
parent
commit
2599bfbd7a
  1. 14
      Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

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

@ -47,6 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetTransport/plNetTransportMember.h" // OfferLinkToPlayer() #include "plNetTransport/plNetTransportMember.h" // OfferLinkToPlayer()
#include "plgDispatch.h" #include "plgDispatch.h"
#include "pnMessage/plClientMsg.h"
#include "pnMessage/plTimeMsg.h" #include "pnMessage/plTimeMsg.h"
#include "plMessage/plLinkToAgeMsg.h" #include "plMessage/plLinkToAgeMsg.h"
#include "pnKeyedObject/plKey.h" #include "pnKeyedObject/plKey.h"
@ -159,8 +160,19 @@ void plNetLinkingMgr::NCAgeJoinerCallback (
void * notify, void * notify,
void * userState void * userState
) { ) {
plNetLinkingMgr * lm = plNetLinkingMgr::GetInstance(); NCAgeJoinerCompleteNotify* params = (NCAgeJoinerCompleteNotify*)notify;
// Tell the user we failed to link.
// In the future, we might want to try graceful recovery (link back to Relto?)
if (!params->success) {
plNetClientMgr::StaticErrorMsg(params->msg);
hsMessageBox(params->msg, "Linking Error", hsMessageBoxNormal, hsMessageBoxIconError);
plClientMsg* clientMsg = new plClientMsg(plClientMsg::kQuit);
clientMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY));
return;
}
plNetLinkingMgr * lm = plNetLinkingMgr::GetInstance();
switch (type) { switch (type) {
case kAgeJoinerComplete: { case kAgeJoinerComplete: {
ASSERT(joiner == s_ageJoiner); ASSERT(joiner == s_ageJoiner);

Loading…
Cancel
Save