Sector
A sector is an enclosed area made up of lines in the map. Sectors are referenced by the sidedefs linked to the enclosing linedefs. Sectors must be closed areas, as in all sidedefs that reference them must make up one or more closed shapes. Note that having unclosed sectors is possible, and can be used for a few special effects, but can cause unpredictable results, including crashes, if used incorrectly.
A sector does not need to enclose only one area of the map. To avoid redundancy, two separate areas of the map can be defined by one sector, thus copying all the properties of one area to the other. However, the engine treats these separate shapes as the same sector. For instance, sounds entering one area of the sector will be heard by enemies in the other. This can be used intentionally to allow sounds generated in one area of the map to alert enemies in another, unconnected area. If two doors are the same sector, using Door_Raise on either door will cause both to open.
Specification
| Bytes | Data type | Description | Notes |
|---|---|---|---|
| 0-1 | short | Floor height | |
| 2-3 | short | Ceiling height | |
| 4-11 | char | Floor texture | |
| 12-19 | char | Ceiling texture | |
| 20-21 | short | Light level | Vanilla Doom rounded the light level to the nearest multiple of 8, ZDoom shows unique light levels for all 256 values |
| 22-23 | short | Sector special | |
| 24-25 | short | Sector tag | For use with Action specials that refer to a sector by its tag |
