Game Development Community

PostEvent question

by Will Hankinson · in Torque Game Engine · 02/28/2007 (12:18 pm) · 2 replies

This isn't really something I need help on...more just a clarification of a hypothesis. I'm using game->postEvent to post a custom input event. In my actionmap.cc, I put a few debugging printF's in just to make sure I was getting the proper data... and I noticed that for every inputEvent that I send, the console prints two statements (both with the correct value that was sent).

Further, I put in another check to put another little printF if the inputEvent was found in the actionmap. Assuming the input is bound to something, the result is split. ActionMap receives two input events, but it only finds a bound action for one of them (the other just disappears into the ether).

It seems to me that the client (which has an actionmap) is getting one copy of the message and the server (which has no actionmap) is getting the other. Unless the server needs this for journal/demo recording, this seems like a bit of a waste... though I really doubt it's going to affect performance much.

Is there some way to post an event only to the clients? Or is my understanding of this completely wrong?

#1
02/28/2007 (12:42 pm)
Are you running a listening server or a dedicated one? Ie, are you running client and server on the same machine and in the same application instance?
#2
03/05/2007 (9:27 am)
Yes, client & server on the same machine/instance.