mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
further multiplayer improvements
git-svn-id: https://svn.eduke32.com/eduke32@1574 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8c015f48f3
commit
3cb09fd6ba
11 changed files with 574 additions and 358 deletions
|
@ -501,7 +501,7 @@ void A_DeleteSprite(int32_t s)
|
||||||
|
|
||||||
void A_AddToDeleteQueue(int32_t i)
|
void A_AddToDeleteQueue(int32_t i)
|
||||||
{
|
{
|
||||||
if (g_spriteDeleteQueueSize == 0)
|
if (net_peer || g_spriteDeleteQueueSize == 0)
|
||||||
{
|
{
|
||||||
deletesprite(i);
|
deletesprite(i);
|
||||||
return;
|
return;
|
||||||
|
@ -1044,7 +1044,7 @@ static void G_MovePlayers(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ud.multimode > 1)
|
if (net_server || (net_server || ud.multimode > 1))
|
||||||
otherp = P_FindOtherPlayer(s->yvel,&otherx);
|
otherp = P_FindOtherPlayer(s->yvel,&otherx);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1055,7 +1055,7 @@ static void G_MovePlayers(void)
|
||||||
if (actorscrptr[sprite[i].picnum])
|
if (actorscrptr[sprite[i].picnum])
|
||||||
A_Execute(i,s->yvel,otherx);
|
A_Execute(i,s->yvel,otherx);
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if (net_server || (net_server || ud.multimode > 1))
|
||||||
if (sprite[g_player[otherp].ps->i].extra > 0)
|
if (sprite[g_player[otherp].ps->i].extra > 0)
|
||||||
{
|
{
|
||||||
if (s->yrepeat > 32 && sprite[g_player[otherp].ps->i].yrepeat < 32)
|
if (s->yrepeat > 32 && sprite[g_player[otherp].ps->i].yrepeat < 32)
|
||||||
|
@ -3743,7 +3743,7 @@ static void G_MoveActors(void)
|
||||||
gamelightcount++;
|
gamelightcount++;
|
||||||
#endif // POLYMER
|
#endif // POLYMER
|
||||||
|
|
||||||
if (ud.multimode < 2)
|
if (!net_server && (!net_server && ud.multimode < 2))
|
||||||
{
|
{
|
||||||
if (g_noEnemies == 1)
|
if (g_noEnemies == 1)
|
||||||
{
|
{
|
||||||
|
@ -3946,7 +3946,7 @@ static void G_MoveActors(void)
|
||||||
// case GREENSLIME+7:
|
// case GREENSLIME+7:
|
||||||
|
|
||||||
// #ifndef VOLUMEONE
|
// #ifndef VOLUMEONE
|
||||||
if (ud.multimode < 2)
|
if (net_server && (!net_server && ud.multimode < 2))
|
||||||
{
|
{
|
||||||
if (g_noEnemies == 1)
|
if (g_noEnemies == 1)
|
||||||
{
|
{
|
||||||
|
@ -4770,7 +4770,7 @@ DETONATEB:
|
||||||
goto BOLT;
|
goto BOLT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ud.multimode < 2 && A_CheckEnemySprite(s))
|
if (!net_server && (!net_server && ud.multimode < 2) && A_CheckEnemySprite(s))
|
||||||
{
|
{
|
||||||
if (g_noEnemies == 1)
|
if (g_noEnemies == 1)
|
||||||
{
|
{
|
||||||
|
@ -5695,7 +5695,7 @@ static void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
g_player[p].ps->ang += q;
|
g_player[p].ps->ang += q;
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (net_server || numplayers > 1)
|
||||||
{
|
{
|
||||||
g_player[p].ps->oposx = g_player[p].ps->posx;
|
g_player[p].ps->oposx = g_player[p].ps->posx;
|
||||||
g_player[p].ps->oposy = g_player[p].ps->posy;
|
g_player[p].ps->oposy = g_player[p].ps->posy;
|
||||||
|
@ -5722,7 +5722,7 @@ static void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
sprite[j].ang+=q;
|
sprite[j].ang+=q;
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (net_server || numplayers > 1)
|
||||||
{
|
{
|
||||||
ActorExtra[j].bposx = sprite[j].x;
|
ActorExtra[j].bposx = sprite[j].x;
|
||||||
ActorExtra[j].bposy = sprite[j].y;
|
ActorExtra[j].bposy = sprite[j].y;
|
||||||
|
@ -5860,7 +5860,7 @@ static void G_MoveEffectors(void) //STATNUM 3
|
||||||
g_player[p].ps->posx += l;
|
g_player[p].ps->posx += l;
|
||||||
g_player[p].ps->posy += x;
|
g_player[p].ps->posy += x;
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (net_server || numplayers > 1)
|
||||||
{
|
{
|
||||||
g_player[p].ps->oposx = g_player[p].ps->posx;
|
g_player[p].ps->oposx = g_player[p].ps->posx;
|
||||||
g_player[p].ps->oposy = g_player[p].ps->posy;
|
g_player[p].ps->oposy = g_player[p].ps->posy;
|
||||||
|
@ -5882,7 +5882,7 @@ static void G_MoveEffectors(void) //STATNUM 3
|
||||||
{
|
{
|
||||||
if (sprite[j].picnum != SECTOREFFECTOR && sprite[j].picnum != LOCATORS)
|
if (sprite[j].picnum != SECTOREFFECTOR && sprite[j].picnum != LOCATORS)
|
||||||
{
|
{
|
||||||
if (numplayers < 2)
|
if (numplayers < 2 && !net_server)
|
||||||
{
|
{
|
||||||
ActorExtra[j].bposx = sprite[j].x;
|
ActorExtra[j].bposx = sprite[j].x;
|
||||||
ActorExtra[j].bposy = sprite[j].y;
|
ActorExtra[j].bposy = sprite[j].y;
|
||||||
|
@ -5891,7 +5891,7 @@ static void G_MoveEffectors(void) //STATNUM 3
|
||||||
sprite[j].x += l;
|
sprite[j].x += l;
|
||||||
sprite[j].y += x;
|
sprite[j].y += x;
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (net_server || numplayers > 1)
|
||||||
{
|
{
|
||||||
ActorExtra[j].bposx = sprite[j].x;
|
ActorExtra[j].bposx = sprite[j].x;
|
||||||
ActorExtra[j].bposy = sprite[j].y;
|
ActorExtra[j].bposy = sprite[j].y;
|
||||||
|
@ -6571,12 +6571,12 @@ static void G_MoveEffectors(void) //STATNUM 3
|
||||||
if (sprite[j].statnum == STAT_PLAYER && sprite[j].owner >= 0)
|
if (sprite[j].statnum == STAT_PLAYER && sprite[j].owner >= 0)
|
||||||
{
|
{
|
||||||
p = sprite[j].yvel;
|
p = sprite[j].yvel;
|
||||||
if (numplayers < 2)
|
if (numplayers < 2 && !net_server)
|
||||||
g_player[p].ps->oposz = g_player[p].ps->posz;
|
g_player[p].ps->oposz = g_player[p].ps->posz;
|
||||||
g_player[p].ps->posz += q;
|
g_player[p].ps->posz += q;
|
||||||
g_player[p].ps->truefz += q;
|
g_player[p].ps->truefz += q;
|
||||||
g_player[p].ps->truecz += q;
|
g_player[p].ps->truecz += q;
|
||||||
if (numplayers > 1)
|
if (net_server || numplayers > 1)
|
||||||
g_player[p].ps->oposz = g_player[p].ps->posz;
|
g_player[p].ps->oposz = g_player[p].ps->posz;
|
||||||
}
|
}
|
||||||
if (sprite[j].statnum != STAT_EFFECTOR)
|
if (sprite[j].statnum != STAT_EFFECTOR)
|
||||||
|
|
|
@ -547,17 +547,17 @@ typedef struct {
|
||||||
// spriteinterpolate sprpos[MAXSPRITES];
|
// spriteinterpolate sprpos[MAXSPRITES];
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t bposx,bposy,bposz,flags; //16b
|
|
||||||
int32_t floorz,ceilingz,lastvx,lastvy; //16b
|
|
||||||
int32_t lasttransport; //4b
|
|
||||||
|
|
||||||
int16_t timetosleep, shootzvel; //4b
|
|
||||||
|
|
||||||
intptr_t temp_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
intptr_t temp_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
||||||
|
|
||||||
int16_t picnum,ang,extra,owner; //8b
|
int16_t picnum,ang,extra,owner; //8b
|
||||||
int16_t movflag,tempang,actorstayput,dispicnum; //8b
|
int16_t movflag,tempang,timetosleep; //6b
|
||||||
|
|
||||||
|
int32_t flags, bposx,bposy,bposz; //16b
|
||||||
|
int32_t floorz,ceilingz,lastvx,lastvy; //16b
|
||||||
|
int32_t lasttransport; //4b
|
||||||
|
|
||||||
int16_t lightId, lightcount, lightmaxrange, cgg; //8b
|
int16_t lightId, lightcount, lightmaxrange, cgg; //8b
|
||||||
|
int16_t actorstayput, dispicnum, shootzvel; // 6b
|
||||||
|
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
_prlight *lightptr; //4b/8b
|
_prlight *lightptr; //4b/8b
|
||||||
|
@ -570,6 +570,16 @@ typedef struct {
|
||||||
int8_t filler[16]; // pad struct to 128 bytes
|
int8_t filler[16]; // pad struct to 128 bytes
|
||||||
} ActorData_t;
|
} ActorData_t;
|
||||||
|
|
||||||
|
// this struct needs to match the beginning of ActorData_t above
|
||||||
|
typedef struct {
|
||||||
|
intptr_t temp_data[10]; // 40b/80b sometimes used to hold pointers to con code
|
||||||
|
|
||||||
|
int16_t picnum,ang,extra,owner; //8b
|
||||||
|
int16_t movflag,tempang,timetosleep; // 6b
|
||||||
|
|
||||||
|
int32_t flags; // 4b
|
||||||
|
} NetActorData_t;
|
||||||
|
|
||||||
extern ActorData_t ActorExtra[MAXSPRITES];
|
extern ActorData_t ActorExtra[MAXSPRITES];
|
||||||
|
|
||||||
extern input_t loc;
|
extern input_t loc;
|
||||||
|
@ -1105,6 +1115,7 @@ enum DukePacket_t
|
||||||
PACKET_LOAD_GAME,
|
PACKET_LOAD_GAME,
|
||||||
PACKET_VERSION,
|
PACKET_VERSION,
|
||||||
PACKET_AUTH,
|
PACKET_AUTH,
|
||||||
|
PACKET_PLAYER_READY,
|
||||||
|
|
||||||
// any packet with an ID higher than PACKET_BROADCAST is rebroadcast by server
|
// any packet with an ID higher than PACKET_BROADCAST is rebroadcast by server
|
||||||
// this is so hacked clients can't create fake server packets and get the server
|
// this is so hacked clients can't create fake server packets and get the server
|
||||||
|
@ -1120,9 +1131,6 @@ enum DukePacket_t
|
||||||
PACKET_MAP_VOTE,
|
PACKET_MAP_VOTE,
|
||||||
PACKET_MAP_VOTE_INITIATE,
|
PACKET_MAP_VOTE_INITIATE,
|
||||||
PACKET_MAP_VOTE_CANCEL,
|
PACKET_MAP_VOTE_CANCEL,
|
||||||
|
|
||||||
PACKET_PLAYER_READY,
|
|
||||||
PACKET_QUIT = 255
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NetDisconnect_t
|
enum NetDisconnect_t
|
||||||
|
|
|
@ -89,7 +89,7 @@ extern void P_ResetWeapons(int32_t snum);
|
||||||
extern void P_ResetInventory(int32_t snum);
|
extern void P_ResetInventory(int32_t snum);
|
||||||
extern void G_NewGame(int32_t vn,int32_t ln,int32_t sk);
|
extern void G_NewGame(int32_t vn,int32_t ln,int32_t sk);
|
||||||
extern void G_ResetTimers(void);
|
extern void G_ResetTimers(void);
|
||||||
extern void Net_WaitForEverybody(void);
|
extern void Net_WaitForServer(void);
|
||||||
extern void clearfifo(void);
|
extern void clearfifo(void);
|
||||||
extern void Net_ResetPrediction(void);
|
extern void Net_ResetPrediction(void);
|
||||||
extern int32_t G_EnterLevel(int32_t g);
|
extern int32_t G_EnterLevel(int32_t g);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -238,7 +238,7 @@ int32_t A_FurthestVisiblePoint(int32_t iActor,spritetype *ts,int32_t *dax,int32_
|
||||||
spritetype *s = &sprite[iActor];
|
spritetype *s = &sprite[iActor];
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
|
|
||||||
if (ud.multimode < 2 && ud.player_skill < 3)
|
if ((!net_server && ud.multimode < 2) && ud.player_skill < 3)
|
||||||
angincs = 2048/2;
|
angincs = 2048/2;
|
||||||
else angincs = 2048/(1+(krand()&1));
|
else angincs = 2048/(1+(krand()&1));
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ static void X_Move(void)
|
||||||
}
|
}
|
||||||
else if (vm.g_sp->picnum != DRONE && vm.g_sp->picnum != SHARK && vm.g_sp->picnum != COMMANDER)
|
else if (vm.g_sp->picnum != DRONE && vm.g_sp->picnum != SHARK && vm.g_sp->picnum != COMMANDER)
|
||||||
{
|
{
|
||||||
if (ActorExtra[vm.g_i].bposz != vm.g_sp->z || (ud.multimode < 2 && ud.player_skill < 2))
|
if (ActorExtra[vm.g_i].bposz != vm.g_sp->z || ((!net_server && ud.multimode < 2) && ud.player_skill < 2))
|
||||||
{
|
{
|
||||||
if ((vm.g_t[0]&1) || g_player[vm.g_p].ps->actorsqu == vm.g_i) return;
|
if ((vm.g_t[0]&1) || g_player[vm.g_p].ps->actorsqu == vm.g_i) return;
|
||||||
else daxvel <<= 1;
|
else daxvel <<= 1;
|
||||||
|
@ -919,7 +919,7 @@ skip_check:
|
||||||
case CON_IFGOTWEAPONCE:
|
case CON_IFGOTWEAPONCE:
|
||||||
insptr++;
|
insptr++;
|
||||||
|
|
||||||
if ((GametypeFlags[ud.coop]&GAMETYPE_WEAPSTAY) && ud.multimode > 1)
|
if ((GametypeFlags[ud.coop]&GAMETYPE_WEAPSTAY) && (net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
if (*insptr == 0)
|
if (*insptr == 0)
|
||||||
{
|
{
|
||||||
|
@ -977,7 +977,7 @@ skip_check:
|
||||||
case CON_PKICK:
|
case CON_PKICK:
|
||||||
insptr++;
|
insptr++;
|
||||||
|
|
||||||
if (ud.multimode > 1 && vm.g_sp->picnum == APLAYER)
|
if ((net_server || ud.multimode > 1) && vm.g_sp->picnum == APLAYER)
|
||||||
{
|
{
|
||||||
if (g_player[otherp].ps->quick_kick == 0)
|
if (g_player[otherp].ps->quick_kick == 0)
|
||||||
g_player[otherp].ps->quick_kick = 14;
|
g_player[otherp].ps->quick_kick = 14;
|
||||||
|
@ -2280,7 +2280,7 @@ nullquote:
|
||||||
setview(x1,y1,x2,y2);
|
setview(x1,y1,x2,y2);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (!ud.pause_on && ((ud.show_help == 0 && ud.multimode < 2 && !(g_player[myconnectindex].ps->gm&MODE_MENU)) || ud.multimode > 1 || ud.recstat == 2))
|
if (!ud.pause_on && ((ud.show_help == 0 && (!net_server && ud.multimode < 2) && !(g_player[myconnectindex].ps->gm&MODE_MENU)) || (net_server || ud.multimode > 1) || ud.recstat == 2))
|
||||||
smoothratio = min(max((totalclock-ototalclock)*(65536L/TICSPERFRAME),0),65536);
|
smoothratio = min(max((totalclock-ototalclock)*(65536L/TICSPERFRAME),0),65536);
|
||||||
#endif
|
#endif
|
||||||
G_DoInterpolations(smoothratio);
|
G_DoInterpolations(smoothratio);
|
||||||
|
@ -2734,7 +2734,7 @@ nullquote:
|
||||||
g_screenCapture = 1;
|
g_screenCapture = 1;
|
||||||
G_DrawRooms(myconnectindex,65536);
|
G_DrawRooms(myconnectindex,65536);
|
||||||
g_screenCapture = 0;
|
g_screenCapture = 0;
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
G_SavePlayer(-1-(g_lastSaveSlot));
|
G_SavePlayer(-1-(g_lastSaveSlot));
|
||||||
else G_SavePlayer(g_lastSaveSlot);
|
else G_SavePlayer(g_lastSaveSlot);
|
||||||
|
|
||||||
|
@ -2757,7 +2757,7 @@ nullquote:
|
||||||
insptr++;
|
insptr++;
|
||||||
|
|
||||||
//AddLog("resetplayer");
|
//AddLog("resetplayer");
|
||||||
if (ud.multimode < 2)
|
if ((!net_server && ud.multimode < 2))
|
||||||
{
|
{
|
||||||
if (g_lastSaveSlot >= 0 && ud.recstat != 2)
|
if (g_lastSaveSlot >= 0 && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
|
@ -2938,7 +2938,7 @@ nullquote:
|
||||||
j = 1;
|
j = 1;
|
||||||
else if ((l&65536L))
|
else if ((l&65536L))
|
||||||
{
|
{
|
||||||
if (vm.g_sp->picnum == APLAYER && ud.multimode > 1)
|
if (vm.g_sp->picnum == APLAYER && (net_server || ud.multimode > 1))
|
||||||
j = G_GetAngleDelta(g_player[otherp].ps->ang,getangle(g_player[vm.g_p].ps->posx-g_player[otherp].ps->posx,g_player[vm.g_p].ps->posy-g_player[otherp].ps->posy));
|
j = G_GetAngleDelta(g_player[otherp].ps->ang,getangle(g_player[vm.g_p].ps->posx-g_player[otherp].ps->posx,g_player[vm.g_p].ps->posy-g_player[otherp].ps->posy));
|
||||||
else
|
else
|
||||||
j = G_GetAngleDelta(g_player[vm.g_p].ps->ang,getangle(vm.g_sp->x-g_player[vm.g_p].ps->posx,vm.g_sp->y-g_player[vm.g_p].ps->posy));
|
j = G_GetAngleDelta(g_player[vm.g_p].ps->ang,getangle(vm.g_sp->x-g_player[vm.g_p].ps->posx,vm.g_sp->y-g_player[vm.g_p].ps->posy));
|
||||||
|
@ -3030,7 +3030,7 @@ nullquote:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFMULTIPLAYER:
|
case CON_IFMULTIPLAYER:
|
||||||
X_DoConditional(ud.multimode > 1);
|
X_DoConditional((net_server || ud.multimode > 1));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_OPERATE:
|
case CON_OPERATE:
|
||||||
|
|
|
@ -626,7 +626,7 @@ void M_DisplayMenus(void)
|
||||||
x = M_Probe(186,124,0,1);
|
x = M_Probe(186,124,0,1);
|
||||||
if (x >= -1)
|
if (x >= -1)
|
||||||
{
|
{
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -1274,7 +1274,7 @@ void M_DisplayMenus(void)
|
||||||
KB_ClearKeyDown(sc_Escape);
|
KB_ClearKeyDown(sc_Escape);
|
||||||
|
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -1287,7 +1287,7 @@ void M_DisplayMenus(void)
|
||||||
KB_ClearKeysDown();
|
KB_ClearKeysDown();
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
G_LoadPlayer(-1-g_lastSaveSlot);
|
G_LoadPlayer(-1-g_lastSaveSlot);
|
||||||
g_player[myconnectindex].ps->gm = MODE_GAME;
|
g_player[myconnectindex].ps->gm = MODE_GAME;
|
||||||
|
@ -1442,13 +1442,13 @@ void M_DisplayMenus(void)
|
||||||
|
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
KB_ClearKeysDown();
|
KB_ClearKeysDown();
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_GAME)
|
if (g_player[myconnectindex].ps->gm&MODE_GAME)
|
||||||
{
|
{
|
||||||
|
@ -1493,7 +1493,7 @@ void M_DisplayMenus(void)
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_GAME)
|
if (g_player[myconnectindex].ps->gm&MODE_GAME)
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -1519,7 +1519,7 @@ void M_DisplayMenus(void)
|
||||||
{
|
{
|
||||||
KB_ClearKeyDown(sc_N);
|
KB_ClearKeyDown(sc_N);
|
||||||
KB_ClearKeyDown(sc_Escape);
|
KB_ClearKeyDown(sc_Escape);
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -1877,7 +1877,7 @@ cheat_for_port_credits:
|
||||||
x = M_Probe(c,67,16,6);
|
x = M_Probe(c,67,16,6);
|
||||||
if (x >= 0)
|
if (x >= 0)
|
||||||
{
|
{
|
||||||
if (ud.multimode > 1 && x == 0 && ud.recstat != 2)
|
if ((net_server || ud.multimode > 1) && x == 0 && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
last_zero = 0;
|
last_zero = 0;
|
||||||
ChangeToMenu(600);
|
ChangeToMenu(600);
|
||||||
|
@ -1916,7 +1916,7 @@ cheat_for_port_credits:
|
||||||
if (x == -1 && (g_player[myconnectindex].ps->gm&MODE_GAME || ud.recstat == 2))
|
if (x == -1 && (g_player[myconnectindex].ps->gm&MODE_GAME || ud.recstat == 2))
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -1957,7 +1957,7 @@ cheat_for_port_credits:
|
||||||
switch (x)
|
switch (x)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (ud.multimode < 2 || ud.recstat == 2)
|
if ((!net_server && ud.multimode < 2) || ud.recstat == 2)
|
||||||
ChangeToMenu(1500);
|
ChangeToMenu(1500);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1987,7 +1987,7 @@ cheat_for_port_credits:
|
||||||
ChangeToMenu(400);
|
ChangeToMenu(400);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (numplayers < 2)
|
if (numplayers < 2 && !net_server)
|
||||||
{
|
{
|
||||||
last_fifty = 5;
|
last_fifty = 5;
|
||||||
ChangeToMenu(501);
|
ChangeToMenu(501);
|
||||||
|
@ -1999,7 +1999,7 @@ cheat_for_port_credits:
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -2023,7 +2023,7 @@ cheat_for_port_credits:
|
||||||
{
|
{
|
||||||
menutext(c,67+16+16+16+16 ,MENUHIGHLIGHT(4),PHX(-6)," HELP");
|
menutext(c,67+16+16+16+16 ,MENUHIGHLIGHT(4),PHX(-6)," HELP");
|
||||||
}
|
}
|
||||||
if (numplayers > 1)
|
if (net_server || numplayers > 1)
|
||||||
menutext(c,67+16+16+16+16+16 ,MENUHIGHLIGHT(5),1,"QUIT TO TITLE");
|
menutext(c,67+16+16+16+16+16 ,MENUHIGHLIGHT(5),1,"QUIT TO TITLE");
|
||||||
else menutext(c,67+16+16+16+16+16 ,MENUHIGHLIGHT(5),PHX(-7),"QUIT TO TITLE");
|
else menutext(c,67+16+16+16+16+16 ,MENUHIGHLIGHT(5),PHX(-7),"QUIT TO TITLE");
|
||||||
menutext(c,67+16+16+16+16+16+16,MENUHIGHLIGHT(6),PHX(-8),"QUIT GAME");
|
menutext(c,67+16+16+16+16+16+16,MENUHIGHLIGHT(6),PHX(-8),"QUIT GAME");
|
||||||
|
@ -2266,7 +2266,7 @@ cheat_for_port_credits:
|
||||||
{
|
{
|
||||||
clearfilenames();
|
clearfilenames();
|
||||||
boardfilename[0] = 0;
|
boardfilename[0] = 0;
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
Net_SendUserMapName();
|
Net_SendUserMapName();
|
||||||
ChangeToMenu(600);
|
ChangeToMenu(600);
|
||||||
|
@ -2291,7 +2291,7 @@ cheat_for_port_credits:
|
||||||
strcat(boardfilename, findfileshigh->name);
|
strcat(boardfilename, findfileshigh->name);
|
||||||
ud.m_volume_number = 0;
|
ud.m_volume_number = 0;
|
||||||
ud.m_level_number = 7;
|
ud.m_level_number = 7;
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
Net_SendUserMapName();
|
Net_SendUserMapName();
|
||||||
ChangeToMenu(600);
|
ChangeToMenu(600);
|
||||||
|
@ -2578,7 +2578,7 @@ cheat_for_port_credits:
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_GAME && g_currentMenu == 232)
|
if (g_player[myconnectindex].ps->gm&MODE_GAME && g_currentMenu == 232)
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -3391,7 +3391,7 @@ cheat_for_port_credits:
|
||||||
menutext(c+168,50+62+16+16,MENUHIGHLIGHT(5),0,ud.detail?"OFF":"ON");
|
menutext(c+168,50+62+16+16,MENUHIGHLIGHT(5),0,ud.detail?"OFF":"ON");
|
||||||
modval(0,1,(int32_t *)&ud.detail,1,probey==5);
|
modval(0,1,(int32_t *)&ud.detail,1,probey==5);
|
||||||
menutext(c,50+62+16+16+16,MENUHIGHLIGHT(6),PHX(-6),"AMBIENT LIGHT");
|
menutext(c,50+62+16+16+16,MENUHIGHLIGHT(6),PHX(-6),"AMBIENT LIGHT");
|
||||||
_bar(0,c+185,50+62+16+16+16,&i,128,x==6,MENUHIGHLIGHT(6),numplayers>1,128,4096);
|
_bar(0,c+185,50+62+16+16+16,&i,128,x==6,MENUHIGHLIGHT(6),net_server || numplayers>1,128,4096);
|
||||||
Bsprintf(tempbuf,"%.2f",r_ambientlight);
|
Bsprintf(tempbuf,"%.2f",r_ambientlight);
|
||||||
mgametextpal(c+185+9,50+62+16+16+16+4, tempbuf, MENUHIGHLIGHT(6), 0);
|
mgametextpal(c+185+9,50+62+16+16+16+4, tempbuf, MENUHIGHLIGHT(6), 0);
|
||||||
|
|
||||||
|
@ -4431,7 +4431,7 @@ cheat_for_port_credits:
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_GAME && g_currentMenu == 701)
|
if (g_player[myconnectindex].ps->gm&MODE_GAME && g_currentMenu == 701)
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -4484,7 +4484,7 @@ cheat_for_port_credits:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (ud.config.MusicDevice >= 0 && (numplayers < 2 || ud.config.MusicToggle))
|
if (ud.config.MusicDevice >= 0 && ud.config.MusicToggle)
|
||||||
{
|
{
|
||||||
i = ud.config.MusicToggle;
|
i = ud.config.MusicToggle;
|
||||||
modval(0,1,(int32_t *)&ud.config.MusicToggle,1,probey==io);
|
modval(0,1,(int32_t *)&ud.config.MusicToggle,1,probey==io);
|
||||||
|
@ -4689,7 +4689,7 @@ cheat_for_port_credits:
|
||||||
{
|
{
|
||||||
// ReadSaveGameHeaders();
|
// ReadSaveGameHeaders();
|
||||||
g_player[myconnectindex].ps->gm = MODE_GAME;
|
g_player[myconnectindex].ps->gm = MODE_GAME;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -4706,13 +4706,13 @@ cheat_for_port_credits:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
G_SavePlayer(-1-(g_currentMenu-360));
|
G_SavePlayer(-1-(g_currentMenu-360));
|
||||||
else G_SavePlayer(g_currentMenu-360);
|
else G_SavePlayer(g_currentMenu-360);
|
||||||
g_lastSaveSlot = g_currentMenu-360;
|
g_lastSaveSlot = g_currentMenu-360;
|
||||||
g_player[myconnectindex].ps->gm = MODE_GAME;
|
g_player[myconnectindex].ps->gm = MODE_GAME;
|
||||||
|
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -4786,7 +4786,7 @@ cheat_for_port_credits:
|
||||||
else
|
else
|
||||||
g_player[myconnectindex].ps->gm = MODE_GAME;
|
g_player[myconnectindex].ps->gm = MODE_GAME;
|
||||||
|
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -4988,7 +4988,7 @@ VOLUME_ALL_40x:
|
||||||
else if (!(g_player[myconnectindex].ps->gm & MODE_GAME || ud.recstat == 2))
|
else if (!(g_player[myconnectindex].ps->gm & MODE_GAME || ud.recstat == 2))
|
||||||
ChangeToMenu(0);
|
ChangeToMenu(0);
|
||||||
else g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
else g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
@ -5016,7 +5016,7 @@ VOLUME_ALL_40x:
|
||||||
if (x == -1 || KB_KeyPressed(sc_N) || RMB)
|
if (x == -1 || KB_KeyPressed(sc_N) || RMB)
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
g_player[myconnectindex].ps->gm &= ~MODE_MENU;
|
||||||
if (ud.multimode < 2 && ud.recstat != 2)
|
if ((!net_server && ud.multimode < 2) && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
|
|
|
@ -3051,8 +3051,7 @@ void getinput(int32_t snum)
|
||||||
int32_t momx = 0,momy = 0;
|
int32_t momx = 0,momy = 0;
|
||||||
DukePlayer_t *p = g_player[snum].ps;
|
DukePlayer_t *p = g_player[snum].ps;
|
||||||
|
|
||||||
if ((p->gm&MODE_MENU) || (p->gm&MODE_TYPE) || (ud.pause_on && !KB_KeyPressed(sc_Pause)) || (numplayers > 1 && totalclock < 10))
|
if ((p->gm&MODE_MENU) || (p->gm&MODE_TYPE) || (ud.pause_on && !KB_KeyPressed(sc_Pause)))
|
||||||
// HACK: kill getinput() for the first 10 tics of a new map in multi
|
|
||||||
{
|
{
|
||||||
if (!(p->gm&MODE_MENU))
|
if (!(p->gm&MODE_MENU))
|
||||||
CONTROL_GetInput(&info[0]);
|
CONTROL_GetInput(&info[0]);
|
||||||
|
@ -3864,7 +3863,7 @@ void P_FragPlayer(int32_t snum)
|
||||||
|
|
||||||
if (s->pal != 1 && (s->cstat&32768) == 0) s->cstat = 0;
|
if (s->pal != 1 && (s->cstat&32768) == 0) s->cstat = 0;
|
||||||
|
|
||||||
if (ud.multimode > 1 && (s->pal != 1 || (s->cstat&32768)))
|
if ((net_server || ud.multimode > 1) && (s->pal != 1 || (s->cstat&32768)))
|
||||||
{
|
{
|
||||||
if (p->frag_ps != snum)
|
if (p->frag_ps != snum)
|
||||||
{
|
{
|
||||||
|
@ -4144,7 +4143,7 @@ void P_ProcessInput(int32_t snum)
|
||||||
|
|
||||||
if (s->extra <= 0)
|
if (s->extra <= 0)
|
||||||
{
|
{
|
||||||
if (ud.recstat == 1 && ud.multimode < 2)
|
if (ud.recstat == 1 && (!net_server && ud.multimode < 2))
|
||||||
G_CloseDemoWrite();
|
G_CloseDemoWrite();
|
||||||
|
|
||||||
if ((numplayers < 2 || net_server) && p->dead_flag == 0)
|
if ((numplayers < 2 || net_server) && p->dead_flag == 0)
|
||||||
|
|
|
@ -160,7 +160,7 @@ static void G_CacheSpriteNum(int32_t i)
|
||||||
break;
|
break;
|
||||||
case APLAYER__STATIC:
|
case APLAYER__STATIC:
|
||||||
maxc = 0;
|
maxc = 0;
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
maxc = 5;
|
maxc = 5;
|
||||||
for (j = 1420; j < 1420+106; j++) tloadtile(j,1);
|
for (j = 1420; j < 1420+106; j++) tloadtile(j,1);
|
||||||
|
@ -228,7 +228,7 @@ static void G_PrecacheSprites(void)
|
||||||
tloadtile(j,1);
|
tloadtile(j,1);
|
||||||
}
|
}
|
||||||
tloadtile(BOTTOMSTATUSBAR,1);
|
tloadtile(BOTTOMSTATUSBAR,1);
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
tloadtile(FRAGBAR,1);
|
tloadtile(FRAGBAR,1);
|
||||||
|
|
||||||
tloadtile(VIEWSCREEN,1);
|
tloadtile(VIEWSCREEN,1);
|
||||||
|
@ -559,7 +559,7 @@ void G_UpdateScreenArea(void)
|
||||||
|
|
||||||
y1 = ss;
|
y1 = ss;
|
||||||
y2 = 200;
|
y2 = 200;
|
||||||
if (ud.screen_size > 0 && (GametypeFlags[ud.coop]&GAMETYPE_FRAGBAR) && ud.multimode > 1)
|
if (ud.screen_size > 0 && (GametypeFlags[ud.coop]&GAMETYPE_FRAGBAR) && (net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
j = 0;
|
j = 0;
|
||||||
TRAVERSE_CONNECT(i)
|
TRAVERSE_CONNECT(i)
|
||||||
|
@ -594,7 +594,7 @@ void P_RandomSpawnPoint(int32_t snum)
|
||||||
int32_t i=snum,j,k;
|
int32_t i=snum,j,k;
|
||||||
uint32_t dist,pdist = -1;
|
uint32_t dist,pdist = -1;
|
||||||
|
|
||||||
if (ud.multimode > 1 && !(GametypeFlags[ud.coop] & GAMETYPE_FIXEDRESPAWN))
|
if ((net_server || ud.multimode > 1) && !(GametypeFlags[ud.coop] & GAMETYPE_FIXEDRESPAWN))
|
||||||
{
|
{
|
||||||
i = krand()%g_numPlayerSprites;
|
i = krand()%g_numPlayerSprites;
|
||||||
if (GametypeFlags[ud.coop] & GAMETYPE_TDMSPAWN)
|
if (GametypeFlags[ud.coop] & GAMETYPE_TDMSPAWN)
|
||||||
|
@ -740,7 +740,7 @@ void P_ResetStatus(int32_t snum)
|
||||||
p->rapid_fire_hold = 0;
|
p->rapid_fire_hold = 0;
|
||||||
p->toggle_key_flag = 0;
|
p->toggle_key_flag = 0;
|
||||||
p->access_spritenum = -1;
|
p->access_spritenum = -1;
|
||||||
if (ud.multimode > 1 && (GametypeFlags[ud.coop] & GAMETYPE_ACCESSATSTART))
|
if ((net_server || ud.multimode > 1) && (GametypeFlags[ud.coop] & GAMETYPE_ACCESSATSTART))
|
||||||
p->got_access = 7;
|
p->got_access = 7;
|
||||||
else p->got_access = 0;
|
else p->got_access = 0;
|
||||||
p->random_club_frame= 0;
|
p->random_club_frame= 0;
|
||||||
|
@ -885,7 +885,7 @@ static void resetprestat(int32_t snum,int32_t g)
|
||||||
g_numInterpolations = 0;
|
g_numInterpolations = 0;
|
||||||
startofdynamicinterpolations = 0;
|
startofdynamicinterpolations = 0;
|
||||||
|
|
||||||
if (((g&MODE_EOL) != MODE_EOL && numplayers < 2) || (!(GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && numplayers > 1))
|
if (((g&MODE_EOL) != MODE_EOL && numplayers < 2 && !net_server) || (!(GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && numplayers > 1))
|
||||||
{
|
{
|
||||||
P_ResetWeapons(snum);
|
P_ResetWeapons(snum);
|
||||||
P_ResetInventory(snum);
|
P_ResetInventory(snum);
|
||||||
|
@ -1295,10 +1295,10 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
||||||
|
|
||||||
ready2send = 0;
|
ready2send = 0;
|
||||||
|
|
||||||
if (ud.m_recstat != 2 && ud.last_level >= 0 && ud.multimode > 1 && (ud.coop&GAMETYPE_SCORESHEET))
|
if (ud.m_recstat != 2 && ud.last_level >= 0 && (net_server || ud.multimode > 1) && (ud.coop&GAMETYPE_SCORESHEET))
|
||||||
G_BonusScreen(1);
|
G_BonusScreen(1);
|
||||||
|
|
||||||
if (ln == 0 && vn == 3 && ud.multimode < 2 && ud.lockout == 0)
|
if (ln == 0 && vn == 3 && (!net_server && ud.multimode < 2) && ud.lockout == 0)
|
||||||
{
|
{
|
||||||
S_PlayMusic(&EnvMusicFilename[1][0],MAXVOLUMES*MAXLEVELS+1);
|
S_PlayMusic(&EnvMusicFilename[1][0],MAXVOLUMES*MAXLEVELS+1);
|
||||||
|
|
||||||
|
@ -1388,7 +1388,7 @@ static void resetpspritevars(char g)
|
||||||
aimmode[i] = g_player[i].ps->aim_mode;
|
aimmode[i] = g_player[i].ps->aim_mode;
|
||||||
autoaim[i] = g_player[i].ps->auto_aim;
|
autoaim[i] = g_player[i].ps->auto_aim;
|
||||||
weaponswitch[i] = g_player[i].ps->weaponswitch;
|
weaponswitch[i] = g_player[i].ps->weaponswitch;
|
||||||
if (ud.multimode > 1 && (GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
if ((net_server || ud.multimode > 1) && (GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
||||||
{
|
{
|
||||||
for (j=0; j<MAX_WEAPONS; j++)
|
for (j=0; j<MAX_WEAPONS; j++)
|
||||||
{
|
{
|
||||||
|
@ -1413,7 +1413,7 @@ static void resetpspritevars(char g)
|
||||||
g_player[i].ps->aim_mode = aimmode[i];
|
g_player[i].ps->aim_mode = aimmode[i];
|
||||||
g_player[i].ps->auto_aim = autoaim[i];
|
g_player[i].ps->auto_aim = autoaim[i];
|
||||||
g_player[i].ps->weaponswitch = weaponswitch[i];
|
g_player[i].ps->weaponswitch = weaponswitch[i];
|
||||||
if (ud.multimode > 1 && (GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
if ((net_server || ud.multimode > 1) && (GametypeFlags[ud.coop]&GAMETYPE_PRESERVEINVENTORYDEATH) && ud.last_level >= 0)
|
||||||
{
|
{
|
||||||
for (j=0; j<MAX_WEAPONS; j++)
|
for (j=0; j<MAX_WEAPONS; j++)
|
||||||
{
|
{
|
||||||
|
@ -1476,7 +1476,7 @@ static void resetpspritevars(char g)
|
||||||
|
|
||||||
s->yvel = j;
|
s->yvel = j;
|
||||||
|
|
||||||
if (!g_player[j].pcolor && ud.multimode > 1 && !(GametypeFlags[ud.coop] & GAMETYPE_TDM))
|
if (!g_player[j].pcolor && (net_server || ud.multimode > 1) && !(GametypeFlags[ud.coop] & GAMETYPE_TDM))
|
||||||
{
|
{
|
||||||
if (s->pal == 0)
|
if (s->pal == 0)
|
||||||
{
|
{
|
||||||
|
@ -1553,13 +1553,13 @@ void G_ResetTimers(void)
|
||||||
g_moveThingsCount = 0;
|
g_moveThingsCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Net_WaitForEverybody(void)
|
void Net_WaitForServer(void)
|
||||||
{
|
{
|
||||||
int32_t server_ready = g_player[0].playerreadyflag;
|
int32_t server_ready = g_player[0].playerreadyflag;
|
||||||
|
|
||||||
if (numplayers < 2 || net_server) return;
|
if (numplayers < 2 || net_server) return;
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if ((net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, titlepal, 11);
|
P_SetGamePalette(g_player[myconnectindex].ps, titlepal, 11);
|
||||||
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
|
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
|
||||||
|
@ -1961,7 +1961,7 @@ int32_t G_EnterLevel(int32_t g)
|
||||||
|
|
||||||
if (!premap_quickenterlevel)
|
if (!premap_quickenterlevel)
|
||||||
{
|
{
|
||||||
Net_WaitForEverybody();
|
Net_WaitForServer();
|
||||||
// mmulti_flushpackets();
|
// mmulti_flushpackets();
|
||||||
|
|
||||||
G_FadePalette(0,0,0,0);
|
G_FadePalette(0,0,0,0);
|
||||||
|
|
|
@ -201,7 +201,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
||||||
nextpage();
|
nextpage();
|
||||||
}
|
}
|
||||||
|
|
||||||
Net_WaitForEverybody();
|
Net_WaitForServer();
|
||||||
|
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
S_ClearSoundLocks();
|
S_ClearSoundLocks();
|
||||||
|
@ -584,7 +584,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
||||||
|
|
||||||
mmulti_flushpackets();
|
mmulti_flushpackets();
|
||||||
clearfifo();
|
clearfifo();
|
||||||
Net_WaitForEverybody();
|
Net_WaitForServer();
|
||||||
|
|
||||||
G_ResetTimers();
|
G_ResetTimers();
|
||||||
|
|
||||||
|
@ -635,7 +635,7 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Net_WaitForEverybody();
|
Net_WaitForServer();
|
||||||
|
|
||||||
if (multiflag == 2 && multiwho != myconnectindex)
|
if (multiflag == 2 && multiwho != myconnectindex)
|
||||||
{
|
{
|
||||||
|
@ -909,7 +909,7 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
|
|
||||||
fclose(fil);
|
fclose(fil);
|
||||||
|
|
||||||
if (ud.multimode < 2)
|
if ((!net_server && ud.multimode < 2))
|
||||||
{
|
{
|
||||||
strcpy(ScriptQuotes[122],"GAME SAVED");
|
strcpy(ScriptQuotes[122],"GAME SAVED");
|
||||||
P_DoQuote(122,g_player[myconnectindex].ps);
|
P_DoQuote(122,g_player[myconnectindex].ps);
|
||||||
|
@ -917,7 +917,7 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
|
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
|
|
||||||
Net_WaitForEverybody();
|
Net_WaitForServer();
|
||||||
|
|
||||||
ototalclock = totalclock;
|
ototalclock = totalclock;
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ int32_t dist(spritetype *s1,spritetype *s2)
|
||||||
|
|
||||||
int32_t __fastcall A_FindPlayer(spritetype *s, int32_t *d)
|
int32_t __fastcall A_FindPlayer(spritetype *s, int32_t *d)
|
||||||
{
|
{
|
||||||
if (ud.multimode < 2)
|
if ((!net_server && ud.multimode < 2))
|
||||||
{
|
{
|
||||||
*d = klabs(g_player[myconnectindex].ps->oposx-s->x) + klabs(g_player[myconnectindex].ps->oposy-s->y) + ((klabs(g_player[myconnectindex].ps->oposz-s->z+(28<<8)))>>4);
|
*d = klabs(g_player[myconnectindex].ps->oposx-s->x) + klabs(g_player[myconnectindex].ps->oposy-s->y) + ((klabs(g_player[myconnectindex].ps->oposz-s->z+(28<<8)))>>4);
|
||||||
return myconnectindex;
|
return myconnectindex;
|
||||||
|
@ -3230,7 +3230,7 @@ void P_CheckSectors(int32_t snum)
|
||||||
if (j >= 0 && wall[j].overpicnum == 0)
|
if (j >= 0 && wall[j].overpicnum == 0)
|
||||||
if (ActorExtra[neartagsprite].temp_data[0] == 0)
|
if (ActorExtra[neartagsprite].temp_data[0] == 0)
|
||||||
{
|
{
|
||||||
if (ud.noexits && ud.multimode > 1)
|
if (ud.noexits && (net_server || ud.multimode > 1))
|
||||||
{
|
{
|
||||||
// NUKEBUTTON frags the player
|
// NUKEBUTTON frags the player
|
||||||
ActorExtra[p->i].picnum = NUKEBUTTON;
|
ActorExtra[p->i].picnum = NUKEBUTTON;
|
||||||
|
|
|
@ -453,7 +453,7 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
||||||
|
|
||||||
if (g_sounds[num].m&4)
|
if (g_sounds[num].m&4)
|
||||||
{
|
{
|
||||||
if (ud.multimode > 1 && PN == APLAYER && sprite[i].yvel != screenpeek) // other player sound
|
if ((net_server || ud.multimode > 1) && PN == APLAYER && sprite[i].yvel != screenpeek) // other player sound
|
||||||
{
|
{
|
||||||
if (!(ud.config.VoiceToggle&4))
|
if (!(ud.config.VoiceToggle&4))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue