- Fixed: When starting a level while the music has been paused S_Start has

to stop the old music so the new one always starts at the beginning.
- Fixed:: AActor::master was not serialized.
- Fixed: Sound targets pointing to dead players should be cleared before 
  respawning the player.
- Fixed: When the DONTMOVE flag is set A_Chase must not call P_NewChaseDir.
- Changed PowerupGiver initialization so that the actual powerup class is looked
  up during postprocessing.
- Gave Strife's instant death sector type its own damage type.


SVN r778 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-01 13:12:33 +00:00
parent 3b991c3070
commit 03617dc6f0
8 changed files with 77 additions and 19 deletions

View file

@ -1,3 +1,14 @@
March 1, 2008 (Changes by Graf Zahl)
- Fixed: When starting a level while the music has been paused S_Start has
to stop the old music so the new one always starts at the beginning.
- Fixed:: AActor::master was not serialized.
- Fixed: Sound targets pointing to dead players should be cleared before
respawning the player.
- Fixed: When the DONTMOVE flag is set A_Chase must not call P_NewChaseDir.
- Changed PowerupGiver initialization so that the actual powerup class is looked
up during postprocessing.
- Gave Strife's instant death sector type its own damage type.
February 29, 2008
- Fixed: R_SetupAddClampCol() checked add4cols' memory instead of
adclamp4cols' memory when deciding if it should skip modification.

View file

@ -185,6 +185,7 @@ xx(BFGSplash)
xx(DrainLife) // A weapon like the Sigil that drains your life away.
xx(Massacre) // For death by a cheater!
//(Melee) already defined above, so don't define it again
xx(InstantDeath) // Strife "instant death"
// Special death name for getting killed excessively. Could be used as
// a damage type if you wanted to force an extreme death.

View file

@ -1895,7 +1895,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
if (actor->flags & MF_JUSTATTACKED)
{
actor->flags &= ~MF_JUSTATTACKED;
if (!actor->isFast())
if (!actor->isFast() && !dontmove)
{
P_NewChaseDir (actor);
}

View file

@ -320,6 +320,9 @@ void AActor::Serialize (FArchive &arc)
<< gravity
<< FastChaseStrafeCount;
if (SaveVersion >=778)
arc << master;
if (arc.IsStoring ())
{
int convnum = 0;
@ -3645,6 +3648,23 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool tempplayer)
else if (state == PST_REBORN)
{
assert (oldactor != NULL);
// before relocating all pointers to the player all sound targets
// pointing to the old actor have to be NULLed. Otherwise all
// monsters who last targeted this player will wake up immediately
// after the player has respawned.
AActor *th;
TThinkerIterator<AActor> it;
while ((th = it.Next()))
{
if (th->LastHeard == oldactor) th->LastHeard = NULL;
}
for(int i = 0; i < numsectors; i++)
{
if (sectors[i].SoundTarget == oldactor) sectors[i].SoundTarget = NULL;
}
DObject::PointerSubstitution (oldactor, p->mo);
// PointerSubstitution() will also affect the bodyque, so undo that now.
for (int ii=0; ii < BODYQUESIZE; ++ii)

View file

@ -412,7 +412,7 @@ void P_PlayerInSpecialSector (player_t *player)
case Damage_InstantDeath:
// Strife's instant death sector
P_DamageMobj (player->mo, NULL, NULL, 999, NAME_None);
P_DamageMobj (player->mo, NULL, NULL, 999, NAME_InstantDeath);
break;
case dDamage_Hellslime:

View file

@ -443,9 +443,15 @@ void S_Start ()
LastLocalSndSeq = LocalSndSeq;
}
SoundPaused = false;
// stop the old music if it has been paused.
// This ensures that the new music is started from the beginning
// if it's the same as the last one and it has been paused.
if (MusicPaused) S_StopMusic(true);
// start new music for the level
MusicPaused = false;
SoundPaused = false;
// [RH] This is a lot simpler now.
if (!savegamerestore)

View file

@ -539,6 +539,41 @@ void FinishThingdef()
}
}
if (ti->IsDescendantOf(RUNTIME_CLASS(APowerupGiver)) && ti != RUNTIME_CLASS(APowerupGiver))
{
FString typestr;
APowerupGiver * defaults=(APowerupGiver *)ti->Defaults;
fuglyname v;
v = defaults->PowerupType;
if (v != NAME_None && v.IsValidName())
{
typestr.Format ("Power%s", v.GetChars());
const PClass * powertype=PClass::FindClass(typestr);
if (!powertype) powertype=PClass::FindClass(v.GetChars());
if (!powertype)
{
Printf("Unknown powerup type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
errorcount++;
}
else if (!powertype->IsDescendantOf(RUNTIME_CLASS(APowerup)))
{
Printf("Invalid powerup type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars());
errorcount++;
}
else
{
defaults->PowerupType=powertype;
}
}
else if (v == NAME_None)
{
Printf("No powerup type specified in '%s'\n", ti->TypeName.GetChars());
errorcount++;
}
}
// the typeinfo properties of weapons have to be fixed here after all actors have been declared
if (ti->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
{

View file

@ -2136,23 +2136,8 @@ static void PowerupMode (FScanner &sc, APowerupGiver *defaults, Baggage &bag)
//==========================================================================
static void PowerupType (FScanner &sc, APowerupGiver *defaults, Baggage &bag)
{
FString typestr;
sc.MustGetString();
typestr.Format ("Power%s", sc.String);
const PClass * powertype=PClass::FindClass(typestr);
if (!powertype)
{
sc.ScriptError("Unknown powerup type '%s' in '%s'\n", sc.String, bag.Info->Class->TypeName.GetChars());
}
else if (!powertype->IsDescendantOf(RUNTIME_CLASS(APowerup)))
{
sc.ScriptError("Invalid powerup type '%s' in '%s'\n", sc.String, bag.Info->Class->TypeName.GetChars());
}
else
{
defaults->PowerupType=powertype;
}
defaults->PowerupType = fuglyname(sc.String);
}
//==========================================================================