From 4a057c1fdc3c0aeadc792cbe171210aeee078a6f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 14 Sep 2009 23:50:21 +0000 Subject: [PATCH] - 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) --- src/compatibility.cpp | 1 - src/d_dehacked.cpp | 9 --------- src/d_main.cpp | 3 +-- src/doomdef.h | 7 +++---- src/g_mapinfo.cpp | 1 - src/p_enemy.cpp | 16 ++++++++++++++++ src/thingdef/thingdef_codeptr.cpp | 13 ++++++++++--- wadsrc/static/actors/actor.txt | 2 +- wadsrc/static/dehsupp.txt | 2 +- 9 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 6d5b421b14..a6bb4a38aa 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -102,7 +102,6 @@ static FCompatOption Options[] = { "wallrun", COMPATF_WALLRUN, 0 }, // [GZ] Added for CC MAP29 { "anybossdeath", COMPATF_ANYBOSSDEATH, 0}, // [GZ] Added for UAC_DEAD { "mushroom", COMPATF_MUSHROOM, 0}, - { "mbftorque", COMPATF_MBFTORQUE, 0}, { "mbfmonstermove", COMPATF_MBFMONSTERMOVE, 0 }, { "corpsegibs", COMPATF_CORPSEGIBS, 0 }, { "noblockfriends", COMPATF_NOBLOCKFRIENDS, 0 }, diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index 71f7b25bca..8c1b36fc31 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -983,12 +983,6 @@ static int PatchThing (int thingy) } 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<Misc1 = misc1; info->Frame = (frame & 0x3f) | (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; @@ -1599,7 +1591,6 @@ static int PatchWeapon (int weapNum) 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) { state->SetAction(NULL); diff --git a/src/d_main.cpp b/src/d_main.cpp index 0c48e66fdb..7c0a13aca4 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -512,7 +512,7 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL) case 5: // MBF compat mode v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MUSHROOM| - COMPATF_MBFTORQUE|COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS; + COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS; break; } @@ -543,7 +543,6 @@ CVAR (Flag, compat_crossdropoff,compatflags, COMPATF_CROSSDROPOFF); CVAR (Flag, compat_anybossdeath,compatflags, COMPATF_ANYBOSSDEATH); CVAR (Flag, compat_minotaur, compatflags, COMPATF_MINOTAUR); CVAR (Flag, compat_mushroom, compatflags, COMPATF_MUSHROOM); -CVAR (Flag, compat_mbftorque, compatflags, COMPATF_MBFTORQUE); CVAR (Flag, compat_mbfmonstermove,compatflags, COMPATF_MBFMONSTERMOVE); CVAR (Flag, compat_corpsegibs, compatflags, COMPATF_CORPSEGIBS); CVAR (Flag, compat_noblockfriends,compatflags,COMPATF_NOBLOCKFRIENDS); diff --git a/src/doomdef.h b/src/doomdef.h index cbac842a36..868479faa3 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -321,10 +321,9 @@ enum 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_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 << 26, // Monsters are affected by friction and pushers/pullers. - COMPATF_CORPSEGIBS = 1 << 27, // Crushed monsters are turned into gibs, rather than replaced by gibs. - COMPATF_NOBLOCKFRIENDS = 1 << 28, // Friendly monsters aren't blocked by monster-blocking lines. + COMPATF_MBFMONSTERMOVE = 1 << 24, // Monsters are affected by friction and pushers/pullers. + COMPATF_CORPSEGIBS = 1 << 25, // Crushed monsters are turned into gibs, rather than replaced by gibs. + COMPATF_NOBLOCKFRIENDS = 1 << 26, // Friendly monsters aren't blocked by monster-blocking lines. }; // Emulate old bugs for select maps. These are not exposed by a cvar diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index af033d6d6c..bb3449e0a3 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -1356,7 +1356,6 @@ MapFlagHandlers[] = { "compat_anybossdeath", MITYPE_COMPATFLAG, COMPATF_ANYBOSSDEATH}, { "compat_minotaur", MITYPE_COMPATFLAG, COMPATF_MINOTAUR}, { "compat_mushroom", MITYPE_COMPATFLAG, COMPATF_MUSHROOM}, - { "compat_mbftorque", MITYPE_COMPATFLAG, COMPATF_MBFTORQUE}, { "compat_mbfmonstermove", MITYPE_COMPATFLAG, COMPATF_MBFMONSTERMOVE}, { "compat_corpsegibs", MITYPE_COMPATFLAG, COMPATF_CORPSEGIBS}, { "compat_noblockfriends", MITYPE_COMPATFLAG, COMPATF_NOBLOCKFRIENDS}, diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index cf2aca5219..f63f9b515a 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -412,6 +412,22 @@ bool P_Move (AActor *actor) 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 // [GZ] That's why it's compat-optioned. if (compatflags & COMPATF_MBFMONSTERMOVE) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index fb7aeda38d..a3abb7c065 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2871,9 +2871,11 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetUserVar) 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) { @@ -2882,9 +2884,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Turn) self->angle += angle; } +//=========================================================================== +// +// A_LineEffect // // This allows linedef effects to be activated inside deh frames. // +//=========================================================================== + void P_TranslateLineDef (line_t *ld, maplinedef_t *mld); DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LineEffect) diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 11e8e9e5e5..7261c59b7f 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -259,7 +259,7 @@ ACTOR Actor native //: Thinker 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_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); States diff --git a/wadsrc/static/dehsupp.txt b/wadsrc/static/dehsupp.txt index 64edb04eaa..25829b75f2 100644 --- a/wadsrc/static/dehsupp.txt +++ b/wadsrc/static/dehsupp.txt @@ -410,7 +410,7 @@ StateMap SmallBloodPool, Spawn, 1, // S_SMALLPOOL BrainStem, Spawn, 1, // S_BRAINSTEM 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 Grenade, Grenade, 1, // [MBF] S_GRENADE 968 Grenade, Detonate, 3, // [MBF] S_DETONATE - S_DETONATE3 969-971