mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-22 20:11:17 +00:00
- added a NOATTACK sector flag which prevents monsters from going to their attack states if present.
This commit is contained in:
parent
9aff224891
commit
8cac2d8c84
5 changed files with 11 additions and 2 deletions
|
@ -197,6 +197,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
desaturation = <float>; // Color desaturation factor. 0 = none, 1 = full, default = 0.
|
||||
silent = <bool>; // Actors in this sector make no sound,
|
||||
nofallingdamage = <bool>; // Falling damage is disabled in this sector
|
||||
noattack = <bool>; // Blocks monster attacks in this sector.
|
||||
dropactors = <bool>; // Actors drop with instantly moving floors (*)
|
||||
norespawn = <bool>; // Players can not respawn in this sector
|
||||
soundsequence = <string>; // The sound sequence to play when this sector moves. Placing a
|
||||
|
|
|
@ -773,6 +773,7 @@ xx(BuiltinGetDefault)
|
|||
xx(BuiltinClassCast)
|
||||
xx(BuiltinFormat)
|
||||
xx(Damage)
|
||||
xx(Noattack)
|
||||
|
||||
// basic type names
|
||||
xx(Default)
|
||||
|
|
|
@ -349,7 +349,7 @@ bool AActor::CheckMeleeRange ()
|
|||
|
||||
double dist;
|
||||
|
||||
if (!pl)
|
||||
if (!pl || (Sector->Flags & SECF_NOATTACK))
|
||||
return false;
|
||||
|
||||
dist = Distance2D (pl);
|
||||
|
@ -398,7 +398,7 @@ bool P_CheckMeleeRange2 (AActor *actor)
|
|||
double dist;
|
||||
|
||||
|
||||
if (!actor->target)
|
||||
if (!actor->target || (actor->Sector->Flags & SECF_NOATTACK))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -445,6 +445,8 @@ bool P_CheckMissileRange (AActor *actor)
|
|||
{
|
||||
double dist;
|
||||
|
||||
if ((actor->Sector->Flags & SECF_NOATTACK)) return false;
|
||||
|
||||
if (!P_CheckSight (actor, actor->target, SF_SEEPASTBLOCKEVERYTHING))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -1658,6 +1658,10 @@ public:
|
|||
sec->planes[sector_t::ceiling].GlowHeight = (float)CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_Noattack:
|
||||
Flag(sec->Flags, SECF_NOATTACK, key);
|
||||
break;
|
||||
|
||||
case NAME_MoreIds:
|
||||
// delay parsing of the tag string until parsing of the sector is complete
|
||||
// This ensures that the ID is always the first tag in the list.
|
||||
|
|
|
@ -494,6 +494,7 @@ enum
|
|||
SECF_ENDGODMODE = 256, // getting damaged by this sector ends god mode
|
||||
SECF_ENDLEVEL = 512, // ends level when health goes below 10
|
||||
SECF_HAZARD = 1024, // Change to Strife's delayed damage handling.
|
||||
SECF_NOATTACK = 2048, // monsters cannot start attacks in this sector.
|
||||
|
||||
SECF_WASSECRET = 1 << 30, // a secret that was discovered
|
||||
SECF_SECRET = 1 << 31, // a secret sector
|
||||
|
|
Loading…
Reference in a new issue