STATE_multiplayer_message_get

 

 



#define STATE_MULTIPLAYER_SYSTEM_MESSAGE 6
#define STATE_MULTIPLAYER_USER_MESSAGE 7

  When the other players\users in this session send messages these messages are accumulated in
  an internal queue inside the engine. This function removes the oldest message waiting
   from the queue and copy it to an internal buffer used for reading messages.
   In order to read the message content, use STATE_multiplayer_message_read_buffer()
  Returns one of this four options:
  1) STATE_MULTIPLAYER_USER_MESSAGE
  		This means that this is a message from another user \ computer.
  
  2) STATE_MULTIPLAYER_SYSTEM_MESSAGE
  		This means that this is a system message.
  		A system message could be for example a notification that  
  		a new user has joined the session. See STATE_multiplayer_message_system_read()
  		to learn how to process system messages.
  
  3) THERE_ARE_NO_MESSAGES
  	 This means that the message queue is empty and that there are no messages waiting
  	 for you to read.
  
  4) VR_ERROR
  	 An error occurred.
  
   Example:
  
  		char sender_name[256];
  		double *opponent_location;
  		int result=STATE_multiplayer_message_get(sender_name);
  		if(result==STATE_MULTIPLAYER_USER_MESSAGE) {
  			opponent_location=STATE_multiplayer_message_read_buffer();
  			  process his location here...
  		}
  

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com