mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 13:25:36 +00:00
Merge pull request #842 from eightyeight/console-func-refactor
jamesu's console function refactor
This commit is contained in:
commit
81a385094f
94 changed files with 1886 additions and 721 deletions
|
|
@ -251,7 +251,8 @@ ConsoleFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandA
|
|||
NetConnection *conn = NetConnection::getConnectionToServer();
|
||||
if(!conn)
|
||||
return;
|
||||
RemoteCommandEvent::sendRemoteCommand(conn, argc - 1, argv + 1);
|
||||
StringStackWrapper args(argc - 1, argv + 1);
|
||||
RemoteCommandEvent::sendRemoteCommand(conn, args.count(), args);
|
||||
}
|
||||
|
||||
ConsoleFunction( commandToClient, void, 3, RemoteCommandEvent::MaxRemoteCommandArgs + 2, "(NetConnection client, string func, ...)"
|
||||
|
|
@ -288,7 +289,8 @@ ConsoleFunction( commandToClient, void, 3, RemoteCommandEvent::MaxRemoteCommandA
|
|||
NetConnection *conn;
|
||||
if(!Sim::findObject(argv[1], conn))
|
||||
return;
|
||||
RemoteCommandEvent::sendRemoteCommand(conn, argc - 2, argv + 2);
|
||||
StringStackWrapper args(argc - 2, argv + 2);
|
||||
RemoteCommandEvent::sendRemoteCommand(conn, args.count(), args);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -304,9 +306,10 @@ DefineEngineFunction(removeTaggedString, void, (S32 tag), (-1),
|
|||
"@see addTaggedString()\n"
|
||||
"@see getTaggedString()\n"
|
||||
"@ingroup Networking\n")
|
||||
{
|
||||
RemoteCommandEvent::removeTaggedString(tag);
|
||||
}
|
||||
{
|
||||
RemoteCommandEvent::removeTaggedString(tag);
|
||||
}
|
||||
|
||||
|
||||
DefineEngineFunction(addTaggedString, const char* , (const char* str), (""),
|
||||
"@brief Use the addTaggedString function to tag a new string and add it to the NetStringTable\n\n"
|
||||
|
|
@ -320,10 +323,9 @@ DefineEngineFunction(addTaggedString, const char* , (const char* str), (""),
|
|||
"@see removeTaggedString()\n"
|
||||
"@see getTaggedString()\n"
|
||||
"@ingroup Networking\n")
|
||||
{
|
||||
return RemoteCommandEvent::addTaggedString(str);
|
||||
}
|
||||
|
||||
{
|
||||
return RemoteCommandEvent::addTaggedString(str);
|
||||
}
|
||||
|
||||
|
||||
DefineEngineFunction(getTaggedString, const char* , (const char *tag), (""),
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ TCPObject::~TCPObject()
|
|||
}
|
||||
}
|
||||
|
||||
bool TCPObject::processArguments(S32 argc, const char **argv)
|
||||
bool TCPObject::processArguments(S32 argc, ConsoleValueRef *argv)
|
||||
{
|
||||
if(argc == 0)
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
void disconnect();
|
||||
State getState() { return mState; }
|
||||
|
||||
bool processArguments(S32 argc, const char **argv);
|
||||
bool processArguments(S32 argc, ConsoleValueRef *argv);
|
||||
void send(const U8 *buffer, U32 bufferLen);
|
||||
void addToTable(NetSocket newTag);
|
||||
void removeFromTable();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue