- 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:
parent
3b2c2efcb1
commit
063c85b157
118 changed files with 2103 additions and 1818 deletions
|
|
@ -63,6 +63,29 @@
|
|||
|
||||
static FRandom pr_glass ("GlassBreak");
|
||||
|
||||
FName MODtoDamageType (int mod)
|
||||
{
|
||||
switch (mod)
|
||||
{
|
||||
default: return NAME_None; break;
|
||||
case 9: return NAME_BFGSplash; break;
|
||||
case 12: return NAME_Water; break;
|
||||
case 13: return NAME_Slime; break;
|
||||
case 14: return NAME_Fire; break;
|
||||
case 15: return NAME_Crush; break;
|
||||
case 16: return NAME_Telefrag; break;
|
||||
case 17: return NAME_Falling; break;
|
||||
case 18: return NAME_Suicide; break;
|
||||
case 20: return NAME_Exit; break;
|
||||
case 22: return NAME_Melee; break;
|
||||
case 23: return NAME_Railgun; break;
|
||||
case 24: return NAME_Ice; break;
|
||||
case 25: return NAME_Disintegrate; break;
|
||||
case 26: return NAME_Poison; break;
|
||||
case 27: return NAME_Electric; break;
|
||||
case 1000: return NAME_Massacre; break;
|
||||
}
|
||||
}
|
||||
|
||||
FUNC(LS_NOP)
|
||||
{
|
||||
|
|
@ -734,7 +757,7 @@ FUNC(LS_Teleport_NewMap)
|
|||
|
||||
FUNC(LS_Teleport)
|
||||
// Teleport (tid, sectortag, bNoSourceFog)
|
||||
{
|
||||
{
|
||||
return EV_Teleport (arg0, arg1, ln, backSide, it, true, !arg2, false);
|
||||
}
|
||||
|
||||
|
|
@ -751,7 +774,7 @@ FUNC(LS_Teleport_ZombieChanger)
|
|||
if (it != NULL)
|
||||
{
|
||||
EV_Teleport (arg0, arg1, ln, backSide, it, false, false, false);
|
||||
it->SetState (it->PainState);
|
||||
it->SetState (it->FindState(NAME_Pain));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -935,11 +958,11 @@ FUNC(LS_DamageThing)
|
|||
}
|
||||
else if (arg0 > 0)
|
||||
{
|
||||
P_DamageMobj (it, NULL, NULL, arg0, arg1);
|
||||
P_DamageMobj (it, NULL, NULL, arg0, MODtoDamageType (arg1));
|
||||
}
|
||||
else
|
||||
{ // If zero damage, guarantee a kill
|
||||
P_DamageMobj (it, NULL, NULL, 1000000, arg1);
|
||||
P_DamageMobj (it, NULL, NULL, 1000000, MODtoDamageType (arg1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1094,7 +1117,7 @@ FUNC(LS_Thing_Destroy)
|
|||
{
|
||||
AActor *temp = iterator.Next ();
|
||||
if (actor->flags & MF_SHOOTABLE)
|
||||
P_DamageMobj (actor, NULL, it, arg1 ? 1000000 : actor->health, MOD_UNKNOWN);
|
||||
P_DamageMobj (actor, NULL, it, arg1 ? 1000000 : actor->health, NAME_None);
|
||||
actor = temp;
|
||||
}
|
||||
}
|
||||
|
|
@ -1115,7 +1138,7 @@ FUNC(LS_Thing_Damage)
|
|||
{
|
||||
if (arg1 > 0)
|
||||
{
|
||||
P_DamageMobj (actor, NULL, it, arg1, arg2);
|
||||
P_DamageMobj (actor, NULL, it, arg1, MODtoDamageType (arg2));
|
||||
}
|
||||
else if (actor->health < actor->GetDefault()->health)
|
||||
{
|
||||
|
|
@ -1354,7 +1377,8 @@ static bool DoThingRaise(AActor *thing)
|
|||
if (thing->tics != -1)
|
||||
return true; // not lying still yet
|
||||
|
||||
if (thing->RaiseState == NULL)
|
||||
FState * RaiseState = thing->FindState(NAME_Raise);
|
||||
if (RaiseState == NULL)
|
||||
return true; // monster doesn't have a raise state
|
||||
|
||||
AActor *info = thing->GetDefault ();
|
||||
|
|
@ -1379,7 +1403,7 @@ static bool DoThingRaise(AActor *thing)
|
|||
|
||||
S_Sound (thing, CHAN_BODY, "vile/raise", 1, ATTN_IDLE);
|
||||
|
||||
thing->SetState (info->RaiseState);
|
||||
thing->SetState (RaiseState);
|
||||
thing->flags = info->flags;
|
||||
thing->flags2 = info->flags2;
|
||||
thing->flags3 = info->flags3;
|
||||
|
|
@ -1974,6 +1998,11 @@ FUNC(LS_PointPush_SetForce)
|
|||
FUNC(LS_Sector_SetDamage)
|
||||
// Sector_SetDamage (tag, amount, mod)
|
||||
{
|
||||
// The sector still stores the mod in its old format because
|
||||
// adding an FName to the sector_t structure might cause
|
||||
// problems by adding an unwanted constructor.
|
||||
// Since it doesn't really matter whether the type is translated
|
||||
// here or in P_PlayerInSpecialSector I think it's the best solution.
|
||||
int secnum = -1;
|
||||
while ((secnum = P_FindSectorFromTag (arg0, secnum)) >= 0) {
|
||||
sectors[secnum].damage = arg1;
|
||||
|
|
@ -2561,7 +2590,7 @@ FUNC(LS_ForceField)
|
|||
{
|
||||
if (it != NULL)
|
||||
{
|
||||
P_DamageMobj (it, NULL, NULL, 16, MOD_UNKNOWN);
|
||||
P_DamageMobj (it, NULL, NULL, 16, NAME_None);
|
||||
P_ThrustMobj (it, it->angle + ANGLE_180, 0x7D000);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue