- Added a SECF_NORESPAWN flag for sectors that prevents players from being respawned

in such a sector. As a workaround for current map formats a new actor
  (DoomEdNum 9041) was added that can set the extended sector flags without the
  use of ACS and sector tags. The new flag can also be set with Sector_ChangeFlags.
- Fixed: Players ignored MF2_TELESTOMP and always telefragged what was in the way.
- Fixed: Actors with MF5_NOINTERACTION were not affected by the time freezer.


SVN r1315 (trunk)
This commit is contained in:
Christoph Oelckers 2008-12-14 19:12:41 +00:00
parent 34ab6ba862
commit bd9e318863
9 changed files with 65 additions and 5 deletions

View file

@ -1,3 +1,11 @@
December 12, 2008 (Changes by Graf Zahl)
- Added a SECF_NORESPAWN flag for sectors that prevents players from being respawned
in such a sector. As a workaround for current map formats a new actor
(DoomEdNum 9041) was added that can set the extended sector flags without the
use of ACS and sector tags. The new flag can also be set with Sector_ChangeFlags.
- Fixed: Players ignored MF2_TELESTOMP and always telefragged what was in the way.
- Fixed: Actors with MF5_NOINTERACTION were not affected by the time freezer.
December 7, 2008 (Changes by Graf Zahl)
- Added a strbin1 function that does the same as strbin but creates a copy
instead of overwriting the original string. ACS performing this operation

View file

@ -134,8 +134,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
yscaleceiling = <float>; // Y texture scale of ceiling texture, Default = 1.0.
rotationfloor = <float>; // Rotation of floor texture in degrees, Default = 0.0.
rotationceiling = <float>; // Rotation of ceiling texture in degrees, Default = 0.0.
lightfloor = <float>; // The floor's light level. Default is 0.
lightceiling = <float>; // The ceiling's light level. Default is 0.
lightfloor = <integer>; // The floor's light level. Default is 0.
lightceiling = <integer>; // The ceiling's light level. Default is 0.
lightfloorabsolute = <bool>; // true = 'lightfloor' is an absolute value. Default is
// relative to the owning sector's light level.
lightceilingabsolute = <bool>; // true = 'lightceiling' is an absolute value. Default is
@ -146,7 +146,8 @@ 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
dropactors = <bool>; // Actors drop with instantly moving floors
dropactors = <bool>; // Actors drop with instantly moving floors (*)
norespawn = <bool>; // Players can not respawn in this sector
* Note about dropactors
@ -218,6 +219,12 @@ Added 'nofakecontrast' option to sidedefs.
1.2 21.08.2008
Added smooth lighting option to linedefs
1.3 12.12.2008
Added NoRespawn sector flag
Fixed lightfloor and lightceiling properties for sectors. They are of type
integer, not float
===============================================================================
EOF
===============================================================================

View file

@ -228,3 +228,19 @@ void ASectorSilencer::Destroy ()
Sector->Flags &= ~SECF_SILENT;
Super::Destroy ();
}
class ASectorFlagSetter : public AActor
{
DECLARE_CLASS (ASectorFlagSetter, AActor)
public:
void BeginPlay ();
};
IMPLEMENT_CLASS (ASectorFlagSetter)
void ASectorFlagSetter::BeginPlay ()
{
Super::BeginPlay ();
Sector->Flags |= args[0];
}

View file

@ -397,6 +397,7 @@ xx(Desaturation)
xx(Silent)
xx(Nofallingdamage)
xx(Dropactors)
xx(NoRespawn)
xx(offsetx_top)
xx(offsety_top)

View file

@ -245,7 +245,7 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr
spechit.Clear ();
bool StompAlwaysFrags = thing->player || (thing->flags2 & MF2_TELESTOMP) ||
bool StompAlwaysFrags = (thing->flags2 & MF2_TELESTOMP) ||
(level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag;
FBoundingBox box(x, y, thing->radius);

View file

@ -2484,7 +2484,20 @@ void AActor::Tick ()
if (flags5 & MF5_NOINTERACTION)
{
// only do the minimally necessary things here to save time.
// only do the minimally necessary things here to save time:
// Check the time freezer
// apply momentum
// ensure that the actor is not linked into the blockmap
if (!(flags5 & MF5_NOTIMEFREEZE))
{
//Added by MC: Freeze mode.
if (bglobal.freeze || level.flags & LEVEL_FROZEN)
{
return;
}
}
UnlinkFromWorld ();
flags |= MF_NOBLOCKMAP;
x += momx;
@ -2524,6 +2537,7 @@ void AActor::Tick ()
}
}
if (cl_rockettrails & 2)
{
if (effects & FX_ROCKET)
@ -3464,6 +3478,7 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer)
( deathmatch == false ) &&
( gameaction != ga_worlddone ) &&
( p->mo != NULL ) &&
( !(p->mo->Sector->Flags & SECF_NORESPAWN) ) &&
( (p->mo->Sector->special & 255) != Damage_InstantDeath ))
{
spawn_x = p->mo->x;

View file

@ -924,6 +924,10 @@ struct UDMFParser
Flag(sec->Flags, SECF_SILENT, key);
break;
case NAME_NoRespawn:
Flag(sec->Flags, SECF_NORESPAWN, key);
break;
case NAME_Nofallingdamage:
Flag(sec->Flags, SECF_NOFALLINGDAMAGE, key);
break;

View file

@ -253,6 +253,7 @@ enum
SECF_SILENT = 1, // actors in sector make no noise
SECF_NOFALLINGDAMAGE= 2, // No falling damage in this sector
SECF_FLOORDROP = 4, // all actors standing on this floor will remain on it when it lowers very fast.
SECF_NORESPAWN = 8, // players can not respawn in this sector
};
enum

View file

@ -146,4 +146,12 @@ ACTOR FastProjectile native
Projectile
}
// Sector flag setter -----------------------------------------------------------
ACTOR SectorFlagSetter 9041 native
{
+NOBLOCKMAP
+NOGRAVITY
+DONTSPLASH
RenderStyle None
}