mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
94611588d5
3 changed files with 12 additions and 7 deletions
|
@ -1557,7 +1557,7 @@ void G_DeathMatchSpawnPlayer (int playernum)
|
|||
if (spot == NULL)
|
||||
{ // We have a player 1 start, right?
|
||||
spot = &playerstarts[0];
|
||||
if (spot == NULL)
|
||||
if (spot->type == 0)
|
||||
{ // Fine, whatever.
|
||||
spot = &deathmatchstarts[0];
|
||||
}
|
||||
|
@ -1573,7 +1573,8 @@ void G_DeathMatchSpawnPlayer (int playernum)
|
|||
//
|
||||
FPlayerStart *G_PickPlayerStart(int playernum, int flags)
|
||||
{
|
||||
if ((level.flags2 & LEVEL2_RANDOMPLAYERSTARTS) || (flags & PPS_FORCERANDOM))
|
||||
if ((level.flags2 & LEVEL2_RANDOMPLAYERSTARTS) || (flags & PPS_FORCERANDOM) ||
|
||||
playerstarts[playernum].type == 0)
|
||||
{
|
||||
if (!(flags & PPS_NOBLOCKINGCHECK))
|
||||
{
|
||||
|
@ -1665,16 +1666,17 @@ void G_DoReborn (int playernum, bool freshbot)
|
|||
}
|
||||
|
||||
if (!(level.flags2 & LEVEL2_RANDOMPLAYERSTARTS) &&
|
||||
playerstarts[playernum].type != 0 &&
|
||||
G_CheckSpot (playernum, &playerstarts[playernum]))
|
||||
{
|
||||
AActor *mo = P_SpawnPlayer(&playerstarts[playernum], playernum);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo, true);
|
||||
}
|
||||
else
|
||||
{ // try to spawn at any random player's spot
|
||||
FPlayerStart *start = G_PickPlayerStart(playernum, PPS_FORCERANDOM);
|
||||
AActor *mo = P_SpawnPlayer(start, playernum);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo);
|
||||
if (mo != NULL) P_PlayerStartStomp(mo, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -485,7 +485,7 @@ inline bool P_TeleportMove(AActor* thing, const fixedvec3 &pos, bool telefrag, b
|
|||
{
|
||||
return P_TeleportMove(thing, pos.x, pos.y, pos.z, telefrag, modifyactor);
|
||||
}
|
||||
void P_PlayerStartStomp (AActor *actor); // [RH] Stomp on things for a newly spawned player
|
||||
void P_PlayerStartStomp (AActor *actor, bool mononly=false); // [RH] Stomp on things for a newly spawned player
|
||||
void P_SlideMove (AActor* mo, fixed_t tryx, fixed_t tryy, int numsteps);
|
||||
bool P_BounceWall (AActor *mo);
|
||||
bool P_BounceActor (AActor *mo, AActor *BlockingMobj, bool ontop);
|
||||
|
|
|
@ -504,7 +504,7 @@ bool P_TeleportMove(AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefra
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void P_PlayerStartStomp(AActor *actor)
|
||||
void P_PlayerStartStomp(AActor *actor, bool mononly)
|
||||
{
|
||||
AActor *th;
|
||||
FBlockThingsIterator it(FBoundingBox(actor->X(), actor->Y(), actor->radius));
|
||||
|
@ -525,6 +525,9 @@ void P_PlayerStartStomp(AActor *actor)
|
|||
if (th->player == NULL && !(th->flags3 & MF3_ISMONSTER))
|
||||
continue;
|
||||
|
||||
if (th->player != NULL && mononly)
|
||||
continue;
|
||||
|
||||
if (actor->Z() > th->Top())
|
||||
continue; // overhead
|
||||
if (actor->Top() < th->Z())
|
||||
|
|
Loading…
Reference in a new issue