Remove unused fields in struct player

This commit is contained in:
Kp 2013-09-20 23:25:10 +00:00
parent 7e6278bb0a
commit 9210a3870e
2 changed files with 3 additions and 14 deletions

View file

@ -84,11 +84,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
typedef struct player {
// Who am I data
char callsign[CALLSIGN_LEN+1]; // The callsign of this player, for net purposes.
ubyte net_address[6]; // The network address of the player.
sbyte connected; // Is the player connected or not?
int objnum; // What object number this player is. (made an int by mk because it's very often referenced)
int n_packets_got; // How many packets we got from them
int n_packets_sent; // How many packets we sent to them
// -- make sure you're 4 byte aligned now!
@ -111,11 +108,6 @@ typedef struct player {
ushort vulcan_ammo;
ushort secondary_ammo[MAX_SECONDARY_WEAPONS]; // How much ammo of each type.
#if defined(DXX_BUILD_DESCENT_II)
ushort pad; // Pad because increased weapon_flags from byte to short -YW 3/22/95
#endif
// -- make sure you're 4 byte aligned now
// Statistics...
int last_score; // Score at beginning of current level.
int score; // Current score.

View file

@ -461,11 +461,11 @@ void state_player_to_player_rw(player *pl, player_rw *pl_rw)
{
int i=0;
memcpy(pl_rw->callsign, pl->callsign, CALLSIGN_LEN+1);
memcpy(pl_rw->net_address, pl->net_address, 6);
memset(pl_rw->net_address, 0, 6);
pl_rw->connected = pl->connected;
pl_rw->objnum = pl->objnum;
pl_rw->n_packets_got = pl->n_packets_got;
pl_rw->n_packets_sent = pl->n_packets_sent;
pl_rw->n_packets_got = 0;
pl_rw->n_packets_sent = 0;
pl_rw->flags = pl->flags;
pl_rw->energy = pl->energy;
pl_rw->shields = pl->shields;
@ -514,11 +514,8 @@ void state_player_rw_to_player(player_rw *pl_rw, player *pl)
{
int i=0;
memcpy(pl->callsign, pl_rw->callsign, CALLSIGN_LEN+1);
memcpy(pl->net_address, pl_rw->net_address, 6);
pl->connected = pl_rw->connected;
pl->objnum = pl_rw->objnum;
pl->n_packets_got = pl_rw->n_packets_got;
pl->n_packets_sent = pl_rw->n_packets_sent;
pl->flags = pl_rw->flags;
pl->energy = pl_rw->energy;
pl->shields = pl_rw->shields;