mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Fix multiplayer.
git-svn-id: https://svn.eduke32.com/eduke32@1668 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d62c6117fe
commit
1374de7492
3 changed files with 10 additions and 12 deletions
|
@ -487,7 +487,8 @@ typedef struct {
|
||||||
char name[32];
|
char name[32];
|
||||||
} DukePlayer_t;
|
} DukePlayer_t;
|
||||||
|
|
||||||
extern char tempbuf[2048], packbuf[4096], menutextbuf[128];
|
#define PACKBUF_SIZE 65535
|
||||||
|
extern char tempbuf[2048], packbuf[PACKBUF_SIZE], menutextbuf[128];
|
||||||
|
|
||||||
extern int32_t g_spriteGravity;
|
extern int32_t g_spriteGravity;
|
||||||
|
|
||||||
|
|
|
@ -1002,8 +1002,6 @@ void Net_ParseServerPacket(ENetEvent * event)
|
||||||
|
|
||||||
TRAVERSE_CONNECT(i)
|
TRAVERSE_CONNECT(i)
|
||||||
{
|
{
|
||||||
if (g_player[i].playerquitflag == 0) continue;
|
|
||||||
|
|
||||||
g_player[i].ps->dead_flag = *(int16_t *)&packbuf[j];
|
g_player[i].ps->dead_flag = *(int16_t *)&packbuf[j];
|
||||||
j += sizeof(int16_t);
|
j += sizeof(int16_t);
|
||||||
|
|
||||||
|
@ -1017,12 +1015,12 @@ void Net_ParseServerPacket(ENetEvent * event)
|
||||||
|
|
||||||
nsyn = (input_t *)&inputfifo[0][0];
|
nsyn = (input_t *)&inputfifo[0][0];
|
||||||
|
|
||||||
Bmemcpy(&nsyn[i], &packbuf[j], sizeof(input_t));
|
Bmemcpy(&nsyn[i], &packbuf[j], offsetof(input_t, filler));
|
||||||
|
|
||||||
j += offsetof(input_t, filler);
|
j += offsetof(input_t, filler);
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(nsyn[i].bits,SK_GAMEQUIT)) g_player[i].playerquitflag = 0;
|
if (TEST_SYNC_KEY(nsyn[i].bits,SK_GAMEQUIT)) g_player[i].playerquitflag = 0;
|
||||||
g_player[i].movefifoend++;
|
g_player[i].movefifoend++;
|
||||||
|
if (g_player[i].playerquitflag == 0) continue;
|
||||||
|
|
||||||
// Bmemcpy(&g_player[i].ps->opos.x, &g_player[i].ps->pos.x, sizeof(vec3_t));
|
// Bmemcpy(&g_player[i].ps->opos.x, &g_player[i].ps->pos.x, sizeof(vec3_t));
|
||||||
|
|
||||||
|
@ -1962,8 +1960,6 @@ void Net_UpdateClients(void)
|
||||||
|
|
||||||
TRAVERSE_CONNECT(i)
|
TRAVERSE_CONNECT(i)
|
||||||
{
|
{
|
||||||
if (g_player[i].playerquitflag == 0) continue;
|
|
||||||
|
|
||||||
Bmemcpy(&osyn[i], &nsyn[i], offsetof(input_t, filler));
|
Bmemcpy(&osyn[i], &nsyn[i], offsetof(input_t, filler));
|
||||||
|
|
||||||
*(int16_t *)&packbuf[j] = g_player[i].ps->dead_flag;
|
*(int16_t *)&packbuf[j] = g_player[i].ps->dead_flag;
|
||||||
|
@ -1971,6 +1967,7 @@ void Net_UpdateClients(void)
|
||||||
|
|
||||||
Bmemcpy(&packbuf[j], &nsyn[i], offsetof(input_t, filler));
|
Bmemcpy(&packbuf[j], &nsyn[i], offsetof(input_t, filler));
|
||||||
j += offsetof(input_t, filler);
|
j += offsetof(input_t, filler);
|
||||||
|
if (g_player[i].playerquitflag == 0) continue;
|
||||||
|
|
||||||
Bmemcpy(&packbuf[j], &g_player[i].ps->pos.x, sizeof(vec3_t) * 2);
|
Bmemcpy(&packbuf[j], &g_player[i].ps->pos.x, sizeof(vec3_t) * 2);
|
||||||
j += sizeof(vec3_t) * 2;
|
j += sizeof(vec3_t) * 2;
|
||||||
|
@ -2229,7 +2226,7 @@ void Net_UpdateClients(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
char buf[4096];
|
char *buf = alloca(PACKBUF_SIZE);
|
||||||
|
|
||||||
j = qlz_compress((char *)(packbuf)+1, (char *)buf, j, state_compress);
|
j = qlz_compress((char *)(packbuf)+1, (char *)buf, j, state_compress);
|
||||||
Bmemcpy((char *)(packbuf)+1, (char *)buf, j);
|
Bmemcpy((char *)(packbuf)+1, (char *)buf, j);
|
||||||
|
|
|
@ -48,7 +48,7 @@ int16_t cyclers[MAXCYCLERS][6],g_numCyclers;
|
||||||
|
|
||||||
char *ScriptQuotes[MAXQUOTES], *ScriptQuoteRedefinitions[MAXQUOTES];
|
char *ScriptQuotes[MAXQUOTES], *ScriptQuoteRedefinitions[MAXQUOTES];
|
||||||
|
|
||||||
char tempbuf[2048], packbuf[4096], menutextbuf[128], buf[1024];
|
char tempbuf[2048], packbuf[PACKBUF_SIZE], menutextbuf[128], buf[1024];
|
||||||
|
|
||||||
int16_t camsprite;
|
int16_t camsprite;
|
||||||
int16_t g_mirrorWall[64], g_mirrorSector[64], g_mirrorCount;
|
int16_t g_mirrorWall[64], g_mirrorSector[64], g_mirrorCount;
|
||||||
|
|
Loading…
Reference in a new issue