- Fixed: The global WeaponSection string was never freed. It has been replaced

with an FString now.
- Fixed: The music strings in the default level info were never freed and
  caused memory leaks when used repeatedly.
- Fixed: The intermusic string in the level info was never freed.
- Fixed: The default fire obituary should only be printed if the damage
  came from the environment. If it comes from a monster the monster specific
  obituary should be used instead.
- Added custom damage types from the floating point test release.
- Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage 
  type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also 
  be used by other actors so a more generalized approach is needed than hard
  coding it into the Pain Elemental.
- Converted a few of Doom's monsters to DECORATE because I couldn't test the
  first version of the custom state code with the corpses inheriting from them.
- Added custom states from last year's floating point test release and fixed
  some bugs I found in that code. Unfortunately it wasn't all salvageable
  and it was easier to recreate some parts from scratch.



SVN r368 (trunk)
This commit is contained in:
Christoph Oelckers 2006-10-31 14:53:21 +00:00
commit 063c85b157
118 changed files with 2103 additions and 1818 deletions

View file

@ -345,6 +345,7 @@ static void ParseDecorate (void (*process)(FState *, int))
info = type->ActorInfo;
info->GameFilter = 0x80;
Decorations.Push (info);
ClearStateLabels();
SC_MustGetString ();
while (!SC_Compare ("{"))
@ -482,7 +483,7 @@ static void ParseDecorate (void (*process)(FState *, int))
if (extra.DeathHeight == 0) extra.DeathHeight = ((AActor*)(type->Defaults))->height;
info->Class->Meta.SetMetaFixed (AMETA_DeathHeight, extra.DeathHeight);
}
((AActor *)(type->Defaults))->DeathState = &info->OwnedStates[extra.DeathStart];
AddState("Death", &info->OwnedStates[extra.DeathStart]);
}
// Burn states are the same as death states, except they can optionally terminate
@ -521,7 +522,7 @@ static void ParseDecorate (void (*process)(FState *, int))
if (extra.BurnHeight == 0) extra.BurnHeight = ((AActor*)(type->Defaults))->height;
type->Meta.SetMetaFixed (AMETA_BurnHeight, extra.BurnHeight);
((AActor *)(type->Defaults))->BDeathState = &info->OwnedStates[extra.FireDeathStart];
AddState("Burn", &info->OwnedStates[extra.FireDeathStart]);
}
// Ice states are similar to burn and death, except their final frame enters
@ -542,11 +543,11 @@ static void ParseDecorate (void (*process)(FState *, int))
info->OwnedStates[i].Tics = 2;
info->OwnedStates[i].Misc1 = 0;
info->OwnedStates[i].Action = A_FreezeDeathChunks;
((AActor *)(type->Defaults))->IDeathState = &info->OwnedStates[extra.IceDeathStart];
AddState("Ice", &info->OwnedStates[extra.IceDeathStart]);
}
else if (extra.bGenericIceDeath)
{
((AActor *)(type->Defaults))->IDeathState = &AActor::States[AActor::S_GENERICFREEZEDEATH];
AddState("Ice", &AActor::States[AActor::S_GENERICFREEZEDEATH]);
}
}
if (def == DEF_BreakableDecoration)
@ -557,7 +558,8 @@ static void ParseDecorate (void (*process)(FState *, int))
{
((AActor *)(type->Defaults))->flags |= MF_DROPOFF|MF_MISSILE;
}
((AActor *)(type->Defaults))->SpawnState = &info->OwnedStates[extra.SpawnStart];
AddState("Spawn", &info->OwnedStates[extra.SpawnStart]);
InstallStates(info, ((AActor *)(type->Defaults)));
process (info->OwnedStates, info->NumOwnedStates);
}
}
@ -728,15 +730,15 @@ static void ParseInsideDecoration (FActorInfo *info, AActor *defaults,
SC_MustGetString ();
if (SC_Compare ("Normal"))
{
defaults->DamageType = 0;
defaults->DamageType = NAME_None;
}
else if (SC_Compare ("Ice"))
{
defaults->DamageType = MOD_ICE;
defaults->DamageType = NAME_Ice;
}
else if (SC_Compare ("Fire"))
{
defaults->DamageType = MOD_FIRE;
defaults->DamageType = NAME_Fire;
}
else
{