- 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:
Randy Heit 2006-10-03 03:14:28 +00:00
parent b85806901d
commit 65bb04b7e8
6 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,18 @@
October 2, 2006
- 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.
September 30, 2006
- Fixed: player_t::GetSpawnClass() always returned the spawn flags for the
local player, so co-op games would spawn only the things relevant for the

View file

@ -2102,7 +2102,7 @@ void G_FinishTravel ()
// The player being spawned here is a short lived dummy and
// must not start any ENTER script or big problems will happen.
P_SpawnPlayer (&playerstarts[pawn->player - players], false);
P_SpawnPlayer (&playerstarts[pawn->player - players], true);
pawndup = pawn->player->mo;
if (!startkeepfacing)

View file

@ -3389,7 +3389,7 @@ int DLevelScript::RunScript ()
break;
case PCD_DELAY:
statedata = STACK(1);
statedata = STACK(1) + (fmt == ACS_Old && gameinfo.gametype == GAME_Hexen);
if (statedata > 0)
{
state = SCRIPT_Delayed;
@ -3398,7 +3398,7 @@ int DLevelScript::RunScript ()
break;
case PCD_DELAYDIRECT:
statedata = NEXTWORD;
statedata = NEXTWORD + (fmt == ACS_Old && gameinfo.gametype == GAME_Hexen);
if (statedata > 0)
{
state = SCRIPT_Delayed;
@ -3406,7 +3406,7 @@ int DLevelScript::RunScript ()
break;
case PCD_DELAYDIRECTB:
statedata = *(BYTE *)pc;
statedata = *(BYTE *)pc + (fmt == ACS_Old && gameinfo.gametype == GAME_Hexen);
if (statedata > 0)
{
state = SCRIPT_Delayed;

View file

@ -90,7 +90,7 @@ void P_UnPredictPlayer ();
extern fixed_t FloatBobOffsets[64];
extern AActor *MissileActor;
void P_SpawnPlayer (mapthing2_t* mthing, bool startenterscripts = true);
void P_SpawnPlayer (mapthing2_t* mthing, bool tempplayer=false);
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);

View file

@ -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);
}
}

View file

@ -406,7 +406,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string)
}
// String here is pointing one character after the '\0'
if (i < 128 && --string - start > 1)
if (i < 128 && --string - start >= 1)
{
const BYTE *s = start;