//       **********   R3D file - DO NOT EDIT  ************
//                 First written: December 2013
//                   Last update: November 2021

// Only compatible with v220-35

// Used with structures that either do not justify or would require
// a disproportionally complex analysis routine or are incompatible
// with other routines or are map errors that cannot be reliably
// detected or that rely on DOOM bugs not supported by Risen3D.

// -----------------------------------------------------------------

Version 4

// IWADS ===========================================================

[DOOM]
E4M3 {
	156 461 822 1440 1219
	movemobj 69 -652 -1692
}
E4M7 {
	288 629 1371 2273 1981
	movemobj 236 108 -1472
}

[DOOM2]
map02 {
	97 215 523 821 715
	movemobj 68 246 990
	movemobj 69 464 797
	movemobj 70 357 715
	movemobj 71 359 542
	movemobj 73 865 517
	movemobj 74 140 1040
	movemobj 75 559 516
	movemobj 76 721 515
	movemobj 77 243 -88
	movemobj 84 992 901
}	
map04 {
	122 242 591 844 780
	fn_setssec 72 70 1
	fn_setssec 76 70 1
	movemobj 137 -360 1080
	movemobj 136 -360 880
}
map05 {
	176 411 958 1442 1291
	movemobj 107 2848 -336
}
map06 {
	183 470 1011 1646 1409
	movemobj 244 1264 344
}
map14 {
	348 824 1681 2980 2591
	movemobj 24 1400 240
	movemobj 26 1128 456
	movemobj 27 1400 456
	movemobj 30 1924 36
	movemobj 31 2148 36
}
map16 {
	142 425 778 1300 1089
	movemobj 8 160 -756
}
map18 {
	108 400 774 1228 986
	movemobj 213 -2048 992
	movemobj 214 -2120 928
}
map28 {
	116 451 745 1279 1057
	movemobj 96 413 807
}
map31 {
	80 209 686 827 783
	movemobj 59 1376 736
	movemobj 79 1472 320
}

[TNT]
map01 {
	134 312 591 1058 876
	movemobj 2 -348 232
	movemobj 3 -348 472
}
map06 {
	189 408 1004 1497 1346
	movemobj 74 -896 -288
}
map08 {
	421 821 1570 2903 2478
	changesecheight 211 0 10
	changesecheight 215 0 10
	changesecheight 219 0 10
	changesecheight 223 0 10
}	
map09 {
	439 977 2214 3561 3171
	setheightsec 202 177
}
map11 {
	274 810 1617 2959 2541
	movemobj 314 1624 928
	movemobj 315 1832 928
}
map15 {
	336 936 1421 2719 2201
	movemobj 25 2592 2816
}
map18 {
	370 1378 2642 4546 3903
	nomisslosec 23
	nomisslosec 25
	nomisslosec 352
	nomisslosec 353
}
map19 {
	489 1326 2516 4639 3828
	setheightsec 405 379
	movemobj 1 -208 -3280
}
map24 {
	151 580 961 1786 1458
	movemobj 158 -940 1712
	movemobj 165 28 1288
	movemobj 168 20 1144
	movemobj 258 -1280 1188
	movemobj 206 -947 1488
}
map26 {
	320 989 1709 3050 2425
	movemobj 238 -1808 -1040
}
map31 {
	376 1564 2712 5103 4050

	nomisshisec 169
	nomisshisec 170
	nomisshisec 171
	nomisshisec 172
	nomisshisec 173
	nomisshisec 174
}
map32 {
	256 988 1600 2999 2489
	movemobj 359 838 7998
}
	
[PLUTONIA]
map09 {
	147 752 1281 2289 1941
	movemobj 304 -6411 -1568
}
	
// PWADS ===========================================================

[1024]
map15 {
	338 1927 2090 6072 3792
	
	changesecheight 34 1 296
	changesecheight 100 1 296
	changesecheight 248 1 296
	changesecheight 274 1 292
	changesecheight 275 1 296
	
}

[10SECTOR]
map27 {
	10 2910 4745 8824 6684
	setssec  819 2 2
	setssec  863 2 2
	setssec 1049 2 2
	setssec 1065 2 2
}

[2ND_ENC]
map03 {
	191 449 1236 1665 1555
	movemobj 314 -1344 -1984
}
map08 {
	52 170 479 608 580
	movemobj 134 2144 128
}
map23 {
	174 467 1034 1573 1422
	movemobj 319 -800 3680
}

