1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Convert SDL (mostly) to plStrings

This commit is contained in:
2012-11-18 16:49:39 -08:00
parent 188171235e
commit 49dfb4e546
45 changed files with 456 additions and 488 deletions

View File

@ -385,13 +385,11 @@ bool plLinkEffectsMgr::MsgReceive(plMessage *msg)
bool linkFromACA = prevAgeName && !stricmp(prevAgeName, kAvCustomizationFilename);
bool linkToFissureDrop = lm &&
lm->GetAgeLink()->HasSpawnPt() &&
lm->GetAgeLink()->SpawnPoint().GetName() &&
!stricmp(lm->GetAgeLink()->SpawnPoint().GetName(), kCleftAgeLinkInPointFissureDrop);
lm->GetAgeLink()->HasSpawnPt() &&
!lm->GetAgeLink()->SpawnPoint().GetName().CompareI(kCleftAgeLinkInPointFissureDrop);
bool linkToDsntFromShell = lm &&
lm->GetAgeLink()->HasSpawnPt() &&
lm->GetAgeLink()->SpawnPoint().GetTitle() &&
!stricmp(lm->GetAgeLink()->SpawnPoint().GetTitle(), kDescentLinkFromShell);
lm->GetAgeLink()->HasSpawnPt() &&
!lm->GetAgeLink()->SpawnPoint().GetTitle().CompareI(kDescentLinkFromShell);
if ( linkToACA || linkFromACA || linkToStartup || linkFromStartup || linkToFissureDrop || linkToDsntFromShell)
{
BCMsg->SetLinkFlag(plLinkEffectBCMsg::kMute);

View File

@ -270,8 +270,8 @@ void plNCAgeJoiner::ExecNextOp () {
avatarName = "Male";
else
avatarName = NetCommGetPlayer()->avatarDatasetName;
const char * linkInName = plNetLinkingMgr::GetInstance()->GetAgeLink()->SpawnPoint().GetName();
am->LoadPlayer( avatarName, nil, linkInName );
plString linkInName = plNetLinkingMgr::GetInstance()->GetAgeLink()->SpawnPoint().GetName();
am->LoadPlayer( avatarName, nil, linkInName.c_str() );
}
else {
LogMsg(kLogPerf, L"AgeJoiner: Next:kPropagatePlayer");

View File

@ -624,7 +624,7 @@ void plNetClientMgr::ICheckPendingStateLoad(double secs)
// discard the state if object not found in dataset.
hsLogEntry( DebugMsg( "Failed to find object %s in dataset. Discarding pending state '%s'",
tmpUoid.StringIze().c_str(),
pl->fSDRec->GetDescriptor()->GetName() ) );
pl->fSDRec->GetDescriptor()->GetName().c_str() ) );
delete pl;
it = fPendingLoads.erase(it);
continue;
@ -645,9 +645,10 @@ void plNetClientMgr::ICheckPendingStateLoad(double secs)
#ifdef HS_DEBUGGING
if (plNetObjectDebugger::GetInstance()->IsDebugObject(so))
{
hsLogEntry( DebugMsg( "Delivering SDL state %s:%s", pl->fKey->GetName().c_str(), pl->fSDRec->GetDescriptor()->GetName() ) );
// hsLogEntry(plNetObjectDebugger::GetInstance()->LogMsg(xtl::format("Dispatching SDL state, type %s to object:%s, locallyOwned=%d, st=%.3f rt=%.3f",
// pl->fSDRec->GetDescriptor()->GetName(), pl->fKey->GetName(),
hsLogEntry( DebugMsg( "Delivering SDL state %s:%s", pl->fKey->GetName().c_str(),
pl->fSDRec->GetDescriptor()->GetName().c_str() ) );
// hsLogEntry(plNetObjectDebugger::GetInstance()->LogMsg(plString::Format("Dispatching SDL state, type %s to object:%s, locallyOwned=%d, st=%.3f rt=%.3f",
// pl->fSDRec->GetDescriptor()->GetName().c_str(), pl->fKey->GetName().c_str(),
// so->IsLocallyOwned()==plSynchedObject::kYes, secs, hsTimer::GetSeconds()).c_str()));
// hsLogEntry( pl->fSDRec->DumpToObjectDebugger( "Delivering SDL state", false, 0 ) );
}
@ -671,7 +672,7 @@ void plNetClientMgr::ICheckPendingStateLoad(double secs)
// for around 5 minutes and its time to go
WarningMsg( "Pending state '%s' for object [uoid:%s,key:%s] has been queued for about %f secs. Removing...",
pl->fSDRec && pl->fSDRec->GetDescriptor() ? pl->fSDRec->GetDescriptor()->GetName() : "?",
pl->fSDRec && pl->fSDRec->GetDescriptor() ? pl->fSDRec->GetDescriptor()->GetName().c_str() : "?",
pl->fUoid.StringIze().c_str(), pl->fKey ? pl->fKey->GetUoid().StringIze().c_str() : "?",
( rawSecs - pl->fQueuedTime ) * pl->fQueueTimeResets);
@ -681,7 +682,7 @@ void plNetClientMgr::ICheckPendingStateLoad(double secs)
}
WarningMsg( "Pending state '%s' for object [uoid:%s,key:%s] has been queued for about %f secs. %s",
pl->fSDRec && pl->fSDRec->GetDescriptor() ? pl->fSDRec->GetDescriptor()->GetName() : "?",
pl->fSDRec && pl->fSDRec->GetDescriptor() ? pl->fSDRec->GetDescriptor()->GetName().c_str() : "?",
pl->fUoid.StringIze().c_str(), pl->fKey ? pl->fKey->GetUoid().StringIze().c_str() : "?",
( rawSecs - pl->fQueuedTime ) * pl->fQueueTimeResets,
so ? "(not loaded)" : "(not final)" );

View File

@ -236,12 +236,12 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgSDLState)
// extract stateDataRecord from msg
hsReadOnlyStream stream(m->StreamInfo()->GetStreamLen(), m->StreamInfo()->GetStreamBuf());
char* descName = nil;
plString descName;
int ver;
plStateDataRecord::ReadStreamHeader(&stream, &descName, &ver);
plStateDescriptor* des = plSDLMgr::GetInstance()->FindDescriptor(descName, ver);
if (stricmp(descName, kSDLAvatarPhysical) == 0)
if (descName.CompareI(kSDLAvatarPhysical) == 0)
rwFlags |= plSDL::kKeepDirty;
//
@ -287,13 +287,11 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgSDLState)
// queue up state
nc->fPendingLoads.push_back(pl);
hsLogEntry( nc->DebugMsg( "Added pending SDL delivery for %s:%s",
m->ObjectInfo()->GetObjectName().c_str(), des->GetName() ) );
m->ObjectInfo()->GetObjectName().c_str(), des->GetName().c_str() ) );
}
else
delete sdRec;
delete [] descName; // We've only used descName for a lookup (via SDR, and some error strings. Must delete now.
return hsOK;
}

View File

@ -427,7 +427,7 @@ void plNetLinkingMgr::IDoLink(plLinkToAgeMsg* msg)
);
StrCopy(
joinAgeOp->age.spawnPtName,
GetAgeLink()->SpawnPoint().GetName(),
GetAgeLink()->SpawnPoint().GetName().c_str(),
arrsize(joinAgeOp->age.spawnPtName)
);
QueueOp(joinAgeOp);