This should fix a bug with ifgotweaponce where the game had a rare chance of crashing and burning in cooperative

git-svn-id: https://svn.eduke32.com/eduke32@375 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-12-01 22:34:32 +00:00
parent 0d22a2a208
commit 36f69beeb6
3 changed files with 12 additions and 11 deletions

View file

@ -487,7 +487,7 @@ void getpackets(void)
{
lastpackettime = totalclock;
#ifdef TESTNET
initprintf("RECEIVED PACKET: type: %d : len %d\n", packbuf[0], packbufleng);
initprintf("RECEIVED PACKET: type: %d : len %d\n", packbuf[0], packbufleng);
#endif
switch (packbuf[0])
{
@ -914,7 +914,7 @@ void getpackets(void)
case 250:
if (playerreadyflag[other] == 0)
initprintf("Player %ld is ready\n", other);
initprintf("Player %ld is ready\n", other);
playerreadyflag[other]++;
break;
case 255:
@ -3439,12 +3439,12 @@ void displayrest(long smoothratio)
if (ud.coords)
coords(screenpeek);
#if defined(POLYMOST) && defined(USE_OPENGL)
#if defined(POLYMOST) && defined(USE_OPENGL)
{
extern char mdpause;
mdpause = ud.pause_on;
}
#endif
#endif
tics();

View file

@ -3840,6 +3840,7 @@ char parse(void)
ps[g_p].weaprecs[ps[g_p].weapreccnt++] = g_sp->picnum;
parseifelse(g_sp->owner == g_i);
}
else parseifelse(0);
}
else parseifelse(0);
break;

View file

@ -1430,12 +1430,12 @@ void waitforeverybody()
while (1)
{
#ifdef _WIN32
Sleep(10);
#else
usleep(10);
#ifdef _WIN32
Sleep(10);
#else
usleep(10);
#endif
sampletimer();
sampletimer();
handleevents();
AudioUpdate();
@ -1589,8 +1589,8 @@ int enterlevel(char g)
handleevents();
getpackets();
waitforeverybody();
ready2send = 0;
ready2send = 0;
if ((g&MODE_DEMO) != MODE_DEMO) ud.recstat = ud.m_recstat;
ud.respawn_monsters = ud.m_respawn_monsters;
ud.respawn_items = ud.m_respawn_items;