diff --git a/Sources/Plasma/FeatureLib/pfMessage/pfMessageCreatable.h b/Sources/Plasma/FeatureLib/pfMessage/pfMessageCreatable.h index 293da492..945d6adc 100644 --- a/Sources/Plasma/FeatureLib/pfMessage/pfMessageCreatable.h +++ b/Sources/Plasma/FeatureLib/pfMessage/pfMessageCreatable.h @@ -99,4 +99,4 @@ REGISTER_CREATABLE(pfBackdoorMsg); REGISTER_CREATABLE(pfMovieEventMsg); -#endif pfMessageCreatable_inc +#endif //pfMessageCreatable_inc diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp index e6af2ab9..d5d3f9ab 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputManager.cpp @@ -295,7 +295,7 @@ void plInputManager::HandleWin32ControlEvent(UINT message, WPARAM Wparam, LPARAM break; BYTE scan = (BYTE)(Lparam >> 16); - UINT vkey = MapVirtualKey(scan, MAPVK_VSC_TO_VK); + UINT vkey = MapVirtualKey(scan, 1); //MAPVK_VSC_TO_VK bExtended = Lparam >> 24 & 1; hsBool bRepeat = ((Lparam >> 29) & 0xf) != 0; diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp index d81487be..b803f3ff 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plSceneInputInterface.cpp @@ -608,7 +608,8 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) if (fBookMode == kBookOffered) { // and put our own dialog back up... - ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false); + plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); + ISendOfferNotification(avKey, 0, false); //IManageIgnoredAvatars(fOffereeKey, false); fOffereeKey = nil; fBookMode = kNotOffering; @@ -627,7 +628,8 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) // tell them to ignore us plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); - pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); + plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); + pMsg->SetAvKey(avKey); pMsg->SetBCastFlag(plMessage::kNetPropagate); pMsg->SetBCastFlag(plMessage::kNetForce); pMsg->SetBCastFlag(plMessage::kLocalPropagate, false); @@ -754,7 +756,8 @@ hsBool plSceneInputInterface::MsgReceive( plMessage *msg ) if (fBookMode == kBookOffered) { // and put our own dialog back up... - ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false); + plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); + ISendOfferNotification(avKey, 0, false); //IManageIgnoredAvatars(fOffereeKey, false); fBookMode = kOfferBook; fOffereeKey = nil; @@ -830,7 +833,8 @@ void plSceneInputInterface::ILinkOffereeToAge() else if (!VaultGetOwnedAgeLink(&info, &link)) { // We must have an owned copy of the age before we can offer it, so make one now - info.SetAgeInstanceGuid(&plUUID(GuidGenerate())); + plUUID guid(GuidGenerate()); + info.SetAgeInstanceGuid(&guid); std::string title; std::string desc; @@ -858,7 +862,8 @@ void plSceneInputInterface::ILinkOffereeToAge() VaultAgeLinkNode linkAcc(linkNode); if (linkAcc.volat) { if (VaultUnregisterOwnedAgeAndWait(link.GetAgeInfo())) { - link.GetAgeInfo()->SetAgeInstanceGuid(&plUUID(GuidGenerate())); + plUUID guid(GuidGenerate()); + link.GetAgeInfo()->SetAgeInstanceGuid(&guid); VaultRegisterOwnedAgeAndWait(&link); } } @@ -882,7 +887,8 @@ void plSceneInputInterface::ILinkOffereeToAge() if (!fPendingLink && stricmp(fOfferedAgeFile, kPersonalAgeFilename)) { // tell our local dialog to pop up again... - ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false); + plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); + ISendOfferNotification(avKey, 0, false); // make them clickable again(in case they come back?) //IManageIgnoredAvatars(fOffereeKey, false); @@ -1041,7 +1047,8 @@ hsBool plSceneInputInterface::InterpretInputEvent( plInputEventMsg *pMsg ) { // and put our own dialog back up... ISendOfferNotification(fOffereeKey, -999, true); - ISendOfferNotification(plNetClientMgr::GetInstance()->GetLocalPlayerKey(), 0, false); + plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); + ISendOfferNotification(avKey, 0, false); //IManageIgnoredAvatars(fOffereeKey, false); fBookMode = kOfferBook; fOffereeKey = nil; @@ -1138,7 +1145,8 @@ void plSceneInputInterface::ISendAvatarDisabledNotification(hsBool enabled) pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableAvatarClickable); else pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableAvatarClickable); - pMsg->SetAvKey(plNetClientMgr::GetInstance()->GetLocalPlayerKey()); + plKey avKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey(); + pMsg->SetAvKey(avKey); pMsg->SetBCastFlag(plMessage::kNetPropagate); pMsg->SetBCastFlag(plMessage::kNetForce); pMsg->SetBCastFlag(plMessage::kLocalPropagate, false); diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h b/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h index e9eb0575..11e43355 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Intern.h @@ -225,7 +225,7 @@ enum ETransType { kNumTransTypes }; -static char * s_transTypes[] = { +static const char * s_transTypes[] = { // NglAuth.cpp "PingRequestTrans", "LoginRequestTrans", diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsFogControl.h b/Sources/Plasma/PubUtilLib/plPipeline/hsFogControl.h index 013b21f0..db16015a 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsFogControl.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsFogControl.h @@ -148,4 +148,4 @@ public: }; #endif // Move up to FeatureLevel -#endif hsFogControl_inc +#endif //hsFogControl_inc diff --git a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp index 69491d4a..484d7b0f 100644 --- a/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp +++ b/Sources/Plasma/PubUtilLib/plStatGather/plProfileManagerFull.cpp @@ -443,7 +443,7 @@ const wchar_t* plProfileManagerFull::GetProfilePath() plFileUtils::CreateDir(profilePath); wchar_t buff[256]; - swprintf(buff, 256, L"%02d-%02d-%04d_%02d-%02d//", + hsSnwprintf(buff, 256, L"%02d-%02d-%04d_%02d-%02d//", curTime.GetMonth(), curTime.GetDay(), curTime.GetYear(), @@ -460,7 +460,7 @@ const wchar_t* plProfileManagerFull::GetProfilePath() void plProfileManagerFull::ILogStats() { wchar_t statFilename[256]; - swprintf(statFilename, 256, L"%s%s.csv", GetProfilePath(), fLogAgeName.c_str()); + hsSnwprintf(statFilename, 256, L"%s%s.csv", GetProfilePath(), fLogAgeName.c_str()); bool exists = plFileUtils::FileExists(statFilename);