- Added a few things from Gez's experimental build:

* Beta Lost Soul (added DoomEdNum 9037 to it)
  * A_Mushroom extensions
  * Vavoom compatible MAPINFO keynames.
  * Vavoom's Sector_SetContents fixes to inactive 3D floor code.


SVN r1818 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-14 09:41:09 +00:00
parent 980b68af17
commit 914d993aa1
11 changed files with 122 additions and 31 deletions

View file

@ -1,3 +1,9 @@
September 14, 2009 (Changes by Graf Zahl)
- Added a few things from Gez's experimental build:
* Beta Lost Soul (added DoomEdNum 9037 to it)
* A_Mushroom extensions
* Vavoom compatible MAPINFO keynames.
September 11, 2009 September 11, 2009
- Added warning messages when loading maps that have non-zero values in - Added warning messages when loading maps that have non-zero values in
unused line argument fields, because these maps could potentially break unused line argument fields, because these maps could potentially break

View file

@ -270,7 +270,7 @@ public:
// killough 10/98: used for realistic bobbing (i.e. not simply overall speed) // killough 10/98: used for realistic bobbing (i.e. not simply overall speed)
// mo->velx and mo->vely represent true velocity experienced by player. // mo->velx and mo->vely represent true velocity experienced by player.
// This only represents the thrust that the player applies himself. // This only represents the thrust that the player applies himself.
// This avoids anomolies with such things as Boom ice and conveyors. // This avoids anomalies with such things as Boom ice and conveyors.
fixed_t velx, vely; // killough 10/98 fixed_t velx, vely; // killough 10/98
bool centering; bool centering;

View file

@ -124,12 +124,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Mushroom)
{ {
int i, j; int i, j;
ACTION_PARAM_START(3); ACTION_PARAM_START(5);
ACTION_PARAM_CLASS(spawntype, 0); ACTION_PARAM_CLASS(spawntype, 0);
ACTION_PARAM_INT(n, 1); ACTION_PARAM_INT(n, 1);
ACTION_PARAM_INT(flags, 2); ACTION_PARAM_INT(flags, 2);
ACTION_PARAM_FIXED(vrange, 3);
ACTION_PARAM_FIXED(hrange, 4);
if (n == 0) n = self->GetMissileDamage (0, 1); if (n == 0) n = self->Damage; // GetMissileDamage (0, 1);
if (spawntype == NULL) spawntype = PClass::FindClass("FatShot"); if (spawntype == NULL) spawntype = PClass::FindClass("FatShot");
P_RadiusAttack (self, self->target, 128, 128, self->DamageType, true); P_RadiusAttack (self, self->target, 128, 128, self->DamageType, true);
@ -148,7 +150,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Mushroom)
AActor *mo; AActor *mo;
target->x = self->x + (i << FRACBITS); // Aim in many directions from source target->x = self->x + (i << FRACBITS); // Aim in many directions from source
target->y = self->y + (j << FRACBITS); target->y = self->y + (j << FRACBITS);
target->z = self->z + (P_AproxDistance(i,j) << (FRACBITS+2)); // Aim up fairly high target->z = self->z + (P_AproxDistance(i,j) * vrange); // Aim up fairly high
if (flags == 0 && (self->state->Misc1 == 0 || !(i_compatflags & COMPATF_MUSHROOM))) if (flags == 0 && (self->state->Misc1 == 0 || !(i_compatflags & COMPATF_MUSHROOM)))
{ {
mo = P_SpawnMissile (self, target, spawntype); // Launch fireball mo = P_SpawnMissile (self, target, spawntype); // Launch fireball
@ -158,10 +160,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Mushroom)
mo = P_OldSpawnMissile (self, target, spawntype); // Launch fireball mo = P_OldSpawnMissile (self, target, spawntype); // Launch fireball
} }
if (mo != NULL) if (mo != NULL)
{ { // Slow it down a bit
mo->velx >>= 1; mo->velx = FixedMul(mo->velx, hrange);
mo->vely >>= 1; // Slow it down a bit mo->vely = FixedMul(mo->vely, hrange);
mo->velz >>= 1; mo->velz = FixedMul(mo->velz, hrange);
mo->flags &= ~MF_NOGRAVITY; // Make debris fall under gravity mo->flags &= ~MF_NOGRAVITY; // Make debris fall under gravity
} }
} }

