Merge http://github.com/ZDoom/gzdoom into gz2
This commit is contained in:
commit
b31c62568b
56 changed files with 691 additions and 450 deletions
|
|
@ -1606,10 +1606,20 @@ void FLevelLocals::DeathMatchSpawnPlayer (int playernum)
|
|||
if (selections < 1)
|
||||
I_Error ("No deathmatch starts");
|
||||
|
||||
bool hasSpawned = false;
|
||||
for (int i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (PlayerInGame(i) && Players[i]->mo != nullptr && Players[i]->health > 0)
|
||||
{
|
||||
hasSpawned = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// At level start, none of the players have mobjs attached to them,
|
||||
// so we always use the random deathmatch spawn. During the game,
|
||||
// though, we use whatever dmflags specifies.
|
||||
if ((dmflags & DF_SPAWN_FARTHEST) && players[playernum].mo)
|
||||
if ((dmflags & DF_SPAWN_FARTHEST) && hasSpawned)
|
||||
spot = SelectFarthestDeathmatchSpot (selections);
|
||||
else
|
||||
spot = SelectRandomDeathmatchSpot (playernum, selections);
|
||||
|
|
@ -2148,14 +2158,6 @@ void G_DoLoadGame ()
|
|||
|
||||
BackupSaveName = savename;
|
||||
|
||||
//Push any added models from A_ChangeModel
|
||||
for (auto& smf : savedModelFiles)
|
||||
{
|
||||
FString modelFilePath = smf.Left(smf.LastIndexOf("/")+1);
|
||||
FString modelFileName = smf.Right(smf.Len() - smf.Left(smf.LastIndexOf("/") + 1).Len());
|
||||
FindModel(modelFilePath.GetChars(), modelFileName.GetChars());
|
||||
}
|
||||
|
||||
// At this point, the GC threshold is likely a lot higher than the
|
||||
// amount of memory in use, so bring it down now by starting a
|
||||
// collection.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue