Announcement

Collapse
No announcement yet.

CSQC input methods

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSQC input methods

    Can someone explain what methods there are for communicating from client to server in FTEQW? Right now all I am aware of is modifying the input_* globals in CSQC_Input_Frame. Is it at all possible to run WriteByte on the client end or send a string or something to that effect?

  • #2
    csqc can call sendevent if you want to send an event from csqc to ssqc. You can pass up to 6 arguments (possibly 6 vectors or 6 strings or a mix of them) to the ssqc.
    The server will print out the name of the handler function that it needed, if it isn't defined in your ssqc.

    if you want something compatible with DP, then you need to use localcmd("cmd foo something somethingelse\n"));
    You can then parse all but the cmd part serverside with SV_ParseClientCommand - be sure to call clientcommand for anything that you do not recognise. the client may fail to connect etc if you fail to do so.
    Note that many existing things also work this way, including name/userinfo changes, the say command, etc. All of those can be parsed serverside in this way, as well as faked from the csqc.

    The client cannot call WriteByte because the idea of the ssqc calling readbyte is a somewhat unsafe one, its mostly paranoia.
    Some Game Thing

    Comment

    Working...
    X