playernet.c File Reference

Implementation of player update network communication. More...

#include "color.h"
#include "playernet.h"
#include "game.h"
#include "net.h"
#include <assert.h>
#include <string.h>

Include dependency graph for playernet.c:

Go to the source code of this file.


MsgDescrAppendPlayerData (MsgDescr *msg, Player *p, Uint32 time)
 Adds update information for another player to a player update message.
static int CalculateOffset (NetBuffer *buffer, int offset)
 Calculates the offset of the next player update item after the one which starts at the given offset.
Bool HandlePlayerSpawn (SocketAddr *origin, NetBuffer *buffer, Uint8 *clientId, Uint16 noid)
 Processes an incomming client request to spawn their tank.
Bool HandlePlayerUpdate (SocketAddr *origin, NetBuffer *buffer, Uint8 *clientId, Uint16 messageId)
 Processes incomming player data.
static Uint8 * ReadPlayer (Uint8 *ptr, Uint32 time)
 Reads in a player's update information from a buffer and updates the corresponding player.
Bool SendSpawnRequest ()
 Sends a request to the server to spawn the local player.

Detailed Description

Implementation of player update network communication.

Jeff Jackowski (
Copyright (C) 2007 Jeff Jackowski

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at:

Definition in file playernet.c.

Generated on Mon May 28 04:41:40 2007 for Retro Tank Super Attack by  doxygen 1.5.2