Browse Source

Some fixes for pfConsole.

Darryl Pogue 13 years ago
parent
commit
2493cf8f73
  1. 3
      Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp
  2. 22
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp
  3. 11
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp

3
Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp

@ -45,6 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include "pfPython/cyPythonInterface.h"
#include "HeadSpin.h"
#include "pfConsole.h"
#include "pfConsoleCore/pfConsoleEngine.h"
@ -62,7 +64,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h"
#include "plPipeline.h"
#include "pfPython/cyPythonInterface.h"
#include "plNetClient/plNetClientMgr.h"
#ifndef PLASMA_EXTERNAL_RELEASE

22
Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp

@ -49,6 +49,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define LIMIT_CONSOLE_COMMANDS 1
#endif
#include "pfPython/cyPythonInterface.h"
#include "pfPython/plPythonSDLModifier.h"
#include "pfConsoleCore/pfConsoleCmd.h"
#include "plgDispatch.h"
@ -163,10 +165,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsStlUtils.h"
#include "hsTemplates.h"
#include "pfPython/cyPythonInterface.h"
#include "pfPython/plPythonSDLModifier.h"
#include "plResMgr/plResManagerHelper.h"
#include "plResMgr/plResMgrSettings.h"
#include "plResMgr/plLocalization.h"
@ -2466,11 +2464,10 @@ PF_CONSOLE_CMD( App, // groupName
"", // paramList
"Quit the client app" ) // helpString
{
if( plClient::GetInstance() )
PostMessage(plClient::GetInstance()->GetWindowHandle(),
WM_SYSCOMMAND,
SC_CLOSE,
0);
if( plClient::GetInstance() ) {
plClientMsg* msg = new plClientMsg(plClientMsg::kQuit);
msg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY));
}
}
#ifndef LIMIT_CONSOLE_COMMANDS
@ -2510,8 +2507,12 @@ PF_CONSOLE_CMD(App,
"",
"Set low priority for this process")
{
#if HS_BUILD_FOR_WIN32
SetPriorityClass( GetCurrentProcess(), IDLE_PRIORITY_CLASS );
PrintString( "Set process priority to lowest setting" );
#else
PrintString("Not implemented on your platform!");
#endif
}
@ -3933,6 +3934,8 @@ PF_CONSOLE_CMD( Nav, PageInNodeList, // Group name, Function name
"string roomNameBase", // Params
"Pages in all scene nodes that start with name." ) // Help string
{
/* This is really old and hasn't worked since 2002 anyways. */
#if HS_BUILD_FOR_WIN32
plSynchEnabler ps(false); // disable dirty tracking while paging in
std::string pageInNodesStr;
@ -3950,6 +3953,7 @@ PF_CONSOLE_CMD( Nav, PageInNodeList, // Group name, Function name
}
pMsg1->AddReceiver( plClient::GetInstance()->GetKey() );
plgDispatch::MsgSend(pMsg1);
#endif
}
#ifndef LIMIT_CONSOLE_COMMANDS

11
Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp

@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#endif
#include "pfPython/plPythonSDLModifier.h"
#include "pfConsoleCore/pfConsoleCmd.h"
#include "plgDispatch.h"
@ -355,7 +356,8 @@ PF_CONSOLE_CMD( Net, // groupName
link.GetAgeInfo()->SetAgeFilename( params[0] );
//link.GetAgeInfo()->SetAgeInstanceName( params[0] );
//link.GetAgeInfo()->SetAgeUserDefinedName( params[0] );
link.GetAgeInfo()->SetAgeInstanceGuid( &plUUID( params[1] ) );
plUUID guid(params[1]);
link.GetAgeInfo()->SetAgeInstanceGuid( &guid );
link.SetLinkingRules( plNetCommon::LinkingRules::kBasicLink );
plNetLinkingMgr::GetInstance()->LinkToAge( &link );
PrintString("Linking to age...");
@ -637,7 +639,6 @@ PF_CONSOLE_CMD( Net_DebugObject, // groupName
plNetObjectDebugger::GetInstance()->ClearAllDebugObjects();
}
#include "pfPython/plPythonSDLModifier.h"
PF_CONSOLE_CMD( Net_DebugObject, // groupName
DumpAgeSDLHook, // fxnName
"bool dirtyOnly", // paramList
@ -810,7 +811,8 @@ PF_CONSOLE_CMD( Net_Vault,
plAgeLinkStruct link;
link.GetAgeInfo()->SetAgeFilename( params[0] );
link.GetAgeInfo()->SetAgeInstanceName( params[0] );
link.GetAgeInfo()->SetAgeInstanceGuid( &plUUID(GuidGenerate()));
plUUID guid(GuidGenerate());
link.GetAgeInfo()->SetAgeInstanceGuid( &guid);
link.SetSpawnPoint( kDefaultSpawnPoint );
bool success = VaultRegisterOwnedAgeAndWait(&link);
PrintStringF(PrintString, "Operation %s.", success ? "Successful" : "Failed");
@ -837,7 +839,8 @@ PF_CONSOLE_CMD( Net_Vault,
plAgeLinkStruct link;
link.GetAgeInfo()->SetAgeFilename( params[0] );
link.GetAgeInfo()->SetAgeInstanceName( params[0] );
link.GetAgeInfo()->SetAgeInstanceGuid( &plUUID(GuidGenerate()));
plUUID guid(GuidGenerate());
link.GetAgeInfo()->SetAgeInstanceGuid( &guid);
link.SetSpawnPoint( kDefaultSpawnPoint );
bool success = VaultRegisterOwnedAgeAndWait(&link);
PrintStringF(PrintString, "Operation %s.", success ? "Successful" : "Failed");

Loading…
Cancel
Save