mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- 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
|
@ -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
|
September 30, 2006
|
||||||
- Fixed: player_t::GetSpawnClass() always returned the spawn flags for the
|
- 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
|
local player, so co-op games would spawn only the things relevant for the
|
||||||
|
|
|
@ -2102,7 +2102,7 @@ void G_FinishTravel ()
|
||||||
|
|
||||||
// The player being spawned here is a short lived dummy and
|
// The player being spawned here is a short lived dummy and
|
||||||
// must not start any ENTER script or big problems will happen.
|
// 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;
|
pawndup = pawn->player->mo;
|
||||||
if (!startkeepfacing)
|
if (!startkeepfacing)
|
||||||
|
|
|
@ -3389,7 +3389,7 @@ int DLevelScript::RunScript ()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_DELAY:
|
case PCD_DELAY:
|
||||||
statedata = STACK(1);
|
statedata = STACK(1) + (fmt == ACS_Old && gameinfo.gametype == GAME_Hexen);
|
||||||
if (statedata > 0)
|
if (statedata > 0)
|
||||||
{
|
{
|
||||||
state = SCRIPT_Delayed;
|
state = SCRIPT_Delayed;
|
||||||
|
@ -3398,7 +3398,7 @@ int DLevelScript::RunScript ()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_DELAYDIRECT:
|
case PCD_DELAYDIRECT:
|
||||||
statedata = NEXTWORD;
|
statedata = NEXTWORD + (fmt == ACS_Old && gameinfo.gametype == GAME_Hexen);
|
||||||
if (statedata > 0)
|
if (statedata > 0)
|
||||||
{
|
{
|
||||||
state = SCRIPT_Delayed;
|
state = SCRIPT_Delayed;
|
||||||
|
@ -3406,7 +3406,7 @@ int DLevelScript::RunScript ()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_DELAYDIRECTB:
|
case PCD_DELAYDIRECTB:
|
||||||
statedata = *(BYTE *)pc;
|
statedata = *(BYTE *)pc + (fmt == ACS_Old && gameinfo.gametype == GAME_Hexen);
|
||||||
if (statedata > 0)
|
if (statedata > 0)
|
||||||
{
|
{
|
||||||
state = SCRIPT_Delayed;
|
state = SCRIPT_Delayed;
|
||||||
|
|
|
@ -90,7 +90,7 @@ void P_UnPredictPlayer ();
|
||||||
extern fixed_t FloatBobOffsets[64];
|
extern fixed_t FloatBobOffsets[64];
|
||||||
extern AActor *MissileActor;
|
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);
|
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
||||||
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
||||||
|
|
|
@ -3367,7 +3367,7 @@ void AActor::AdjustFloorClip ()
|
||||||
EXTERN_CVAR (Bool, chasedemo)
|
EXTERN_CVAR (Bool, chasedemo)
|
||||||
extern bool demonew;
|
extern bool demonew;
|
||||||
|
|
||||||
void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
void P_SpawnPlayer (mapthing2_t *mthing, bool tempplayer)
|
||||||
{
|
{
|
||||||
int playernum;
|
int playernum;
|
||||||
player_t *p;
|
player_t *p;
|
||||||
|
@ -3436,7 +3436,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
||||||
{
|
{
|
||||||
G_PlayerReborn (playernum);
|
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.
|
// Move the voodoo doll's inventory to the new player.
|
||||||
mobj->ObtainInventory (oldactor);
|
mobj->ObtainInventory (oldactor);
|
||||||
|
@ -3495,7 +3495,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
||||||
p->cheats = CF_CHASECAM;
|
p->cheats = CF_CHASECAM;
|
||||||
|
|
||||||
// setup gun psprite
|
// setup gun psprite
|
||||||
if (startenterscripts)
|
if (!tempplayer)
|
||||||
{
|
{
|
||||||
// This can also start a script so don't do it for
|
// This can also start a script so don't do it for
|
||||||
// the dummy player.
|
// the dummy player.
|
||||||
|
@ -3538,7 +3538,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
||||||
P_PlayerStartStomp (mobj);
|
P_PlayerStartStomp (mobj);
|
||||||
|
|
||||||
// [BC] Do script stuff
|
// [BC] Do script stuff
|
||||||
if (startenterscripts)
|
if (!tempplayer)
|
||||||
{
|
{
|
||||||
if (state == PST_ENTER || (state == PST_LIVE && !savegamerestore))
|
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)
|
else if (state == PST_REBORN)
|
||||||
{
|
{
|
||||||
|
assert (oldactor != NULL);
|
||||||
|
DObject::PointerSubstitution (oldactor, p->mo);
|
||||||
FBehavior::StaticStartTypedScripts (SCRIPT_Respawn, p->mo, true);
|
FBehavior::StaticStartTypedScripts (SCRIPT_Respawn, p->mo, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,7 +406,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string)
|
||||||
}
|
}
|
||||||
|
|
||||||
// String here is pointing one character after the '\0'
|
// 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;
|
const BYTE *s = start;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue