- Fixed: EV_Teleport() did not set players to their idle state, so if they

were running when the teleported, they would still be running afterward
  even though they weren't moving anywhere. Normally, P_XYMovement() does
  this when they stop due to friction.
- Fixed: AActor::TakeSpecialDamage() completely bypassed the standard rules
  for target switching on actors with MF5_NODAMAGE set.
- Changed the return values of the ACS spawn, spawnspot, and spawnspotfacing
  commands to be the total count of things spawned, rather than a pretty
  much useless reference to the actor spawned at the last map spot.
- Fixed: DLevelScript::DoSpawn() takes a byte angle, but DoSpawnSpotFacing()
  passed it a full-length angle.
- Fixed: When MF_SKULLFLY is removed because an actor slams into something,
  it was set to a see or spawn state, resetting its tic count and bypassing
  the effectiveness of the MF2_DORMANT flag. While I was at it, I decided
  dormant skulls shouldn't do slamming damage, either.
- Fixed: P_Thing_Spawn() returned success only if all thing instances were
  successfully spawned. As long as at least one thing was spawned, it should
  be considered a success.
- Fixed: Flipped single rotation sprites were only flipped every other 22.5
  degree interval.


SVN r484 (trunk)
This commit is contained in:
Randy Heit 2007-02-14 22:47:01 +00:00
parent 58d4c4f9ae
commit 01cd91fd9e
6 changed files with 58 additions and 19 deletions

View file

@ -1,4 +1,24 @@
February 14, 2007
- Fixed: EV_Teleport() did not set players to their idle state, so if they
were running when the teleported, they would still be running afterward
even though they weren't moving anywhere. Normally, P_XYMovement() does
this when they stop due to friction.
- Fixed: AActor::TakeSpecialDamage() completely bypassed the standard rules
for target switching on actors with MF5_NODAMAGE set.
- Changed the return values of the ACS spawn, spawnspot, and spawnspotfacing
commands to be the total count of things spawned, rather than a pretty
much useless reference to the actor spawned at the last map spot.
- Fixed: DLevelScript::DoSpawn() takes a byte angle, but DoSpawnSpotFacing()
passed it a full-length angle.
- Fixed: When MF_SKULLFLY is removed because an actor slams into something,
it was set to a see or spawn state, resetting its tic count and bypassing
the effectiveness of the MF2_DORMANT flag. While I was at it, I decided
dormant skulls shouldn't do slamming damage, either.
- Fixed: P_Thing_Spawn() returned success only if all thing instances were
successfully spawned. As long as at least one thing was spawned, it should
be considered a success.
- Fixed: Flipped single rotation sprites were only flipped every other 22.5
degree interval.
- Fixed: S_ClearSoundData() did not stop any channels before freeing the
samples, a problem for the alternate sound renderer if it happened to be
playing any sounds at the time, since it would try to keep on playing them.

View file

@ -1906,6 +1906,7 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i
{
const PClass *info = PClass::FindClass (FBehavior::StaticLookupString (type));
AActor *actor = NULL;
int spawncount = 0;
if (info != NULL)
{
@ -1922,6 +1923,7 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i
if (actor->flags & MF_SPECIAL)
actor->flags |= MF_DROPPED; // Don't respawn
actor->flags2 = oldFlags2;
spawncount++;
}
else
{
@ -1941,7 +1943,7 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i
}
}
}
return (int)(actor - (AActor *)0);
return spawncount;
}
int DLevelScript::DoSpawnSpot (int type, int spot, int tid, int angle)
@ -1952,7 +1954,7 @@ int DLevelScript::DoSpawnSpot (int type, int spot, int tid, int angle)
while ( (aspot = iterator.Next ()) )
{
spawned = DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, angle);
spawned += DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, angle);
}
return spawned;
}
@ -1965,7 +1967,7 @@ int DLevelScript::DoSpawnSpotFacing (int type, int spot, int tid)
while ( (aspot = iterator.Next ()) )
{
spawned = DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, aspot->angle);
spawned += DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, aspot->angle >> 24);
}
return spawned;
}

View file

@ -1402,9 +1402,16 @@ void P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
// the skull slammed into something
mo->flags &= ~MF_SKULLFLY;
mo->momx = mo->momy = mo->momz = 0;
if (!(mo->flags2 & MF2_DORMANT))
{
mo->SetState (mo->SeeState != NULL ? mo->SeeState : mo->SpawnState);
}
else
{
mo->SetState (mo->SpawnState);
mo->tics = -1;
}
}
return;
}
@ -2346,13 +2353,21 @@ void AActor::HitFloor ()
}
bool AActor::Slam (AActor *thing)
{
flags &= ~MF_SKULLFLY;
momx = momy = momz = 0;
if (!(flags2 & MF2_DORMANT))
{
int dam = GetMissileDamage (7, 1);
P_DamageMobj (thing, this, this, dam, NAME_Melee);
P_TraceBleed (dam, thing, this);
flags &= ~MF_SKULLFLY;
momx = momy = momz = 0;
SetState (SeeState != NULL ? SeeState : SpawnState);
}
else
{
SetState (SpawnState);
tics = -1;
}
return false; // stop moving
}
@ -4736,13 +4751,7 @@ int AActor::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FN
if (flags5 & MF5_NODAMAGE)
{
target = source;
if (pr_takedamage() < PainChance)
{
FState * painstate = FindState(NAME_Pain, damagetype);
if (painstate != NULL) SetState (painstate);
}
return -1;
return 0;
}
// If the actor does not have a corresponding death state, then it does not take damage.

View file

@ -477,6 +477,10 @@ bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool
thing->momx = FixedMul(momx, c) - FixedMul(momy, s);
thing->momy = FixedMul(momy, c) + FixedMul(momx, s);
}
if ((momx | momy) == 0 && thing->player != NULL)
{
thing->player->mo->PlayIdle ();
}
return true;
}
return false;

View file

@ -3,7 +3,7 @@
** ACS-accessible thing utilities
**
**---------------------------------------------------------------------------
** Copyright 1998-2006 Randy Heit
** Copyright 1998-2007 Randy Heit
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
@ -114,7 +114,6 @@ bool P_Thing_Spawn (int tid, AActor *source, int type, angle_t angle, bool fog,
level.total_items--;
}
mobj->Destroy ();
rtn = false;
}
}
spot = iterator.Next();

View file

@ -233,6 +233,11 @@ static void R_InstallSprite (int num)
{
sprtemp[frame].Texture[rot] = sprtemp[frame].Texture[0];
}
// If the frame is flipped, they all should be
if (sprtemp[frame].Flip & 1)
{
sprtemp[frame].Flip = 0xFFFF;
}
break;
case 1: