- Added Gez's cleanup patch for MBF support but undid the deletion of the MF6_JUMPDOWN flag which will be implemented later.

SVN r1827 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-14 23:50:21 +00:00
parent 158fce1123
commit 4a057c1fdc
9 changed files with 32 additions and 22 deletions

View file

@ -102,7 +102,6 @@ static FCompatOption Options[] =
{ "wallrun", COMPATF_WALLRUN, 0 }, // [GZ] Added for CC MAP29 { "wallrun", COMPATF_WALLRUN, 0 }, // [GZ] Added for CC MAP29
{ "anybossdeath", COMPATF_ANYBOSSDEATH, 0}, // [GZ] Added for UAC_DEAD { "anybossdeath", COMPATF_ANYBOSSDEATH, 0}, // [GZ] Added for UAC_DEAD
{ "mushroom", COMPATF_MUSHROOM, 0}, { "mushroom", COMPATF_MUSHROOM, 0},
{ "mbftorque", COMPATF_MBFTORQUE, 0},
{ "mbfmonstermove", COMPATF_MBFMONSTERMOVE, 0 }, { "mbfmonstermove", COMPATF_MBFMONSTERMOVE, 0 },
{ "corpsegibs", COMPATF_CORPSEGIBS, 0 }, { "corpsegibs", COMPATF_CORPSEGIBS, 0 },
{ "noblockfriends", COMPATF_NOBLOCKFRIENDS, 0 }, { "noblockfriends", COMPATF_NOBLOCKFRIENDS, 0 },

View file

@ -983,12 +983,6 @@ static int PatchThing (int thingy)
} }
if (vchanged[0]) if (vchanged[0])
{ {
/* Just some testing info
Printf("value[0]: %x %i\n", value[0], value[0]);
for (int flagi = 0; flagi < 31; flagi++)
if (value[0] & 1<<flagi) Printf(" %s", flagnamesd[flagi]);
Printf("\n");*/
if (value[0] & MF_SLIDE) if (value[0] & MF_SLIDE)
{ {
// SLIDE (which occupies in Doom what is the MF_INCHASE slot in ZDoom) // SLIDE (which occupies in Doom what is the MF_INCHASE slot in ZDoom)
@ -1356,8 +1350,6 @@ static int PatchFrame (int frameNum)
info->Misc1 = misc1; info->Misc1 = misc1;
info->Frame = (frame & 0x3f) | info->Frame = (frame & 0x3f) |
(frame & 0x8000 ? SF_FULLBRIGHT : 0); (frame & 0x8000 ? SF_FULLBRIGHT : 0);
Printf("Misc1 patched to %d, Misc2 patched to %d in state %x (framenum %d)\n",
info->Misc1, info->Misc2, info, frameNum);
} }
return result; return result;
@ -1599,7 +1591,6 @@ static int PatchWeapon (int weapNum)
static void SetPointer(FState *state, PSymbol *sym, int frame = 0) static void SetPointer(FState *state, PSymbol *sym, int frame = 0)
{ {
Printf("Changing the pointer for state %d (%x)\n", frame, state);
if (sym==NULL || sym->SymbolType != SYM_ActionFunction) if (sym==NULL || sym->SymbolType != SYM_ActionFunction)
{ {
state->SetAction(NULL); state->SetAction(NULL);

View file

@ -512,7 +512,7 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
case 5: // MBF compat mode case 5: // MBF compat mode
v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MUSHROOM| v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MUSHROOM|
COMPATF_MBFTORQUE|COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS; COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS;
break; break;
} }
@ -543,7 +543,6 @@ CVAR (Flag, compat_crossdropoff,compatflags, COMPATF_CROSSDROPOFF);
CVAR (Flag, compat_anybossdeath,compatflags, COMPATF_ANYBOSSDEATH); CVAR (Flag, compat_anybossdeath,compatflags, COMPATF_ANYBOSSDEATH);
CVAR (Flag, compat_minotaur, compatflags, COMPATF_MINOTAUR); CVAR (Flag, compat_minotaur, compatflags, COMPATF_MINOTAUR);
CVAR (Flag, compat_mushroom, compatflags, COMPATF_MUSHROOM); CVAR (Flag, compat_mushroom, compatflags, COMPATF_MUSHROOM);
CVAR (Flag, compat_mbftorque, compatflags, COMPATF_MBFTORQUE);
CVAR (Flag, compat_mbfmonstermove,compatflags, COMPATF_MBFMONSTERMOVE); CVAR (Flag, compat_mbfmonstermove,compatflags, COMPATF_MBFMONSTERMOVE);
CVAR (Flag, compat_corpsegibs, compatflags, COMPATF_CORPSEGIBS); CVAR (Flag, compat_corpsegibs, compatflags, COMPATF_CORPSEGIBS);
CVAR (Flag, compat_noblockfriends,compatflags,COMPATF_NOBLOCKFRIENDS); CVAR (Flag, compat_noblockfriends,compatflags,COMPATF_NOBLOCKFRIENDS);

View file

@ -321,10 +321,9 @@ enum
COMPATF_ANYBOSSDEATH = 1 << 21, // [GZ] Any monster which calls BOSSDEATH counts for level specials COMPATF_ANYBOSSDEATH = 1 << 21, // [GZ] Any monster which calls BOSSDEATH counts for level specials
COMPATF_MINOTAUR = 1 << 22, // Minotaur's floor flame is exploded immediately when feet are clipped COMPATF_MINOTAUR = 1 << 22, // Minotaur's floor flame is exploded immediately when feet are clipped
COMPATF_MUSHROOM = 1 << 23, // Force original velocity calculations for A_Mushroom in Dehacked mods. COMPATF_MUSHROOM = 1 << 23, // Force original velocity calculations for A_Mushroom in Dehacked mods.
COMPATF_MBFTORQUE = 1 << 25, // Uses MBF-style pseudo torque simulation. COMPATF_MBFMONSTERMOVE = 1 << 24, // Monsters are affected by friction and pushers/pullers.
COMPATF_MBFMONSTERMOVE = 1 << 26, // Monsters are affected by friction and pushers/pullers. COMPATF_CORPSEGIBS = 1 << 25, // Crushed monsters are turned into gibs, rather than replaced by gibs.
COMPATF_CORPSEGIBS = 1 << 27, // Crushed monsters are turned into gibs, rather than replaced by gibs. COMPATF_NOBLOCKFRIENDS = 1 << 26, // Friendly monsters aren't blocked by monster-blocking lines.
COMPATF_NOBLOCKFRIENDS = 1 << 28, // Friendly monsters aren't blocked by monster-blocking lines.
}; };
// Emulate old bugs for select maps. These are not exposed by a cvar // Emulate old bugs for select maps. These are not exposed by a cvar

View file

@ -1356,7 +1356,6 @@ MapFlagHandlers[] =
{ "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH}, { "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH},
{ "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR}, { "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR},
{ "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM}, { "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM},
{ "compat_mbftorque", MITYPE_COMPATFLAG, COMPATF_MBFTORQUE},
{ "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE}, { "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE},
{ "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS}, { "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS},
{ "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS}, { "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS},

View file

@ -412,6 +412,22 @@ bool P_Move (AActor *actor)
speed = actor->Speed; speed = actor->Speed;
#if 0 // todo
// killough 10/98: allow dogs to drop off of taller ledges sometimes.
// dropoff==1 means always allow it, dropoff==2 means only up to 128 high,
// and only if the target is immediately on the other side of the line.
if (actor->flags6 & MF6_JUMPDOWN && target &&
!(target->IsFriend(actor)) &&
P_AproxDistance(actor->x - target->x,
actor->y - target->y) < FRACUNIT*144 &&
P_Random(pr_dropoff) < 235)
{
dropoff = 2;
}
#endif
// [RH] I'm not so sure this is such a good idea // [RH] I'm not so sure this is such a good idea
// [GZ] That's why it's compat-optioned. // [GZ] That's why it's compat-optioned.
if (compatflags & COMPATF_MBFMONSTERMOVE) if (compatflags & COMPATF_MBFMONSTERMOVE)

View file

@ -2871,9 +2871,11 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetUserVar)
self->uservar[pos] = value; self->uservar[pos] = value;
} }
// A few action functions for super-duper enhanced MBF compatibility. They're all deprecated and shouldn't be used in //===========================================================================
// DECORATE. The other MBF new functions, A_Detonate, A_Mushroom and A_Die are all already elsewhere, and as for //
// A_PlaySound, it is an instance of name conflict, so it has been given a default sound to work from dehacked as well. // A_Turn
//
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Turn) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Turn)
{ {
@ -2882,9 +2884,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Turn)
self->angle += angle; self->angle += angle;
} }
//===========================================================================
//
// A_LineEffect
// //
// This allows linedef effects to be activated inside deh frames. // This allows linedef effects to be activated inside deh frames.
// //
//===========================================================================
void P_TranslateLineDef (line_t *ld, maplinedef_t *mld); void P_TranslateLineDef (line_t *ld, maplinedef_t *mld);
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LineEffect) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LineEffect)

