mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-13 14:10:42 +00:00
- added a per-level AVOIDMELEE flag.
This already existed as a per-actor flag, but for proper MBF support it needs to be settable on a per-map basis as well.
This commit is contained in:
parent
4614ce41cd
commit
ff497996a3
3 changed files with 3 additions and 1 deletions
|
@ -1662,6 +1662,7 @@ MapFlagHandlers[] =
|
||||||
{ "enableshadowmap", MITYPE_CLRFLAG3, LEVEL3_NOSHADOWMAP, 0 },
|
{ "enableshadowmap", MITYPE_CLRFLAG3, LEVEL3_NOSHADOWMAP, 0 },
|
||||||
{ "enableskyboxao", MITYPE_SETFLAG3, LEVEL3_SKYBOXAO, 0 },
|
{ "enableskyboxao", MITYPE_SETFLAG3, LEVEL3_SKYBOXAO, 0 },
|
||||||
{ "disableskyboxao", MITYPE_CLRFLAG3, LEVEL3_SKYBOXAO, 0 },
|
{ "disableskyboxao", MITYPE_CLRFLAG3, LEVEL3_SKYBOXAO, 0 },
|
||||||
|
{ "avoidmelee", MITYPE_SETFLAG3, LEVEL3_AVOIDMELEE, 0 },
|
||||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
||||||
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
||||||
|
|
|
@ -258,6 +258,7 @@ enum ELevelFlags : unsigned int
|
||||||
LEVEL3_E4M8SPECIAL = 0x00004000,
|
LEVEL3_E4M8SPECIAL = 0x00004000,
|
||||||
LEVEL3_E4M6SPECIAL = 0x00008000,
|
LEVEL3_E4M6SPECIAL = 0x00008000,
|
||||||
LEVEL3_NOSHADOWMAP = 0x00010000, // disables shadowmaps for a given level.
|
LEVEL3_NOSHADOWMAP = 0x00010000, // disables shadowmaps for a given level.
|
||||||
|
LEVEL3_AVOIDMELEE = 0x00020000, // global flag needed for proper MBF support.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -943,7 +943,7 @@ void P_NewChaseDir(AActor * actor)
|
||||||
if (target->health > 0 && !actor->IsFriend(target) && target != actor->goal)
|
if (target->health > 0 && !actor->IsFriend(target) && target != actor->goal)
|
||||||
{ // Live enemy target
|
{ // Live enemy target
|
||||||
|
|
||||||
if (actor->flags3 & MF3_AVOIDMELEE)
|
if ((actor->flags3 & MF3_AVOIDMELEE) || (actor->Level->flags3 & LEVEL3_AVOIDMELEE))
|
||||||
{
|
{
|
||||||
bool ismeleeattacker = false;
|
bool ismeleeattacker = false;
|
||||||
double dist = actor->Distance2D(target);
|
double dist = actor->Distance2D(target);
|
||||||
|
|
Loading…
Reference in a new issue