- dead data removal in network.cpp and the player struct.

This commit is contained in:
Christoph Oelckers 2020-09-02 18:00:47 +02:00
parent b3d4bab4dd
commit 4d5e2f5bda
3 changed files with 1 additions and 28 deletions

View file

@ -922,13 +922,6 @@ struct PLAYERstruct
int movefifoend; int movefifoend;
int myminlag;
int syncvalhead;
#define MAXSYNCBYTES 16
// TENSW: on really bad network connections, the sync FIFO queue can overflow if it is the
// same size as the move fifo.
#define SYNCFIFOSIZ 1024
uint8_t syncval[SYNCFIFOSIZ][MAXSYNCBYTES];
// must start out as 0 // must start out as 0
int playerreadyflag; int playerreadyflag;

View file

@ -65,14 +65,7 @@ SWBOOL CommEnabled = FALSE;
uint8_t CommPlayers = 0; uint8_t CommPlayers = 0;
int movefifoplc, movefifosendplc; //, movefifoend[MAX_SW_PLAYERS]; int movefifoplc, movefifosendplc; //, movefifoend[MAX_SW_PLAYERS];
//int myminlag[MAX_SW_PLAYERS]; int bufferjitter = 1;
int mymaxlag, otherminlag, bufferjitter = 1;
// GAME.C sync state variables
uint8_t syncstat[MAXSYNCBYTES];
//int syncvalhead[MAX_SW_PLAYERS];
int syncvaltail, syncvaltottail;
void GetSyncInfoFromPacket(uint8_t *packbuf, int packbufleng, int *j, int otherconnectindex);
int ogameclock; int ogameclock;
double smoothratio; double smoothratio;
@ -115,23 +108,11 @@ InitNetVars(void)
{ {
pp = Player + pnum; pp = Player + pnum;
pp->movefifoend = 0; pp->movefifoend = 0;
Player[pnum].syncvalhead = 0;
memset(pp->inputfifo,0,sizeof(pp->inputfifo)); memset(pp->inputfifo,0,sizeof(pp->inputfifo));
} }
movefifoplc = 0; movefifoplc = 0;
movefifosendplc = 0; movefifosendplc = 0;
syncvaltail = 0;
syncvaltottail = 0;
predictmovefifoplc = 0; predictmovefifoplc = 0;
memset(&syncstat, 0, sizeof(syncstat));
TRAVERSE_CONNECT(pnum)
{
Player[pnum].myminlag = 0;
}
otherminlag = mymaxlag = 0;
} }
void void

View file

@ -29,7 +29,6 @@ BEGIN_SW_NS
#define SYNC_TEST 0 #define SYNC_TEST 0
#define MAXSYNCBYTES 16 #define MAXSYNCBYTES 16
extern uint8_t syncstat[MAXSYNCBYTES];
extern SWBOOL PredictionOn; extern SWBOOL PredictionOn;
extern PLAYER PredictPlayer; extern PLAYER PredictPlayer;
extern PLAYERp ppp; extern PLAYERp ppp;