View file

@ -259,7 +259,7 @@ ACTOR Actor native //: Thinker
action native A_ScaleVelocity(float scale); action native A_ScaleVelocity(float scale);
action native A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0); action native A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0);
action native A_SetArg(int pos, int value); action native A_SetArg(int pos, int value);
action native A_SetVar(int pos, int value); action native A_SetUserVar(int pos, int value);
action native A_SetSpecial(int spec, int arg0, int arg1, int arg2, int arg3, int arg4); action native A_SetSpecial(int spec, int arg0, int arg1, int arg2, int arg3, int arg4);
States States

View file

@ -410,7 +410,7 @@ StateMap
SmallBloodPool, Spawn, 1, // S_SMALLPOOL SmallBloodPool, Spawn, 1, // S_SMALLPOOL
BrainStem, Spawn, 1, // S_BRAINSTEM BrainStem, Spawn, 1, // S_BRAINSTEM
TechLamp, Spawn, 4, // S_TECHLAMP - S_TECHLAMP4 TechLamp, Spawn, 4, // S_TECHLAMP - S_TECHLAMP4
TechLamp2, Spawn, 4 // S_TECH2LAMP - S_TECH2LAMP4 TechLamp2, Spawn, 4, // S_TECH2LAMP - S_TECH2LAMP4
DoomUnusedStates, TNT, 1, // [MBF] S_TNT1 967 DoomUnusedStates, TNT, 1, // [MBF] S_TNT1 967
Grenade, Grenade, 1, // [MBF] S_GRENADE 968 Grenade, Grenade, 1, // [MBF] S_GRENADE 968
Grenade, Detonate, 3, // [MBF] S_DETONATE - S_DETONATE3 969-971 Grenade, Detonate, 3, // [MBF] S_DETONATE - S_DETONATE3 969-971