Improved "respawn where died" functionality (#2831)
Now uses a "last safe position" system instead. This: -Prevents players from slipping into places they shouldn't via their dead body and then respawning there -No longer sends players back to spawn if they fall into kill pits -Adds a safety feature where the kill command always resets back to spawn should a player ever get stuck somewhere
This commit is contained in:
parent
9b62379645
commit
941f9502e9
6 changed files with 44 additions and 11 deletions
|
|
@ -5594,16 +5594,13 @@ AActor *FLevelLocals::SpawnPlayer (FPlayerStart *mthing, int playernum, int flag
|
|||
|
||||
PlayerSpawnPickClass(playernum);
|
||||
|
||||
if (( dmflags2 & DF2_SAME_SPAWN_SPOT ) &&
|
||||
( p->playerstate == PST_REBORN ) &&
|
||||
( deathmatch == false ) &&
|
||||
( gameaction != ga_worlddone ) &&
|
||||
( p->mo != NULL ) &&
|
||||
( !(p->mo->Sector->Flags & SECF_NORESPAWN) ) &&
|
||||
( NULL != p->attacker ) && // don't respawn on damaging floors
|
||||
( p->mo->Sector->damageamount < TELEFRAG_DAMAGE )) // this really should be a bit smarter...
|
||||
if ((dmflags2 & DF2_SAME_SPAWN_SPOT) && !deathmatch
|
||||
&& p->mo != nullptr && p->playerstate == PST_REBORN
|
||||
&& gameaction != ga_worlddone
|
||||
&& !(p->mo->Sector->Flags & SECF_NORESPAWN)
|
||||
&& p->LastDamageType != NAME_Suicide)
|
||||
{
|
||||
spawn = p->mo->Pos();
|
||||
spawn = p->LastSafePos;
|
||||
SpawnAngle = p->mo->Angles.Yaw;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue