Structs:Sector
Sector contains information related to a sector including colors, specials, floor and ceiling plane data, lines, etc. The current map's sectors can be accessed through LevelLocal's Sectors array. Many values can be directly modified here allowing for a large amount of control over a sector from within ZScript.
Fields
- readonly FColormap ColorMap - A struct that contains information related to the colormap of the current sector
- Color LightColor - The current ARGB color of the sector
- Color FadeColor - The current ARGB of the sector's fade
- uint8 Desaturation - The current level of desaturation in the sector
- uint8 BlendFactor - The current amount of blending in the sector
- uint16 FogDensity - How thick the fog density currently is in the sector
- readonly Color SpecialColors[5] - An array that stores individual ARGB colors for the floor, ceiling, top of the walls, bottom of the walls, and sprites respectively in the sector
- readonly Color AdditiveColors[5] - Same as SpecialColors but stores additive color values instead of blended
- Actor SoundTarget - Used for sound checking when an enemy calls A_Look. This is used to determine who last made a sound that propagated to this sector
- int special - The special action that the sector currently has
- int16 lightlevel - The current brightness of the sector
- int16 seqType - The current type of light sequence in the sector
- int sky - Which MAPINFO sky is being displayed. 0 for Sky1, 0x40000000 for Sky2
- Name SeqName - The name of the sector's current light sequence
- readonly Vector2 centerspot - The pre-calculated center of the sector. Note that this is not guaranteed to be in the sector itself if it has holes in its middle
- int validcount - Used to keep track of whether or not the sector has already been visited across various functions
- Actor thinglist - Stores a pointer to the head of the linked list of all Actors in the sector. Each Actor stores the next one in its snext pointer
- double friction - The friction factor of the sector
- double movefactor - The movement speed factor of the sector
- int terrainnum[2] - The index for the Sector's floor and ceiling TerrainDefs respectively in the Terrains global array. -1 if none is present
- SectorEffect floordata - Stores information about the sector's current floor action e.g. when it's raising
- SectorEffect ceilingdata - Stores information about the sector's current ceiling action e.g. when it's crushing
- SectorEffect lightingdata - Stores information about the sector's current lighting action e.g. when lights are strobing
- uint8 soundtraversed - Determines whether or not the sector has already been traversed when propagating sounds
- int8 stairlock - If -2, the sector is currently building stairs. If -1, it is done building and waiting for connected stair sectors to finish. If 0, it's not building stairs at all
- int prevsec - Index of the previous linked sector in the Sectors global array
- int nextsec - Index of the next linked sector in the Sectors global array
- readonly Array<Line> lines - An array that contains all the lines linked to the sector
- readonly @SecPlane floorplane - Pointer to the plane that makes up the sector's floor
- readonly @SecPlane ceilingplane - Pointer to the plane that makes up the sector's ceiling
- readonly Sector heightsec - Pointer to the control sector used when transferring sector height (e.g. with Boom's deep water)
- uint bottommap - Special blend to use when viewer is below the floor. Used with height control sectors
- uint midmap - Special blend to use when viewer is in the sector. Used with height control sectors
- uint topmap - Special blend to use when viewer is above the ceiling. Used with height control sectors
- double gravity - The gravity factor in this sector
- Name damagetype - The name of the damage type applied when this sector hurts an Actor
- int damageamount - The amount of damage this sector deals when it hurts an Actor
- int16 damageinterval - The interval in tics that this sector damages Actors
- int16 leakydamage - Chance sector leaks damage through the radiation suit
- readonly uint16 ZoneNumber - Index of the sector's sound environment in the Zones array (array is currently inaccessible)
- readonly int healthceiling - The current health of the sector's ceiling
- readonly int healthfloor - The current health of the sector's floor
- readonly int healthceilinggroup - The id of the geometry the ceiling is linked to when it takes damage
- readonly int healthfloorgroup - The id of the geometry the floor is linked to when it takes damage
- uint Flags - Contains flags related to the sector
- SECF_SILENT - Actors in this sector make no noise
- SECF_NOFALLINGDAMAGE - Disable falling damage in this sector
- SECF_FLOORDROP - Keep any Actors attached to the floor when lowering quickly
- SECF_NORESPAWN - Player cannot respawn in this sector
- SECF_FRICTION - Enable friction in this sector
- SECF_PUSH - Enable pushers in this sector
- SECF_SILENTMOVE - Sector makes no sound when moving
- SECF_DMGTERRAINFX - When damage is inflicted by the sector, spawn the associated terrain splash
- SECF_ENDGODMODE - The sector ends god mode of any Actor damaged by it
- SECF_ENDLEVEL - If health is below 10, end the current level
- SECF_HAZARD - Use Strife's sector damage handling instead of regular sector damage
- SECF_NOATTACK - Monsters can't start attacks when in this sector
- SECF_WASSECRET - The sector was a secret that got discovered
- SECF_SECRET - The sector is currently still considered a secret
- SECF_DAMAGEFLAGS - Combination of SECF_ENDGODMODE, SECF_ENDLEVEL, SECF_DMGTERRAINFX, and SECF_HAZARD
- SECF_NOMODIFY - Combination of SECF_SECRET and SECF_WASSECRET
- SECF_SPECIALFLAGS - Combination of SECF_DAMAGEFLAGS, SECF_FRICTION, and SECF_PUSH
- uint16 MoreFlags - Contains additional flags related to the sector
- SECMF_FAKEFLOORONLY - If a height control sector, only transfer the floor
- SECMF_CLIPFAKEPLANES - If a height control sector, clip floor and ceiling to target sector's
- SECMF_NOFAKELIGHT - If a height control sector, don't transfer light level
- SECMF_IGNOREHEIGHTSEC - If a height sector, only trigger sector actions and nothing else
- SECMF_UNDERWATER - Sector is considered under water
- SECMF_FORCEDUNDERWATER - Forcefully consider the sector under water
- SECMF_UNDERWATERMASK - Combination of SECMF_UNDERWATER and SECMF_FORCEDUNDERWATER
- SECMF_DRAWN - The sector has been rendered at least once
- SECMF_HIDDEN - Don't draw this sector's textures on the automap
- SectorAction SecActTarget - The SectorAction that gets activated when its specific sector action requirement is met (e.g. something hits the floor). If there are multiple SectorActions present, they're stored in a linked list where each SectorAction stores the next one in its tracer field
- internal uint Portals[2] - The index for the Sector's floor and ceiling SectorPortal respectively in the SectorPortals global array. 0 if none is present
- readonly int PortalGroup - The id the sector uses to connect it to other portal-linked sectors
- readonly int sectornum - The index of the sector in the Sectors global array
Methods
Non-static
- int Index()
- double, Sector, F3DFloor NextHighestCeilingAt(double x, double y, double bottomz, double topz, int flags = 0)
- double, Sector, F3DFloor NextLowestFloorAt(double x, double y, double z, int flags = 0, double steph = 0)
- F3DFloor Get3DFloor(int index)
- int Get3DFloorCount()
- Sector GetAttached(int index)
- int GetAttachedCount()
- void RemoveForceField()
- bool PlaneMoving(int pos)
- int GetFloorLight()
- int GetCeilingLight()
- Sector GetHeightSec()
- void TransferSpecial(Sector model)
- void GetSpecial(out SecSpecial spec)
- void SetSpecial(SecSpecial spec)
- int GetTerrain(int pos)
- TerrainDef GetFloorTerrain(int pos)
- void CheckPortalPlane(int plane)
- double, Sector HighestCeilingAt(Vector2 a)
- double, Sector LowestFloorAt(Vector2 a)
- double, double GetFriction(int plane)
- void SetXOffset(int pos, double o)
- void AddXOffset(int pos, double o)
- double GetXOffset(int pos)
- void SetYOffset(int pos, double o)
- void AddYOffset(int pos, double o)
- double GetYOffset(int pos, bool addbase = true)
- void SetXScale(int pos, double o)
- double GetXScale(int pos)
- void SetYScale(int pos, double o)
- double GetYScale(int pos)
- void SetAngle(int pos, double o)
- double GetAngle(int pos, bool addbase = true)
- void SetBase(int pos, double y, double o)
- void SetAlpha(int pos, double o)
- double GetAlpha(int pos)
- int GetFlags(int pos)
- int GetVisFlags(int pos)
- void ChangeFlags(int pos, int And, int Or)
- int GetPlaneLight(int pos)
- void SetPlaneLight(int pos, int level)
- void SetColor(Color c, int desat = 0)
- void SetFade(Color c)
- void SetFogDensity(int dens)
- double GetGlowHeight(int pos)
- Color GetGlowColor(int pos)
- void SetGlowHeight(int pos, double height)
- void SetGlowColor(int pos, Color color)
- void SetSpecialColor(int pos, Color color)
- void SetAdditiveColor(int pos, Color color)
- void SetColorization(int tier, Name cname)
- TextureID GetTexture(int pos)
- void SetTexture(int pos, TextureID tex, bool floorclip = true)
- double GetPlaneTexZ(int pos)
- void SetPlaneTexZ(int pos, double val, bool dirtify = false)
- void ChangeLightLevel(int newval)
- void SetLightLevel(int newval)
- int GetLightLevel()
- void AdjustFloorClip()
- bool IsLinked(Sector other, bool ceiling)
- bool PortalBlocksView(int plane)
- bool PortalBlocksSight(int plane)
- bool PortalBlocksMovement(int plane)
- bool PortalBlocksSound(int plane)
- bool PortalIsLinked(int plane)
- void ClearPortal(int plane)
- double GetPortalPlaneZ(int plane)
- Vector2 GetPortalDisplacement(int plane)
- int GetPortalType(int plane)
- int GetOppositePortalGroup(int plane)
- double CenterFloor()
- double CenterCeiling()
- int MoveFloor(double speed, double dest, int crush, int direction, bool hexencrush, bool instant = false)
- int MoveCeiling(double speed, double dest, int crush, int direction, bool hexencrush)
- Sector NextSpecialSector(int type, Sector prev)
- double, Vertex FindLowestFloorSurrounding()
- double, Vertex FindHighestFloorSurrounding()
- double, Vertex FindNextHighestFloor()
- double, Vertex FindNextLowestFloor()
- double, Vertex FindLowestCeilingSurrounding()
- double, Vertex FindHighestCeilingSurrounding()
- double, Vertex FindNextHighestCeiling()
- double, Vertex FindNextLowestCeiling()
- double FindShortestTextureAround()
- double FindShortestUpperAround()
- Sector FindModelFloorSector(double floordestheight)
- Sector FindModelCeilingSector(double floordestheight)
- int FindMinSurroundingLight(int max)
- double, Vertex FindLowestCeilingPoint()
- double, Vertex FindHighestFloorPoint()
- void SetEnvironment(string env)
- void SetEnvironmentID(int envnum)
- SeqNode StartSoundSequenceID(int chan, int sequence, int type, int modenum, bool nostop = false)
- SeqNode StartSoundSequence(int chan, Name seqname, int modenum)
- SeqNode CheckSoundSequence(int chan)
- void StopSoundSequence(int chan)
- bool IsMakingLoopingSound()
- bool IsSecret()
- bool WasSecret()
- void ClearSecret()
- int GetUDMFInt(Name nm)
- double GetUDMFFloat(Name nm)
- string GetUDMFString(Name nm)
- bool TriggerSectorActions(Actor thing, int activation)
- int GetHealth(SectorPart part)
- void SetHealth(SectorPart part, int newhealth)
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.