View file

@ -13,6 +13,7 @@
*/ */
FRandom pr_lost ("LostMissileRange"); FRandom pr_lost ("LostMissileRange");
FRandom pr_oldsoul ("BetaLostSoul");
// //
// SkullAttack // SkullAttack
@ -54,6 +55,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullAttack)
A_SkullAttack(self, n); A_SkullAttack(self, n);
} }
DEFINE_ACTION_FUNCTION(AActor, A_BetaSkullAttack)
{
int damage;
if (!self || !self->target || self->target->GetSpecies() == self->GetSpecies())
return;
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
A_FaceTarget(self);
damage = (pr_oldsoul()%8+1)*self->Damage;
P_DamageMobj(self->target, self, self, damage, NAME_None);
}
//========================================================================== //==========================================================================
// //
// CVAR transsouls // CVAR transsouls

View file

@ -947,6 +947,12 @@ DEFINE_MAP_OPTION(secretnext, true)
parse.ParseNextMap(info->secretmap); parse.ParseNextMap(info->secretmap);
} }
DEFINE_MAP_OPTION(secret, true) // Just an alias for secretnext, for Vavoom compatibility
{
parse.ParseAssign();
parse.ParseNextMap(info->secretmap);
}
DEFINE_MAP_OPTION(cluster, true) DEFINE_MAP_OPTION(cluster, true)
{ {
parse.ParseAssign(); parse.ParseAssign();
@ -998,6 +1004,14 @@ DEFINE_MAP_OPTION(sky2, true)
} }
} }
// Vavoom compatibility
DEFINE_MAP_OPTION(skybox, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->skypic1);
info->skyspeed1 = 0;
}
DEFINE_MAP_OPTION(fade, true) DEFINE_MAP_OPTION(fade, true)
{ {
parse.ParseAssign(); parse.ParseAssign();

View file

@ -168,13 +168,19 @@ static int P_Set3DFloor(line_t * line, int param,int param2, int alpha)
if (l->args[0]) if (l->args[0])
{ {
// Yes, Vavoom's 3D-floor definitions suck! // Yes, Vavoom's 3D-floor definitions suck!
static DWORD vavoomcolors[]={ // The content list changed in r1783 of Vavoom to be unified
0, 0x101080, 0x801010, 0x108010, 0x287020, 0xf0f010}; // among all its supported games, so it has now ten different
// values instead of just five.
static DWORD vavoomcolors[]={VC_EMPTY,
VC_WATER, VC_LAVA, VC_NUKAGE, VC_SLIME, VC_HELLSLIME,
VC_BLOOD, VC_SLUDGE, VC_HAZARD, VC_BOOMWATER};
flags|=FF_SWIMMABLE|FF_BOTHPLANES|FF_ALLSIDES|FF_FLOOD; flags|=FF_SWIMMABLE|FF_BOTHPLANES|FF_ALLSIDES|FF_FLOOD;
l->frontsector->ColorMap = GetSpecialLights (l->frontsector->ColorMap->Color, l->frontsector->ColorMap =
vavoomcolors[l->args[0]], GetSpecialLights (l->frontsector->ColorMap->Color,
l->frontsector->ColorMap->Desaturate); vavoomcolors[l->args[0]]&VC_COLORMASK,
(vavoomcolors[l->args[0]]&VC_ALPHAMASK)>>24);
// l->frontsector->ColorMap->Desaturate);
} }
alpha=(alpha*255)/100; alpha=(alpha*255)/100;
break; break;

View file

@ -39,7 +39,22 @@ typedef enum
} ffloortype_e; } ffloortype_e;
// This is for the purpose of Sector_SetContents:
enum : unsigned int
{
VC_EMPTY = 0, // Here's the original values of the color shifts in Vavoom, and in ARGB:
VC_WATER = 0x80825032, // 130, 80, 50, 128 -> 80.82.50.32 (was 0x101080)
VC_LAVA = 0x96FF5000, // 255, 80, 0, 150 -> 96.FF.50.00 (was 0xf0f010)
VC_NUKAGE = 0x9632FF32, // 50, 255, 50, 150 -> 96.32.FF.32 (was 0x108010)
VC_SLIME = 0x96001905, // 0, 25, 5, 150 -> 96.00.19.05 (was 0x287020)
VC_HELLSLIME = 0x96FF5000, // 255, 80, 0, 150 -> 96.FF.50.00 (wasn't covered)
VC_BLOOD = 0x96A00A0A, // 160, 16, 16, 150 -> 96.A0.0A.0A (was 0x801010)
VC_SLUDGE = 0x9680A080, // 128, 160, 128, 150 -> 96.80.A0.80 (wasn't covered)
VC_HAZARD = 0x8080A080, // 128, 160, 128, 128 -> 80.80.A0.80 (wasn't covered)
VC_BOOMWATER = 0x80004FA5, // Boom WATERMAP: -> 80.00.4F.A5 (wasn't covered)
VC_ALPHAMASK = 0xFF000000,
VC_COLORMASK = 0x00FFFFFF,
};
#ifdef _3DFLOORS #ifdef _3DFLOORS

View file

@ -1594,12 +1594,12 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
#else #else
// When flying, slide up or down blocking lines until the actor // When flying, slide up or down blocking lines until the actor
// is not blocked. // is not blocked.
if (thing->z+thing->height > tmceilingz) if (thing->z+thing->height > tm.ceilingz)
{ {
thing->velz = -8*FRACUNIT; thing->velz = -8*FRACUNIT;
goto pushline; goto pushline;
} }
else if (thing->z < tmfloorz && tmfloorz-tmdropoffz > thing->MaxDropOffHeight) else if (thing->z < tm.floorz && tm.floorz-tm.dropoffz > thing->MaxDropOffHeight)
{ {
thing->velz = 8*FRACUNIT; thing->velz = 8*FRACUNIT;
goto pushline; goto pushline;

View file

@ -283,16 +283,16 @@ void AActor::Serialize (FArchive &arc)
<< MaxStepHeight; << MaxStepHeight;
if (SaveVersion < 1796) if (SaveVersion < 1796)
{ {
int bouncetype, bounceflags; int BounceFlags, bounceflags;
arc << bouncetype; arc << BounceFlags;
bounceflags = 0; bounceflags = 0;
if (bouncetype & 4) if (BounceFlags & 4)
bounceflags |= BOUNCE_UseSeeSound; bounceflags |= BOUNCE_UseSeeSound;
bouncetype &= 3; BounceFlags &= 3;
if (bouncetype == 1) bounceflags |= BOUNCE_Doom; if (BounceFlags == 1) bounceflags |= BOUNCE_Doom;
else if (bouncetype == 2) bounceflags |= BOUNCE_Heretic; else if (BounceFlags == 2) bounceflags |= BOUNCE_Heretic;
else if (bouncetype == 3) bounceflags |= BOUNCE_Hexen; else if (BounceFlags == 3) bounceflags |= BOUNCE_Hexen;
if (flags3 & 0x00800000) if (flags3 & 0x00800000)
flags3 &= ~0x00800000, bounceflags |= BOUNCE_CanBounceWater; flags3 &= ~0x00800000, bounceflags |= BOUNCE_CanBounceWater;
if (flags3 & 0x01000000) if (flags3 & 0x01000000)
@ -2124,7 +2124,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
// //
if ((mo->flags & MF_FLOAT) && !(mo->flags2 & MF2_DORMANT) && mo->target) if ((mo->flags & MF_FLOAT) && !(mo->flags2 & MF2_DORMANT) && mo->target)
{ // float down towards target if too close { // float down towards target if too close
if (!(mo->flags & MF_SKULLFLY) && !(mo->flags & MF_INFLOAT)) if (!(mo->flags & (MF_SKULLFLY | MF_INFLOAT)))
{ {
dist = P_AproxDistance (mo->x - mo->target->x, mo->y - mo->target->y); dist = P_AproxDistance (mo->x - mo->target->x, mo->y - mo->target->y);
delta = (mo->target->z + (mo->height>>1)) - mo->z; delta = (mo->target->z + (mo->height>>1)) - mo->z;
@ -2171,8 +2171,8 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
} }
else if (mo->flags3 & MF3_NOEXPLODEFLOOR) else if (mo->flags3 & MF3_NOEXPLODEFLOOR)
{ {
mo->velz = 0;
P_HitFloor (mo); P_HitFloor (mo);
mo->velz = 0;
return; return;
} }
else if (mo->flags3 & MF3_FLOORHUGGER) else if (mo->flags3 & MF3_FLOORHUGGER)
@ -2262,12 +2262,12 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
mo->FloorBounceMissile (mo->ceilingsector->ceilingplane); mo->FloorBounceMissile (mo->ceilingsector->ceilingplane);
return; return;
} }
if (mo->velz > 0)
mo->velz = 0;
if (mo->flags & MF_SKULLFLY) if (mo->flags & MF_SKULLFLY)
{ // the skull slammed into something { // the skull slammed into something
mo->velz = -mo->velz; mo->velz = -mo->velz;
} }
if (mo->velz > 0)
mo->velz = 0;
if (mo->flags & MF_MISSILE && if (mo->flags & MF_MISSILE &&
(!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP))) (!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP)))
{ {
@ -4942,6 +4942,7 @@ AActor * P_OldSpawnMissile(AActor * source, AActor * dest, const PClass *type)
P_CheckMissileSpawn(th); P_CheckMissileSpawn(th);
return th; return th;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// FUNC P_SpawnMissileAngle // FUNC P_SpawnMissileAngle

View file

@ -80,6 +80,7 @@ ACTOR Actor native //: Thinker
action native A_HeadAttack(); action native A_HeadAttack();
action native A_BruisAttack(); action native A_BruisAttack();
action native A_SkullAttack(float speed = 20); action native A_SkullAttack(float speed = 20);
action native A_BetaSkullAttack();
action native A_Metal(); action native A_Metal();
action native A_SpidRefire(); action native A_SpidRefire();
action native A_BabyMetal(); action native A_BabyMetal();
@ -100,7 +101,7 @@ ACTOR Actor native //: Thinker
action native A_BrainExplode(); action native A_BrainExplode();
action native A_Die(name damagetype = "none"); action native A_Die(name damagetype = "none");
action native A_Detonate(); action native A_Detonate();
action native A_Mushroom(class<Actor> spawntype = "FatShot", int numspawns = 0, int flags = 0); action native A_Mushroom(class<Actor> spawntype = "FatShot", int numspawns = 0, int flags = 0, float vrange = 4.0, float hrange = 0.5);
action native A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0); action native A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0);
action native A_SetFloorClip(); action native A_SetFloorClip();

View file

@ -49,3 +49,33 @@ ACTOR LostSoul 3006
Stop Stop
} }
} }
Actor BetaSkull : LostSoul 9037
{
States
{
Spawn:
SKUL A 10 A_Look
Loop
See:
SKUL BCDA 5 A_Chase
Loop
Missile:
SKUL E 4 A_FaceTarget
SKUL F 5 A_BetaSkullAttack
SKUL F 4
Goto See
Pain:
SKUL G 4
SKUL H 2 A_Pain
SKUL I 4
Goto See
Death:
SKUL JKLM 5
SKUL N 5 A_Scream
SKUL O 5
SKUL P 5 A_Fall
SKUL Q 5 A_Stop
Wait
}
}