- Fixed: V_BreakLines() failed to produce output for the final line if it was
only one character long. - Fixed: When players respawned in multiplayer, scripts that started on their old body kept executing on that body instead of being transferred to the new one. I'm doing this with general pointer substitution now, so everything that pointed to the old body will use the new one; not sure if that's best, or if it should applied exclusively to scripts, though. - Fixed: Hexen's delay ACS command actually waited one extra tic. Now if you're playing Hexen and an old-style ACS script delays it will wait one extra tic in ZDoom as well. - Fixed: When G_FinishTravel() created a temporary player, P_SpawnPlayer() thought the old player actor was a voodoo doll and stopped its scripts and moved its inventory. SVN r347 (trunk)
This commit is contained in:
parent
b85806901d
commit
65bb04b7e8
6 changed files with 27 additions and 10 deletions
|
|
@ -3367,7 +3367,7 @@ void AActor::AdjustFloorClip ()
|
|||
EXTERN_CVAR (Bool, chasedemo)
|
||||
extern bool demonew;
|
||||
|
||||
void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
||||
void P_SpawnPlayer (mapthing2_t *mthing, bool tempplayer)
|
||||
{
|
||||
int playernum;
|
||||
player_t *p;
|
||||
|
|
@ -3436,7 +3436,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
|||
{
|
||||
G_PlayerReborn (playernum);
|
||||
}
|
||||
else if (oldactor != NULL && oldactor->player == p)
|
||||
else if (oldactor != NULL && oldactor->player == p && !tempplayer)
|
||||
{
|
||||
// Move the voodoo doll's inventory to the new player.
|
||||
mobj->ObtainInventory (oldactor);
|
||||
|
|
@ -3495,7 +3495,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
|||
p->cheats = CF_CHASECAM;
|
||||
|
||||
// setup gun psprite
|
||||
if (startenterscripts)
|
||||
if (!tempplayer)
|
||||
{
|
||||
// This can also start a script so don't do it for
|
||||
// the dummy player.
|
||||
|
|
@ -3538,7 +3538,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
|||
P_PlayerStartStomp (mobj);
|
||||
|
||||
// [BC] Do script stuff
|
||||
if (startenterscripts)
|
||||
if (!tempplayer)
|
||||
{
|
||||
if (state == PST_ENTER || (state == PST_LIVE && !savegamerestore))
|
||||
{
|
||||
|
|
@ -3546,6 +3546,8 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
|||
}
|
||||
else if (state == PST_REBORN)
|
||||
{
|
||||
assert (oldactor != NULL);
|
||||
DObject::PointerSubstitution (oldactor, p->mo);
|
||||
FBehavior::StaticStartTypedScripts (SCRIPT_Respawn, p->mo, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue