mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'mpspecialfixes' into 'join-bug-fix'
MP Special Stage fixes (resolves #347). See merge request STJr/SRB2Internal!546
This commit is contained in:
commit
6c453ebf6e
4 changed files with 7 additions and 6 deletions
|
@ -2978,7 +2978,7 @@ void G_AddPlayer(INT32 playernum)
|
|||
if (G_GametypeUsesLives() || ((netgame || multiplayer) && gametype == GT_COOP))
|
||||
p->lives = cv_startinglives.value;
|
||||
|
||||
if (countplayers && !notexiting)
|
||||
if ((countplayers && !notexiting) || G_IsSpecialStage(gamemap))
|
||||
P_DoPlayerExit(p);
|
||||
}
|
||||
|
||||
|
|
|
@ -11294,7 +11294,7 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
mobj->radius = FixedMul(skins[p->skin].radius, mobj->scale);
|
||||
mobj->height = P_GetPlayerHeight(p);
|
||||
|
||||
if (!leveltime && ((maptol & TOL_NIGHTS) == TOL_NIGHTS) != (G_IsSpecialStage(gamemap))) // non-special NiGHTS stage or special non-NiGHTS stage
|
||||
if (!leveltime && !p->spectator && ((maptol & TOL_NIGHTS) == TOL_NIGHTS) != (G_IsSpecialStage(gamemap))) // non-special NiGHTS stage or special non-NiGHTS stage
|
||||
{
|
||||
if (maptol & TOL_NIGHTS)
|
||||
{
|
||||
|
|
|
@ -476,7 +476,7 @@ static inline void P_DoSpecialStageStuff(void)
|
|||
// Count up the rings of all the players and see if
|
||||
// they've collected the required amount.
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i])
|
||||
if (playeringame[i] && players[i].nightstime)
|
||||
{
|
||||
tic_t oldnightstime = players[i].nightstime;
|
||||
countspheres += players[i].spheres;
|
||||
|
@ -506,12 +506,11 @@ static inline void P_DoSpecialStageStuff(void)
|
|||
{
|
||||
// Halt all the players
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i])
|
||||
if (playeringame[i] && !players[i].exiting)
|
||||
{
|
||||
players[i].mo->momx = players[i].mo->momy = 0;
|
||||
players[i].exiting = (14*TICRATE)/5 + 1;
|
||||
}
|
||||
|
||||
sstimer = 0;
|
||||
P_GiveEmerald(true);
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
|
|
|
@ -343,13 +343,15 @@ void P_GiveEmerald(boolean spawnObj)
|
|||
continue;
|
||||
|
||||
emmo = P_SpawnMobjFromMobj(players[i].mo, 0, 0, players[i].mo->height, MT_GOTEMERALD);
|
||||
if (!emmo)
|
||||
continue;
|
||||
P_SetTarget(&emmo->target, players[i].mo);
|
||||
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
||||
P_SetTarget(&players[i].mo->tracer, emmo);
|
||||
|
||||
if (pnum == 255)
|
||||
{
|
||||
i = pnum;
|
||||
pnum = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue