diff --git a/docs/rh-log.txt b/docs/rh-log.txt index acc611620..2b3ace08f 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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 - Added warning messages when loading maps that have non-zero values in unused line argument fields, because these maps could potentially break diff --git a/src/d_player.h b/src/d_player.h index 14ca80409..7c7becbe3 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -270,7 +270,7 @@ public: // killough 10/98: used for realistic bobbing (i.e. not simply overall speed) // mo->velx and mo->vely represent true velocity experienced by player. // 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 bool centering; diff --git a/src/g_doom/a_fatso.cpp b/src/g_doom/a_fatso.cpp index feb476377..d641ebf72 100644 --- a/src/g_doom/a_fatso.cpp +++ b/src/g_doom/a_fatso.cpp @@ -124,12 +124,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Mushroom) { int i, j; - ACTION_PARAM_START(3); + ACTION_PARAM_START(5); ACTION_PARAM_CLASS(spawntype, 0); ACTION_PARAM_INT(n, 1); 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"); P_RadiusAttack (self, self->target, 128, 128, self->DamageType, true); @@ -141,14 +143,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Mushroom) // Now launch mushroom cloud AActor *target = Spawn("Mapspot", 0, 0, 0, NO_REPLACE); // We need something to aim at. target->height = self->height; - for (i = -n; i <= n; i += 8) + for (i = -n; i <= n; i += 8) { - for (j = -n; j <= n; j += 8) + for (j = -n; j <= n; j += 8) { 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->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))) { 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 } if (mo != NULL) - { - mo->velx >>= 1; - mo->vely >>= 1; // Slow it down a bit - mo->velz >>= 1; + { // Slow it down a bit + mo->velx = FixedMul(mo->velx, hrange); + mo->vely = FixedMul(mo->vely, hrange); + mo->velz = FixedMul(mo->velz, hrange); mo->flags &= ~MF_NOGRAVITY; // Make debris fall under gravity } } diff --git a/src/g_doom/a_lostsoul.cpp b/src/g_doom/a_lostsoul.cpp index 46dec259b..c648afaba 100644 --- a/src/g_doom/a_lostsoul.cpp +++ b/src/g_doom/a_lostsoul.cpp @@ -13,6 +13,7 @@ */ FRandom pr_lost ("LostMissileRange"); + FRandom pr_oldsoul ("BetaLostSoul"); // // SkullAttack @@ -54,6 +55,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullAttack) 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 diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 68f9079c0..34b627736 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -947,6 +947,12 @@ DEFINE_MAP_OPTION(secretnext, true) 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) { 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) { parse.ParseAssign(); diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 13df142a7..fb641ccb8 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -168,13 +168,19 @@ static int P_Set3DFloor(line_t * line, int param,int param2, int alpha) if (l->args[0]) { // Yes, Vavoom's 3D-floor definitions suck! - static DWORD vavoomcolors[]={ - 0, 0x101080, 0x801010, 0x108010, 0x287020, 0xf0f010}; + // The content list changed in r1783 of Vavoom to be unified + // 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; - l->frontsector->ColorMap = GetSpecialLights (l->frontsector->ColorMap->Color, - vavoomcolors[l->args[0]], - l->frontsector->ColorMap->Desaturate); + l->frontsector->ColorMap = + GetSpecialLights (l->frontsector->ColorMap->Color, + vavoomcolors[l->args[0]]&VC_COLORMASK, + (vavoomcolors[l->args[0]]&VC_ALPHAMASK)>>24); + // l->frontsector->ColorMap->Desaturate); } alpha=(alpha*255)/100; break; diff --git a/src/p_3dfloors.h b/src/p_3dfloors.h index 254884c8d..9e03897be 100644 --- a/src/p_3dfloors.h +++ b/src/p_3dfloors.h @@ -39,7 +39,22 @@ typedef enum } 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 diff --git a/src/p_map.cpp b/src/p_map.cpp index af299eb26..3a2a88ae7 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -1594,12 +1594,12 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y, #else // When flying, slide up or down blocking lines until the actor // is not blocked. - if (thing->z+thing->height > tmceilingz) + if (thing->z+thing->height > tm.ceilingz) { thing->velz = -8*FRACUNIT; 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; goto pushline; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index aa2fa324e..70cb731c8 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -283,16 +283,16 @@ void AActor::Serialize (FArchive &arc) << MaxStepHeight; if (SaveVersion < 1796) { - int bouncetype, bounceflags; - arc << bouncetype; + int BounceFlags, bounceflags; + arc << BounceFlags; bounceflags = 0; - if (bouncetype & 4) + if (BounceFlags & 4) bounceflags |= BOUNCE_UseSeeSound; - bouncetype &= 3; - if (bouncetype == 1) bounceflags |= BOUNCE_Doom; - else if (bouncetype == 2) bounceflags |= BOUNCE_Heretic; - else if (bouncetype == 3) bounceflags |= BOUNCE_Hexen; + BounceFlags &= 3; + if (BounceFlags == 1) bounceflags |= BOUNCE_Doom; + else if (BounceFlags == 2) bounceflags |= BOUNCE_Heretic; + else if (BounceFlags == 3) bounceflags |= BOUNCE_Hexen; if (flags3 & 0x00800000) flags3 &= ~0x00800000, bounceflags |= BOUNCE_CanBounceWater; 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) { // 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); 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) { - mo->velz = 0; P_HitFloor (mo); + mo->velz = 0; return; } else if (mo->flags3 & MF3_FLOORHUGGER) @@ -2262,12 +2262,12 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz) mo->FloorBounceMissile (mo->ceilingsector->ceilingplane); return; } - if (mo->velz > 0) - mo->velz = 0; if (mo->flags & MF_SKULLFLY) { // the skull slammed into something mo->velz = -mo->velz; } + if (mo->velz > 0) + mo->velz = 0; if (mo->flags & MF_MISSILE && (!(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); return th; } + //--------------------------------------------------------------------------- // // FUNC P_SpawnMissileAngle diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 96da00bb3..c1dacde2c 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -80,6 +80,7 @@ ACTOR Actor native //: Thinker action native A_HeadAttack(); action native A_BruisAttack(); action native A_SkullAttack(float speed = 20); + action native A_BetaSkullAttack(); action native A_Metal(); action native A_SpidRefire(); action native A_BabyMetal(); @@ -100,7 +101,7 @@ ACTOR Actor native //: Thinker action native A_BrainExplode(); action native A_Die(name damagetype = "none"); action native A_Detonate(); - action native A_Mushroom(class spawntype = "FatShot", int numspawns = 0, int flags = 0); + action native A_Mushroom(class 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_SetFloorClip(); diff --git a/wadsrc/static/actors/doom/lostsoul.txt b/wadsrc/static/actors/doom/lostsoul.txt index d6f8de0c0..beb9ef4dd 100644 --- a/wadsrc/static/actors/doom/lostsoul.txt +++ b/wadsrc/static/actors/doom/lostsoul.txt @@ -49,3 +49,33 @@ ACTOR LostSoul 3006 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 + } +}