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?
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?
About the author
Torque Owner Stefan Lundmark