mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 18:50:33 +00:00
This commit is contained in:
commit
d91fe1572c
2 changed files with 20 additions and 4 deletions
|
@ -60,6 +60,7 @@ void DSectorEffect::Destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
DSectorEffect::DSectorEffect (sector_t *sector)
|
DSectorEffect::DSectorEffect (sector_t *sector)
|
||||||
|
: DThinker(STAT_SECTOREFFECT)
|
||||||
{
|
{
|
||||||
m_Sector = sector;
|
m_Sector = sector;
|
||||||
}
|
}
|
||||||
|
|
|
@ -539,7 +539,7 @@ void P_SerializeSounds(FSerializer &arc)
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void CopyPlayer(player_t *dst, player_t *src, const char *name);
|
void CopyPlayer(player_t *dst, player_t *src, const char *name);
|
||||||
static void ReadOnePlayer(FSerializer &arc);
|
static void ReadOnePlayer(FSerializer &arc, bool skipload);
|
||||||
static void ReadMultiplePlayers(FSerializer &arc, int numPlayers, int numPlayersNow, bool skipload);
|
static void ReadMultiplePlayers(FSerializer &arc, int numPlayers, int numPlayersNow, bool skipload);
|
||||||
static void SpawnExtraPlayers();
|
static void SpawnExtraPlayers();
|
||||||
|
|
||||||
|
@ -596,7 +596,7 @@ void P_SerializePlayers(FSerializer &arc, bool skipload)
|
||||||
// first player present, no matter what their name.
|
// first player present, no matter what their name.
|
||||||
if (numPlayers == 1)
|
if (numPlayers == 1)
|
||||||
{
|
{
|
||||||
ReadOnePlayer(arc);
|
ReadOnePlayer(arc, skipload);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -619,7 +619,7 @@ void P_SerializePlayers(FSerializer &arc, bool skipload)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static void ReadOnePlayer(FSerializer &arc)
|
static void ReadOnePlayer(FSerializer &arc, bool skipload)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
|
@ -638,7 +638,15 @@ static void ReadOnePlayer(FSerializer &arc)
|
||||||
didIt = true;
|
didIt = true;
|
||||||
player_t playerTemp;
|
player_t playerTemp;
|
||||||
playerTemp.Serialize(arc);
|
playerTemp.Serialize(arc);
|
||||||
CopyPlayer(&players[i], &playerTemp, name);
|
if (!skipload)
|
||||||
|
{
|
||||||
|
CopyPlayer(&players[i], &playerTemp, name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// we need the player actor, so that G_FinishTravel can destroy it later.
|
||||||
|
players[i].mo = playerTemp.mo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -752,6 +760,13 @@ static void ReadMultiplePlayers(FSerializer &arc, int numPlayers, int numPlayers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (i = 0; i < MAXPLAYERS; ++i)
|
||||||
|
{
|
||||||
|
players[i].mo = playertemp[i].mo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete[] tempPlayerUsed;
|
delete[] tempPlayerUsed;
|
||||||
delete[] playertemp;
|
delete[] playertemp;
|
||||||
|
|
Loading…
Reference in a new issue