[AALIENS]
// mapall must be first definition else it will not be processed
mapall {
	radiusfix 33
	radiusfix 43
	radiusfix 54
}
map16 {
	3010 25904 23210 69343 41773
	setheightsec 2849 36
}
map17 {
	1107 10755 9838 31085 17144
	fn_setssec 1067 1076 1
}
map23 {
	3152 17050 21327 49966 37982
// analysis aid
	fn_setssec  50 406 2	fn_setssec  875 406 2	fn_setssec  751 406 2
	fn_setssec 823 406 2	fn_setssec  511 406 2	fn_setssec  440 406 2
	fn_setssec 900 406 2	fn_setssec  497 406 2	fn_setssec  968 406 2
	fn_setssec 769 406 2	fn_setssec  607 406 2	fn_setssec  877 406 2
	fn_setssec 140 406 2	fn_setssec  145 406 2	fn_setssec  543 406 2
	fn_setssec 341 406 2	fn_setssec  274 406 2	fn_setssec  724 406 2
	fn_setssec 187 406 2	fn_setssec  158 406 2	fn_setssec  266 406 2
	fn_setssec 501 406 2	fn_setssec  521 406 2	fn_setssec  843 406 2
	fn_setssec 623 406 2	fn_setssec  143 406 2	fn_setssec  431 406 2
	fn_setssec 421 406 2	fn_setssec  524 406 2	fn_setssec  175 406 2
	fn_setssec 380 406 2	fn_setssec   45 406 2	fn_setssec  807 406 2
	fn_setssec 203 406 2	fn_setssec  630 406 2	fn_setssec   35 406 2
	fn_setssec 540 406 2	fn_setssec  391 406 2	fn_setssec  580 406 2
	fn_setssec 828 406 2	fn_setssec  475 406 2	fn_setssec  169 406 2
	fn_setssec 955 406 2	fn_setssec  849 406 2	fn_setssec  708 406 2
	fn_setssec 489 406 2	fn_setssec  453 406 2	fn_setssec  300 406 2
	fn_setssec 254 406 2	fn_setssec 1084 406 2	fn_setssec  457 406 2
	fn_setssec 481 406 2	fn_setssec  658 406 2	fn_setssec 1157 406 2
	fn_setssec 134 406 2	fn_setssec  487 406 2	fn_setssec  447 406 2
	fn_setssec 307 406 2	fn_setssec  484 406 2	fn_setssec 1016 406 2
}
map24 {
	3143 21489 20753 54937 38962
// Fix map errors (only because we care) caused by several lines e.g.
// L20306 having the incorrect frontsector assigned by changing the
// ssecs' sector pointers that reference these lines.

// With lines that should have had S3048
	setssec 21033 3048 4 setssec 21121 3048 4 setssec 21145 3048 4

// With lines that should have had S3051
	setssec 17436 3051 4 setssec 17443 3051 4 setssec 17564 3051 4
	setssec 17580 3051 4 setssec 20132 3051 4 setssec 20184 3051 4
	setssec 20212 3051 4 setssec 20248 3051 4 setssec 20298 3051 4
	setssec 20315 3051 4 setssec 20333 3051 4

// With lines that should have had S3053
	setssec 20478 3053 4 setssec 20482 3053 4 setssec 20492 3053 4
	setssec 20539 3053 4 setssec 20546 3053 4 setssec 20646 3053 4
	setssec 20647 3053 4 setssec 20657 3053 4 setssec 20722 3053 4
	setssec 20752 3053 4 setssec 20785 3053 4

// With lines that should have had S3058
	setssec 20850 3058 4 setssec 20886 3058 4 setssec 20964 3058 4
	setssec 20974 3058 4 setssec 21407 3058 4

// With lines that should have had S3059
	setssec 21364 3059 4 setssec 21377 3059 4 setssec 21453 3059 4
}

[ABYSPE18]
map17 {
	188 1133 1300 3198 2266

// Fix a rendering error in S79 caused by the lines in S136 having
// the wrong backsector. This adversely affected all node builders
// tested.
	customloop 79 4 510 512 513 514
	changessec 79
	secfixed 79	
	secfixed 136	
}

[ADSP]
map03 {
	134 1069 2071 3698 3284

// Set ssec references here rather than having yet another
// analysis function (1001 ways to do the same thing)
	checksec 3 96 32 FLAT23 FLAT23
	checksec 5 33 33 FLAT23 FLAT23
	setsec 3 5 3
	checksec 11 96 32 FLAT23 FLAT23
	checksec 12 33 33 FLAT23 FLAT23
	setsec 11 12 3
}

[ARCTLEV]
map15 {
	168 570 904 1890 1469
	movemobj 151 20811 -3767
}

map27 {
	61 368 402 1162 754
	largestloop 2 3
	lfsec 15 -1
	secdone 0
	secdone 2
}

[ASH2ASH]
map01 { 
	866 5677 8740 18771 14134
	// Untagged superfluous sector 434's ssecs changed to S519
	// as this should be rendered the same as S519.
	largestloop 434 1
	changessec 519
	marklines
}

[ASTRO]
map02 {
	623 2106 3041 5740 4691
	movemobj 373 -4047 853
	movemobj 569 -4112 853
}
map06 {
	752 1835 3469 6198 5232
	movemobj 51 -1456 836
	movemobj 53 -1360 836
	movemobj 50 -1264 836
	movemobj 54 -1168 836
	movemobj 52 -1072 836
	movemobj 55 -1456 -1220
	movemobj 56 -1360 -1220
	movemobj 57 -1264 -1220
	movemobj 58 -1168 -1220
	movemobj 59 -1072 -1220
}
map08 {
	253 579 1256 2135 1780
	movemobj 11 150 -576
	movemobj 178 1002 -576
}
map10 {
	418 1009 2058 3537 2956
	movemobj 170 6956 1405
	movemobj 250 6956 1496
}

[ASTRO3]
map16 {
	331 615 1574 2369 2128
	movemobj 310 2496 -1260
}

[AV]
map05 {
	243 1032 2328 4106 3441
// move red and yellow skullkeys so they can be picked up
	movemobj  4  528  -1872
	movemobj 21 2456  -1388
}
map15 {
	399 1856 3435 6231 5144

// Fix ceiling error caused by line sector error
	checksec 107 64 -8 CEIL5_2 LAVA1
	checksec 119 8 8 CEIL5_2 CEIL5_2
	setssec 549 107 2
	setssec 557 107 2
}
map23 {
	664 4029 5295 11876 8569

// Fix problem with trigger lines that can never be crossed
// How this worked in any port is a mystery
	triggerDirect 2686
	triggerDirect 3044
	triggerDirect 3046
	triggerDirect 3053
	triggerDirect 3054
	triggerDirect 3055
}

[BARRACKS]
map01 {
	1502 5757 8385 18464 13607
	changesecheight 25 1 128
	changesecheight 26 1 128
	fn_setssec 23 26 1
}

[BATMAN]
map29 {
	201 745 1101 2293 1796
	fracprojectback 988
}

[CCHEST2]
map10 {
	361 978 1752 3363 2779

// Fix problem caused by sectors having the wrong ceiling
// heights and having lines with unwanted textures.
	checksec 39 512  0 CEIL5_2 FLOOR5_4
	checksec 48 512 16 CEIL5_2 CRATOP1
	checksec 56 528  0 CEIL5_2 FLOOR5_4
	checksec 66 512 48 CEIL5_2 CRATOP1
	checksec 67 512 32 CEIL5_2 CRATOP1
	fn_setssec 39 47 2
	marklines
	fn_setssec 48 47 2
	marklines
	fn_setssec 56 47 2
	marklines
	fn_setssec 66 47 2
	marklines
	fn_setssec 67 47 2
	marklines
}

// Duplicate of the above for CCHEST2 needed if the
// update for map24 has been added (cc2_m24f.wad) as
// this will change the analysis file name.
[CC2_M24F]
map10 {
	361 978 1752 3363 2779

// Fix problem caused by sectors having the wrong ceiling
// heights and having lines with unwanted textures.
	checksec 39 512  0 CEIL5_2 FLOOR5_4
	checksec 48 512 16 CEIL5_2 CRATOP1
	checksec 56 528  0 CEIL5_2 FLOOR5_4
	checksec 66 512 48 CEIL5_2 CRATOP1
	checksec 67 512 32 CEIL5_2 CRATOP1
	fn_setssec 39 47 2
	marklines
	fn_setssec 48 47 2
	marklines
	fn_setssec 56 47 2
	marklines
	fn_setssec 66 47 2
	marklines
	fn_setssec 67 47 2
	marklines
}

[CCHEST3]
map16 {
	847 5039 7114 15776 11716

// Fix problem caused by sector not being tagged to line
// special 271
	checksec 754 248 248 F_SKY1 ADEL_F36
	setsky 754 TNTSKY1 0 0
}

[CODLEV]
map01 {
	564 3159 5203 9700 8037
	fn_setssec 405 405 8
	marklines
}

map04 {
	972 8873 11459 25116 18284

	addtex 8505 1 0 SUPPORT2
	addtex 8506 1 0 SUPPORT2
	addtex 10397 1 2 RAILIN2
	addtex 10398 1 2 RAILIN2
	addtex 10399 1 2 RAILIN2
	addtex 10400 1 2 RAILIN2
	changesecheight 934 1 122
	changesecheight 871 0 84 
	changesecheight 871 1 110
	changesecheight 872 0 90
	movemobj 424 5124 3092
	movemobj 427 5621 3079
} 

map05 {
	1156 5571 8071 17207 13644

	changesecheight 1124 0 -260
}

map07 {
	716 10084 12914 31571 22444

	addtex 1529 0 2 ADEL_Y08
	addtex 1529 1 2 ADEL_Y08
	addtex 2504 0 2 ADEL_Y08
	addtex 2504 1 2 ADEL_Y08
}

map08 {
	1000 9432 10299 24250 18215

	movemobj 457 -1186 -186
	movemobj 458 -1183 -231
}

map09 {
	1135 12186 18488 37682 28856

	addtex 9306 0 0 METAL
	addtex 9307 0 0 METAL
	addtex 4693 0 2 ADEL_Y05
	addtex 4693 1 2 ADEL_Y05
	addtex 4690 0 2 ADEL_Y05
	addtex 4690 1 2 ADEL_Y05
	addtex 4687 0 2 ADEL_Y05
	addtex 4687 1 2 ADEL_Y05
	addtex 4684 0 2 ADEL_Y05
	addtex 4684 1 2 ADEL_Y05
	addtex 9687 0 2 STEPTOP
	addtex 9687 1 2 STEPTOP
	addtex 9686 0 2 STEPTOP
	addtex 9686 1 2 STEPTOP
	addtex 9685 0 2 STEPTOP
	addtex 9685 1 2 STEPTOP
	addtex 9684 0 2 STEPTOP
	addtex 9684 1 2 STEPTOP
	addtex 9683 0 2 STEPTOP
	addtex 9683 1 2 STEPTOP
	addtex 9357 0 2 STEPTOP
	addtex 9357 1 2 STEPTOP
	setceillightsec 261 260
	setceillightsec 256 260
	setceillightsec 257 260
	setceillightsec 258 260
}

map12 {
	251 3676 4219 11978 8353

	fn_setssec  227 20 2
	fn_setssec  226 20 2
	fn_setssec  221 20 2
	fn_setssec  233 20 2
	fn_setssec  222 20 2
	fn_setssec  224 20 2
	fn_setssec  225 20 2
	fn_setssec  226 20 2
	fn_setssec  223 20 2
	fn_setssec  247 20 2
}

[CPD]
map32 {
	296 763 1462 2633 2178
	secdone 195
}

[D2INO]
map15 {
	1013 3617 6597 12512 9742
// move mobjs that overlap each other
	movemobj 527 812 6196
	movemobj 528 1076 5932
	movemobj 533 -1524 5932
	movemobj 742 -1264 6196
}

[DARKEN2]
// Analysis aids
map08 {
	265 1181 2572 4127 3514
	fn_setssec 175 176 1
	fn_setssec 178 176 1
}

map09 {
	914 3191 5550 10281 8465
	linemark 2875 29
	linemark 2876 29
	linemark 2877 29
	linemark 2878 29
}

map10 {
	235 1159 2476 3868 3378
	fn_setssec 23 20 1
}

[DISTRBIA]
map01 {
	2596 11250 15409 33405 25824
	fn_setssecind 2378 1284 1284 -1 -1
}

[DISTURBIAV2]
map01 {
	2612 11364 15457 33436 25922
	fn_setssecind 2378 1284 1284 -1 -1
}

[DOOMZERO]
mapall {
	radiusfix 88
}

[DOTB_RC3]
map05{
	1770 6046 8422 19161 14645
	skyflatnum AAVOID 0
}

[DRCRYPT]
map01 {
	431 3295 4598 10157 7754
// Minor glitch with trick sector ceiling fix.
	changesecheight 217 1 288
	changesecheight 218 1 288
	changesec 211 NONE FLAT23
}

[E1M8B]
e1m8 {
	601 3593 4011 10372 6710
// Fix what appears to be an error in Romero's map.
// S261's floorheight should be -16 not -24.
// This looks wrong when S260 has lowered in all ports
// hence our suspecting that this was a map oversight.
	changesecheight 261 0 -16
}

[EARTH]
map01 {
	355 1556 1699 4463 2613
// This map, extraordinary in its day, given it will work with
// Vanilla Doom2, was designed before Lee Killough's enhanced
// Doom port, MBF, had become widely adopted. Today MBF's
// enhancements, plus other additions made by team TNT to fix
// Doom2 bugs, have been incorporated into most ports.

// Had the MBF sector heights function been used then the whole
// area the changes address would have been much easier and less
// complex to design. But we have to live with what we have got.
	largestloop 203 1
	changessec 204
	basesec 199 1
	setssec 871 246 4
	setssec 872 246 4
	marklines
	secdone 203
	secdone 204
	secdone 208
}

[ETERNALL]
map12 {
	963 2470 4920 8105 6649
// analysis aid 
	fn_setssec 657 308 1	
	fn_setssec 658 308 1	
}	
map25 {
	889 2975 4792 9752 7407
	checksec 417 228 172 FLOOR7_1 FLOOR7_1
	checksec 659 276 172 FLOOR7_1 FLOOR7_1
// Analysis aids
	fn_setssec 457 727 1
	fn_setssec 457 413 2
	fn_setssec 269 259 2
// map ceiling height errors
	changesecheight 737 1 532
	changesecheight 738 1 532
	changesecheight 739 1 532
}
map26 {
	752 2472 3595 7063 5338
// Nodes build issue around S552 and S691
// Note: caused by map design although zdbsp nodes
// are used (see R3D_modify) R3Dglbsp also has trouble.
	setssec 1483 382 4	// fix assignment error
	setssec 1485 382 4	// fix assignment error
	setssec 1491 382 3	// set rendering sector
	setssec 2421 619 4	// fix assignment error
// Rendering error caused by missing tex when sector drops
	addtex 2701 1 0 SOLD5A
	addtex 2704 1 0 SOLD5A
// Analysis aid
	fn_setssec 511 467 2
	fixsseccsec
}

[ELEVENZERO]
map01 {
	1071 5109 5478 12747 10181
	fracprojectback 2080
	fracprojectback 3238
}

[EVITERNITY]
map30 {
	96 2408 2167 6521 4075
	noMovUnset
}

[freedoom1PWAD]
E3M4 {
	724 2298 3946 7673 6029
	secdone 147
}

[HC092604]
map08 {
    998 4324 6000 13901 9734
    fn_setssec 198 205 2
}

[HEDROX2]
map01 {
	6260 19638 31393 68190 53868
	addtex 5403 1 1 STEP4
	addtex 5502 1 1 STEP4
}

[HERIAN2]
map27 {
	507 1858 2217 5181 3699

// Fix rendering issue with bad map construction for S386
	setheightsec 386 407
	lineoffset 1683 0 0 -336
	lineoffset 1683 1 0 -336
	addtex 1683 0 2 MBEAM2
	addtex 1683 1 2 MBEAM2
	addtex 1685 0 2 MBEAM2
	addtex 1685 1 2 MBEAM2
	addtex 1738 0 2 MBEAM2
	addtex 1738 1 2 MBEAM2
}

[HG]
map01 {
	1086 9752 12243 29294 21516

// Fix problem with trigger lines that can never be crossed
	triggerDirect 2849
	triggerDirect 2850	// This one can usually be crossed but just in case...
}

[HR2FINAL]
map01 {
	184 690 1178 2297 1921
// Fill ugly gaps surrounding S96
	setssecinlist 96 2 {231 233 234 249 250 252 257 259}
}

[HTP-RAW]
map20 {
	468 1449 2221 4896 3765
	setssec 972 371 1
}
map27 {
	89 416 634 1323 1038
	setsec 16 27 1
}

[HUNT]
map05 {
	165 503 1227 1646 1526
	movemobj 201 -32 -4230
}

[ICAR2015]
map01 {
	147 423 851 1410 1212
	fn_setssec 96 94 1
	linemark 568 63
	linemark 569 63
	linemark 562 54
	linemark 567 54
	secdone 96
}
map04 {
	225 574 1332 2150 1883
	setssecsinboxsec 56 -1 56 -1 -1
}
map09 {
	385 1170 2447 4196 3529
	setssecsinboxsec 224 -1 221 -1 -1
}
map11 {
	434 1629 2826 5382 4300
	linemark 1646 63
	linemark 1649 63
	linemark 1652 63
	linemark 1653 63
}

[INTERCEP]
map26 {
	1084 6377 8106 17976 12922

// prevent lines added in error to map being analysed
	linemark 1821 63
	linemark 1823 63

// Set false ceiling to sec 708 for all ssecs referencing lines in sec 866
	checksec 708 147 -101 RROCK05 BLOOD3
	checksec 866 651 -40 RROCK05 CEIL5_2
	fn_setssec 866 708 2
	setsec 415 921 2
}

map28 {
	1844 5373 8295 17655 13351
	
// Deal with overly complex starting area that defies all logic and
// lines at start with missing lo-tex that cause rendering problems
	checksec 3 128 0 FLOOR6_2 BLOOD1
	checksec 521 208 0 F_SKY1 BLOOD1
	checksec 19 32 0 FLOOR6_2 BLOOD1
	setsecfloor 3 25
	setsecfloor 3 1841
	setsecfloor 3 1842
	setsecfloor 19 20
	setsecfloor 19 26
	setsecfloor 19 28
	setsecfloor 19 1839
	setsecfloor 521 5
	setsecfloor 521 17
	secdone 5
	secdone 17
	secdone 19

	setssecsinboxsec 273 -1 -1 273 -1
	secdone 273
	secdone 276
	secdone 277
	secdone 280
	secdone 281
	setssecsinboxsec 283 -1 -1 283 -1
	secdone 270
	secdone 274
	secdone 279
	secdone 283
	secdone 285
	setssecsinboxsec 286 -1 -1 286 -1
	secdone 272
	secdone 275
	secdone 276
	secdone 284
	secdone 286
}

[INTERCEP2] 
map07 {
	427 2893 2717 8192 5095
	removemobj 4
	respawnmobj 1 469 475 83
}
map25 {
	733 5423 6650 15253 11420
	forceskywall{ 3636,
	3641, 3650, 3656, 3661.
	3665, 3673, 3808, 3803,
	3675, 3674, 3660, 3654,
	3646, 3639, 3638, 3637 }
}


"[MAYhem 2013]"
map02 {
// Part of fix to access the blue key (also see R3D_NodeFix).
// Unlike Doom the player in R3D is prevented from partly moving
// into a wall as this causes problems that have been noted with
// DOOM ports in general where the player can get stuck in a wall.
	582 2404 3734 7875 6158
	movemobj 130 1316 -136
}
map05 {
	980 4653 6322 15952 11642
	movemobj 49 -772 4760
	movemobj 50 -380 4760
}

[MAYhem17]
map26 {
612 5477 6026 16489 11143
movemobj 122 2016 -528
}
map31{
//	743 2979 3983 9798 7197 // zdbsp
	743 2979 3983 9798 7197 // glbsp
	setssecsinboxsec 20 -1 21 -1 -1
	secdone 21
	setssecsinboxsec 34 -1 35 -1 -1
	secdone 35
	setssecsinboxsec 134 -1 135 -1 -1
	secdone 135
	setssecsinboxsec 136 -1 137 -1 -1
	secdone 137
	setssecsinboxsec 292 -1 23 -1 -1
	secdone 23
	setssecsinboxsec 568 -1 548 -1 -1
	secdone 548
}

[MITNAL]
map01 {
	445 6862 4475 24268 7423
// overcome horrible trick that relies on software rendering
	setssec 1281 6 3
}

[MM]
map09 {
	515 1045 2225 3783 3240
	setssec 397 339 1
	setssec 526 339 1
}
map13 {
	468 1322 2444 4663 3745
	addtex 1057 0 0 SW1MET2
	addtex 1058 0 0 METAL2
	addtex 2403 0 0 METAL2
	addtex 2404 0 0 METAL2
	
}

[MM2]
map09 {
	444 1989 3405 6382 5206

// This is awkward. S318 (renumbered to 315 when nodes are built)
// is obscured by a software renderer drawing S234's ceiling
// until it reaches within 8 mapunits of S315's height at which
// point S315's sky ceiling prevails. The following forces R3D's
// renderer to draw a sky ceiling when the two heights match.
	checksec 231 -152 -280 CEIL5_2 SLIME05
	checksec 315 136 -280 F_SKY1 SLIME05
	fn_setssec 315 231 2
	forcesky 315
	marklines
}
map16 {
	424 767 1825 2857 2585
	setssec 705 284 1
	setssec 707 284 1
	setssec 716 284 1
	setssec 718 284 1
	setssec 750 284 1
	setssec 764 284 1
}

[MUTINY]
map01 {
	735 2649 4204 8254 6639
// analysis aid
	fn_setssec 279 470 17
}

map02 {
	812 3645 5210 11921 9108
// analysis aid
	setssecsinbox 1312 -416 128 128 233 811 -1 -1
	marklines
	secdone 235
	secdone 657
	secdone 810
	secdone 811
}

map06 {
	1882 6805 10168 22073 17024
// analysis aid
	fn_setssec 1105 1116 18
	marklines
	secdone 1105
	fn_setssec 1117 1116 18
	marklines
	secdone 1117
}

map10 {
	1290 3248 6169 11625 9552
// prevent analysis
	secdone 11
	secdone 12
	secdone 18
}

map11 {
	722 3471 5869 10685 8834
// analysis aid
	fn_setssec 100 173 17
	marklines
	fn_setssec 172 173 17
	marklines
	secdone 100
	secdone 172
	secdone 173
}

map12 {
	769 2160 3854 6899 5799
	fn_setssecind 451 13 13 -1 451
	marklines
	fn_setssecind 452 13 13 -1 452
	marklines
	secdone 451
	secdone 452
}

map14 {
	651 3737 4763 11889 8237
// analysis aid
	fn_setssec 152 169 17
	marklines
	secdone 152
	fn_setssec 164 150 17
	marklines
	secdone 164
// prevent analysis
	secdone 153
	secdone 240
}

[O34S]
map01 {
	5412 22036 32838 68656 56742

// Use R3D friendly MBF method to achieve floor/ceiling light differential
	changesecheight 3572 1 -960
	changesecheight 3600 1 -960
	changesecheight 3601 1 -960
	setceillightsec 3572 3573
	setceillightsec 3600 3573
	setceillightsec 3601 3573
}

[OVERDOSE]
map01 {
	4055 26182 30013 74921 57270

// Three nested loops formed from two sectors share common vertices
// which makes analysis more awkward. This is  rarely encountered so
// this method is used in place of having to have a function that
// would otherwise have to run, unnecessarily (to eliminate it being
// needed), for all other maps.
	checksec 3497   136  -368 F_SKY1  FWATER1
	checksec 4027  1024 -9999 F_SKY1  FWATER1
	checksec 4028 -9998 -9999 CEIL3_2 FWATER1
	customloop 4027 4 29850 29851 29852 29853
	fsec 3497 -1
	marklines
	secdone 4027
	secdone 4028
}

[PAR]
E1M6 {
	1157 12064 15122 39117 26644
	preventGlow { 869 878 879 896 900 }
	changesecheight 618 1 448
}
E1M7 {
	880 11785 15318 37806 27497
	setssecsinbox -3208 3248 16 168 -1 554 -1 554
}
E1M8 {
	469 8372 10982 27135 20453
	changesecheight 65 1 392
}
	
[PHOBOS]
map03 {
	364 1405 1972 4677 3079
	largestloop 291 1
	fsec 290 -1
	marklines
	marksectors
}

[PL2]
map30 {
	150 844 1102 2599 1945

// No analysis is wanted for the following sectors;
	secdone 6
	secfixed 110
	secfixed 111
	secfixed 112
	secfixed 113
	secfixed 114
	secfixed 115
	secfixed 117
	secfixed 118
	secfixed 136
	secfixed 145
	secfixed 146
	secfixed 149
// analysis aid
	linemarksec 33 22
// stop black lines being shown on RWBODY textures when hit by a rocket
	preventGlow { 1 79 106 }
}

[PW1FINAL]
map12 {
	77 259 490 853 716

// Fix issue with what one would expect to be a partially occluded sector
	checksec 30 40 -16 F_SKY1 FWATER1
	linemark 193 38
	secdone 30
}
map16 {
	389 2199 2903 6759 5039

// Fix awkward to analyse false ceiling sector
	checksec 60 864 -120 RROCK19 CEIL1_2
	checksec 67 408 -128 RROCK19 NUKAGE1
	setsec 67 60 2

// Deal with line that causes problems with gl nodes
	checksec 119 272 16 F_SKY1 GRASS1
	checksec 191 240 16 CEIL5_2 GRASS1
	fn_setsamelinessec 2216 191 119 3
}
map17 {
	449 2387 2810 6559 4731

// Blocking undrawn sectors normally have a gap of one map unit.
// In this case it is completely closed which R3D treats as
// occluding (but not other ports it would seem).
	setnoocclude 47
}

[REMNANT]
map01 {
	7159 33933 36840 93942 66629
	setssec 14247 6160 4
	setssec 14249 6161 4
}

[REQUIEM]
map21 {
	848 2569 4035 8189 6401
// map ceiling texture error
	changesec 693 NONE ADEL_F11
// rare occlusion issue
	setnoocclude 223
}

[SERENITY]
E3M3 {
	182 418 976 1496 1337

// analysis aid
	setnoocclude 118
	changesecheight 118 1 450
}

[SCRCHHET]
map01 {
	4903 17959 25682 56766 43138
	setssecsinbox -1208 -268 36 20 904 -1 -1 -1
}

[SCYTHE2]
map08 {
	538 1684 3059 6006 4776
	movemobj 127 48 2992
	movemobj 124 -640 3104
	movemobj 125 -480 3104
	movemobj 126 -224 3104
	movemobj 123 -640 2920
	movemobj 122 -640 2656
}

[SID]
map03 {
// fixes x offsets on lines 1954 and 1955
 1357 5434 10595 19358 16167
 secfixed 1075 
}

[SONGS]
// Note: map must be built with zdNodesGL (see R3D_modify)
//       or the following fix will be rejected.
map01 {
	1566 12204 16680 33871 27697
	checksec 601 208 40 IORI01 RROCK12
	checksec 659 208 40 IORI02 RROCK12
	checksec 1378 208 168 IORI02 F_SKY1
	checksec 1379 208 168 IORI01 F_SKY1
	fn_setssec 1378 659 1
	fn_setssec 1379 601 1
	secdone 601
	secdone 659
	secdone 1378
	secdone 1379
}

[SUNLUST]
map04 {
	1061 8473 9073 23606 16135
// In the map, in the S872 construct, several line pairs have had their vertices merged
// (e.g. L7906 has been merged with L7914). This results in different sectors being
// presented to the same subsector leading to 4 node build inconsistencies. The entries
// that follows corrects these.
	setssec 2242 871 4
	setssec 2283 871 4
	setssec 2565 871 4
	setssec 2578 871 4
}
map10 {
	887 8503 10226 24439 17969
// Use R3D friendly MBF method to achieve floor/ceiling light differential
	changesecheight 683 1 256
	changesecheight 684 1 256
	changesecheight 685 1 256
	setceillightsec 683 240
	setceillightsec 684 240
	setceillightsec 685 240
}
map16 {
	2378 17908 17684 47340 31603

// analysis aid
	fn_setssec  2229 1722 1
}	
map18 {
	1623 14503 13396 37989 25450
	largestloop 509 3
	lfsec 1520 -1
}
map27 { 
	2226 12627 15792 38596 28962
	
	// No analysis is wanted for the following sectors;
	secfixed 1040
	secfixed 1042
	secfixed 1871
	secfixed 1040
	secfixed 1042
	secfixed 1871
	secfixed 1870
	secfixed 1869
	secfixed 1868
	secfixed 1867
	secfixed 1866
	secfixed 1865
	secfixed 1864
	secfixed 1863
	secfixed 1862
	secfixed 1861
	secfixed 1860
	secfixed 1859
	secfixed 1858
	secfixed 1857
	secfixed 1856
	changesecheight 2049 0 73
}
map28 {
	3573 34681 34376 87403 64914
// fixes hom in ceiling	
	changesecheight 1985 1 80
	changesecheight  387 1 80
// while not accurate, removes spurious floor plane
	changesecheight 2042 0 -393
	changesecheight 2043 0 -393
	changesecheight 2044 0 -393
}
map30 {
	4304 26452 34605 84873 63566

	secdone 484
	secdone 799
	secdone 629
	secdone 800
}
map32 {
	1051 7922 8267 20904 14919
	
	changesecheight 989 1 384
	changesecheight 992 1 384
	changesecheight 991 1 384
// No analysis is wanted for the following sectors;
	secfixed 4
	secfixed 6
	secfixed 852
	secfixed 853
	secfixed 854
	secfixed 855
	secfixed 856
	secfixed 857
	secfixed 858
}

[TALOSL]
map15 {
	670 1659 2977 5545 4607

// Lines in wrong sector. Unfortunately this still works with the
// old software renderer preventing the author from realising that
// a map authoring error had been made. Wad version 1.2
	checksec 567 -280 -368 FLAT23 FLAT23
	checksec 572 -280 -368 FLAT23 FLAT23
	checksec 573 -268 -304 FLAT23 FLAT23
	checksec 574 -268 -304 FLAT23 FLAT23
	customloop 567 4 2428 2429 2430 2432
	csec 567 -1
	fsec 567 -1
	marklines
	customloop 572 4 2443 2444 2445 2446
	csec 572 -1
	fsec 572 -1
	marklines
	secdone 573
	secdone 574
}


[TV1998]
map15 {
	81 309 616 1049 921

// Fix lines in wrong sector
	customloop 26 4 273 317 318 319
	csec 26 -1
	marklines
	secdone 25
	secdone 26
	secdone 27
}

[THTTHREN]
map16 {
	1225 4295 6921 13920 11142
	setspriteheight 32 34
}
map19 {
	4795 22777 25071 68936 45716
	setssecsinbox -25 -345 114 50 120 -1 -1 -1
	changesseccsec 439 128
	changesseccsec 440 127
	changesseccsec 441 126
	changesseccsec 442 132
	changesseccsec 443 122
	changesseccsec 444 125
	changesseccsec 500 131
	secdone 120
	secdone 121
	secdone 122
	secdone 439
	secdone 440
	secdone 441
	secdone 443
	secdone 444
}

[UR_FINAL]
map16 {
	357 1594 2098 4979 3699

// missing tex sectors causing problems
	customloop 76 4 551 552 553 554
	exclude 96
	fsec 329 -1
	secdone 76
	customloop 75 4 555 556 557 558
	exclude 92
	fsec 329 -1
	secdone 75
	customloop 74 4 559 560 561 562
	exclude 93
	fsec 329 -1
	secdone 74
	customloop 67 4 563 564 565 566
	exclude 94
	fsec 329 -1
	secdone 67
	customloop 66 4 567 568 569 570
	exclude 95
	secdone 66
	customloop 77 4 571 572 573 574
	exclude 98
	fsec 329 -1
	secdone 77
	customloop 100 4 587 588 589 590
	exclude 96
	fsec 329 -1
	secdone 100
	customloop 101 4 535 536 537 538
	exclude 92
	fsec 329 -1
	secdone 101
	customloop 102 4 539 540 541 542
	exclude 93
	fsec 329 -1
	secdone 102
	customloop 103 4 543 544 545 546
	exclude 94
	fsec 329 -1
	secdone 103
	customloop 104 4 547 548 549 550
	exclude 95
	fsec 329 -1
	secdone 104
}
map17 {
	739 2694 4207 9533 6832

// Lines in S580 expected to have both sides set to 580
	setssecsinboxsec 580, -1, 560, -1, -1
}

[URANIA]
map04 {
	436 1681 3336 5389 4716
// Analysis aid
	fn_setssec 192 405 17
	marklines
	secdone 192
	secdone 405
}
map08 {
	236 1087 1889 3500 2888
// Analysis aid
	fn_setssec 17 20 2
	marklines
	secdone 17
// bridge sectors
	setssec  13  67 4
	setssec  18  67 4
	setssec  21  67 4
	setssec  37  67 4
	setssec  40  67 4
	setssec  41  67 4
	setssec 246 230 4
	setssec 231 230 4
	setssec 234 230 4
	setssec 235 230 4
	setssec 238 230 4
	setssec 243 230 4
	setssec 246 230 4
}
map14 {
	397 1369 2787 4532 3949
	fn_setssecind 291 -1 290 290 -1
	fn_setssecind 292 -1 290 290 -1
}

[VILE]
map16 {
	892 3208 5531 10299 7797

// map error
	checksec 699 192 -128 CEIL3_5 MFLR8_1
	checksec 729 128 0 CEIL3_5 MFLR8_1
	checksec 730 128 0 CEIL3_5 MFLR8_1
	fn_setssec 729 699 2
	fn_setssec 730 699 2
	secdone 729
	secdone 730
}
map22 {
	1020 2624 6102 9054 7994
// analysis aid
	checksec 891 -31 -31 FLAT5_4 FLAT5_4
	setssec 1966 887 4
}

[VG]
map01 {
	3400 25783 32041 77887 55500
	setssec 15234 3367 1
	setssec 15235 3367 1
	setssec 15236 3367 1
	secdone 3383
}

[WADANIDEMO]
map07 {
	12 57 68 205 132
	respawnmobj 1 11 18 56
}

[XENUS15F2]
e1m3 {
	829 2864 4300 9573 6998

// analysis aid
	linemark 1938 54
	linemark 1962 54
	linemark 2060 54
	secdone 422	
}

[XENUSREV]
e1m3 {
	829 2864 4300 9573 6998

// analysis aid
	linemark 1938 54
	linemark 1962 54
	linemark 2060 54
	secdone 422	
}

// PWADS partially released in development =====================

// Placed here last as map design, its number or wad names may change.

[\btsx_e3]
map21 {
	1150 3105 5767 10629 8729
	changesecheight  63 1 496
	changesecheight 487 1 496
	changesecheight 683 1 496
	secfixed 129
	secfixed 780
}