PathManagerEvent crash
by Tim McClarren · in Torque Game Engine · 08/08/2007 (1:42 pm) · 0 replies
I found an odd comment in netConnection.h:104-120:
/// Notice the two macros which we call. The first, DECLARE_CONOBJECT() is there
/// because we're a ConsoleObject. The second, IMPLEMENT_CO_NETEVENT_V1(), is there
/// to register this event type with Torque's networking layer, so that it can be
/// properly transmitted over the wire. There are three macros which you might use:
/// - IMPLEMENT_CO_NETEVENT_V1, which indicates an event which may be sent
/// in either direction, from the client to the server, or from the server to the
/// client.
/// - IMPLEMENT_CO_CLIENTEVENT_V1, which indicates an event which may only
/// be sent to the client.
/// - IMPLEMENT_CO_SERVEREVENT_V1, which indicates an event which may only
/// be sent to the server.
///
/// Choosing the right macro is a good way to make your game more resistant to hacking; for instance,
/// PathManager events are marked as CLIENTEVENTs, because they would cause the server to crash if
/// a client sent them.
This is in fact, not true, at least not in 1.3 and 1.4. PathManagerEvents are declared at pathManager.cc:131:
IMPLEMENT_CO_NETEVENT_V1(PathManagerEvent);
And they *do* cause a server to crash if sent from a client.
Anyone know if this is fixed in 1.5?
Now to figure out why client's periodically send these to the server.
/// Notice the two macros which we call. The first, DECLARE_CONOBJECT() is there
/// because we're a ConsoleObject. The second, IMPLEMENT_CO_NETEVENT_V1(), is there
/// to register this event type with Torque's networking layer, so that it can be
/// properly transmitted over the wire. There are three macros which you might use:
/// - IMPLEMENT_CO_NETEVENT_V1, which indicates an event which may be sent
/// in either direction, from the client to the server, or from the server to the
/// client.
/// - IMPLEMENT_CO_CLIENTEVENT_V1, which indicates an event which may only
/// be sent to the client.
/// - IMPLEMENT_CO_SERVEREVENT_V1, which indicates an event which may only
/// be sent to the server.
///
/// Choosing the right macro is a good way to make your game more resistant to hacking; for instance,
/// PathManager events are marked as CLIENTEVENTs, because they would cause the server to crash if
/// a client sent them.
This is in fact, not true, at least not in 1.3 and 1.4. PathManagerEvents are declared at pathManager.cc:131:
IMPLEMENT_CO_NETEVENT_V1(PathManagerEvent);
And they *do* cause a server to crash if sent from a client.
Anyone know if this is fixed in 1.5?
Now to figure out why client's periodically send these to the server.
About the author