mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- removed the intermediate P_SpawnPlayer inline
This commit is contained in:
parent
66695ac6a0
commit
41e576bbb5
6 changed files with 8 additions and 14 deletions
|
@ -1503,7 +1503,7 @@ void FLevelLocals::DeathMatchSpawnPlayer (int playernum)
|
|||
}
|
||||
}
|
||||
}
|
||||
AActor *mo = P_SpawnPlayer(spot, playernum);
|
||||
AActor *mo = SpawnPlayer(spot, playernum);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo);
|
||||
}
|
||||
|
||||
|
@ -1649,13 +1649,13 @@ void FLevelLocals::DoReborn (int playernum, bool freshbot)
|
|||
playerstarts[playernum].type != 0 &&
|
||||
CheckSpot (playernum, &playerstarts[playernum]))
|
||||
{
|
||||
AActor *mo = P_SpawnPlayer(&playerstarts[playernum], playernum);
|
||||
AActor *mo = SpawnPlayer(&playerstarts[playernum], playernum);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo, true);
|
||||
}
|
||||
else
|
||||
{ // try to spawn at any random player's spot
|
||||
FPlayerStart *start = PickPlayerStart(playernum, PPS_FORCERANDOM);
|
||||
AActor *mo = P_SpawnPlayer(start, playernum);
|
||||
AActor *mo = SpawnPlayer(start, playernum);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1379,7 +1379,7 @@ int G_FinishTravel ()
|
|||
|
||||
// The player being spawned here is a short lived dummy and
|
||||
// must not start any ENTER script or big problems will happen.
|
||||
pawndup = P_SpawnPlayer(start, pnum, SPF_TEMPPLAYER);
|
||||
pawndup = level.SpawnPlayer(start, pnum, SPF_TEMPPLAYER);
|
||||
if (pawndup != NULL)
|
||||
{
|
||||
if (!(changeflags & CHANGELEVEL_KEEPFACING))
|
||||
|
|
|
@ -207,7 +207,7 @@ public:
|
|||
int Massacre(bool baddies = false, FName cls = NAME_None);
|
||||
AActor *SpawnMapThing(FMapThing *mthing, int position);
|
||||
AActor *SpawnMapThing(int index, FMapThing *mt, int position);
|
||||
AActor *SpawnPlayer(FPlayerStart *mthing, int playernum, int flags);
|
||||
AActor *SpawnPlayer(FPlayerStart *mthing, int playernum, int flags = 0);
|
||||
void StartLightning();
|
||||
void ForceLightning(int mode);
|
||||
void ClearDynamic3DFloorData();
|
||||
|
@ -641,12 +641,6 @@ inline bool line_t::hitSkyWall(AActor* mo) const
|
|||
mo->Z() >= backsector->ceilingplane.ZatPoint(mo->PosRelative(this));
|
||||
}
|
||||
|
||||
// Work for later.
|
||||
inline AActor *P_SpawnPlayer(FPlayerStart *mthing, int playernum, int flags = 0)
|
||||
{
|
||||
return level.SpawnPlayer(mthing, playernum, flags);
|
||||
}
|
||||
|
||||
// This must later be extended to return an array with all levels.
|
||||
// It is meant for code that needs to iterate over all levels to make some global changes, e.g. configuation CCMDs.
|
||||
inline TArrayView<FLevelLocals *> AllLevels()
|
||||
|
|
|
@ -5338,7 +5338,7 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position)
|
|||
}
|
||||
if (!deathmatch && !(flags2 & LEVEL2_RANDOMPLAYERSTARTS))
|
||||
{
|
||||
return P_SpawnPlayer(&start, pnum, (flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
return SpawnPlayer(&start, pnum, (flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -889,7 +889,7 @@ void FLevelLocals::SpawnExtraPlayers()
|
|||
if (playeringame[i] && players[i].mo == NULL)
|
||||
{
|
||||
players[i].playerstate = PST_ENTER;
|
||||
P_SpawnPlayer(&playerstarts[i], i, (flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
SpawnPlayer(&playerstarts[i], i, (flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -458,7 +458,7 @@ void P_SetupLevel(FLevelLocals *Level, int position, bool newGame)
|
|||
{
|
||||
players[i].mo = nullptr;
|
||||
FPlayerStart *mthing = Level->PickPlayerStart(i);
|
||||
P_SpawnPlayer(mthing, i, (Level->flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
Level->SpawnPlayer(mthing, i, (Level->flags2 & LEVEL2_PRERAISEWEAPON) ? SPF_WEAPONFULLYUP : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue