Level = {}
Level["doscenegraph"] = 1
Level["file"] = "l4"
Level["loadscreen"] = "loadscreen4"
Level["scenegraph"] = {}
Level["scenegraph"]["checkpoints"] = {}
Level["scenegraph"]["checkpoints"][1] = {}
Level["scenegraph"]["checkpoints"][1][1] = "4-1 Start"
Level["scenegraph"]["checkpoints"][1][2] = {}
Level["scenegraph"]["checkpoints"][1][2][1] = 514
Level["scenegraph"]["checkpoints"][1][2][2] = -26
Level["scenegraph"]["checkpoints"][1][2][3] = 65
Level["scenegraph"]["checkpoints"][1][3] = "sectionA"
Level["scenegraph"]["checkpoints"][1][4] = 1.5708
Level["scenegraph"]["checkpoints"][10] = {}
Level["scenegraph"]["checkpoints"][10][1] = "4-10 Pipes"
Level["scenegraph"]["checkpoints"][10][2] = {}
Level["scenegraph"]["checkpoints"][10][2][1] = 451.5
Level["scenegraph"]["checkpoints"][10][2][2] = -935.2
Level["scenegraph"]["checkpoints"][10][2][3] = 239.3
Level["scenegraph"]["checkpoints"][10][3] = "sectionB"
Level["scenegraph"]["checkpoints"][10][4] = 1.56
Level["scenegraph"]["checkpoints"][11] = {}
Level["scenegraph"]["checkpoints"][11]["delete"] = {}
Level["scenegraph"]["checkpoints"][11]["delete"][1] = "l4_r7"
Level["scenegraph"]["checkpoints"][11]["delete"][2] = "l4_r7a"
Level["scenegraph"]["checkpoints"][11]["delete"][3] = "l4_r7_90tun00"
Level["scenegraph"]["checkpoints"][11]["delete"][4] = "l4_r7_90tun01"
Level["scenegraph"]["checkpoints"][11]["delete"][5] = "l4_r7aentrance"
Level["scenegraph"]["checkpoints"][11]["delete"][6] = "l4_r7exit"
Level["scenegraph"]["checkpoints"][11]["prevcp"] = 9
Level["scenegraph"]["checkpoints"][11][1] = "4-11 Bouncy"
Level["scenegraph"]["checkpoints"][11][2] = {}
Level["scenegraph"]["checkpoints"][11][2][1] = 352.3
Level["scenegraph"]["checkpoints"][11][2][2] = -1174.8
Level["scenegraph"]["checkpoints"][11][2][3] = 239.9
Level["scenegraph"]["checkpoints"][11][3] = "sectionC"
Level["scenegraph"]["checkpoints"][11][4] = 1.56
Level["scenegraph"]["checkpoints"][12] = {}
Level["scenegraph"]["checkpoints"][12][1] = "4-12 Intro Movie"
Level["scenegraph"]["checkpoints"][12][2] = {}
Level["scenegraph"]["checkpoints"][12][2][1] = 514
Level["scenegraph"]["checkpoints"][12][2][2] = -26
Level["scenegraph"]["checkpoints"][12][2][3] = 65
Level["scenegraph"]["checkpoints"][12][3] = "sectionF"
Level["scenegraph"]["checkpoints"][12][4] = 1.5708
Level["scenegraph"]["checkpoints"][13] = {}
Level["scenegraph"]["checkpoints"][13][1] = "4-13 End Movie"
Level["scenegraph"]["checkpoints"][13][2] = {}
Level["scenegraph"]["checkpoints"][13][2][1] = 304
Level["scenegraph"]["checkpoints"][13][2][2] = -1610
Level["scenegraph"]["checkpoints"][13][2][3] = 240
Level["scenegraph"]["checkpoints"][13][3] = "sectionE"
Level["scenegraph"]["checkpoints"][13][4] = 1.5708
Level["scenegraph"]["checkpoints"][14] = {}
Level["scenegraph"]["checkpoints"][14]["prevcp"] = 11
Level["scenegraph"]["checkpoints"][14][1] = "4-14 End"
Level["scenegraph"]["checkpoints"][14][2] = {}
Level["scenegraph"]["checkpoints"][14][2][1] = 328.8
Level["scenegraph"]["checkpoints"][14][2][2] = -1347.7
Level["scenegraph"]["checkpoints"][14][2][3] = 240
Level["scenegraph"]["checkpoints"][14][3] = "sectionC"
Level["scenegraph"]["checkpoints"][14][4] = 1.49
Level["scenegraph"]["checkpoints"][15] = {}
Level["scenegraph"]["checkpoints"][15][1] = "4-15 Boss Movie"
Level["scenegraph"]["checkpoints"][15][2] = {}
Level["scenegraph"]["checkpoints"][15][2][1] = 304
Level["scenegraph"]["checkpoints"][15][2][2] = -1610
Level["scenegraph"]["checkpoints"][15][2][3] = 240
Level["scenegraph"]["checkpoints"][15][3] = "sectionD"
Level["scenegraph"]["checkpoints"][15][4] = 1.5708
Level["scenegraph"]["checkpoints"][2] = {}
Level["scenegraph"]["checkpoints"][2][1] = "4-2 Outer hull"
Level["scenegraph"]["checkpoints"][2][2] = {}
Level["scenegraph"]["checkpoints"][2][2][1] = 550
Level["scenegraph"]["checkpoints"][2][2][2] = -50
Level["scenegraph"]["checkpoints"][2][2][3] = 63
Level["scenegraph"]["checkpoints"][2][3] = "sectionA"
Level["scenegraph"]["checkpoints"][2][4] = -1.5708
Level["scenegraph"]["checkpoints"][3] = {}
Level["scenegraph"]["checkpoints"][3][1] = "4-3 Blimp room"
Level["scenegraph"]["checkpoints"][3][2] = {}
Level["scenegraph"]["checkpoints"][3][2][1] = 846.5
Level["scenegraph"]["checkpoints"][3][2][2] = -60.4
Level["scenegraph"]["checkpoints"][3][2][3] = -113.7
Level["scenegraph"]["checkpoints"][3][3] = "sectionA"
Level["scenegraph"]["checkpoints"][3][4] = 0
Level["scenegraph"]["checkpoints"][4] = {}
Level["scenegraph"]["checkpoints"][4][1] = "4-4 Fans n Platforms"
Level["scenegraph"]["checkpoints"][4][2] = {}
Level["scenegraph"]["checkpoints"][4][2][1] = 954
Level["scenegraph"]["checkpoints"][4][2][2] = -33.2
Level["scenegraph"]["checkpoints"][4][2][3] = -113.6
Level["scenegraph"]["checkpoints"][4][3] = "sectionA"
Level["scenegraph"]["checkpoints"][4][4] = -1.56
Level["scenegraph"]["checkpoints"][5] = {}
Level["scenegraph"]["checkpoints"][5]["delete"] = {}
Level["scenegraph"]["checkpoints"][5]["delete"][1] = "l4_r0"
Level["scenegraph"]["checkpoints"][5]["delete"][10] = "l4_r3entrance"
Level["scenegraph"]["checkpoints"][5]["delete"][11] = "l4r1boundbits"
Level["scenegraph"]["checkpoints"][5]["delete"][12] = "l4r2outerbits"
Level["scenegraph"]["checkpoints"][5]["delete"][13] = "l4r2intun"
Level["scenegraph"]["checkpoints"][5]["delete"][14] = "l4r1outtun"
Level["scenegraph"]["checkpoints"][5]["delete"][2] = "l4_r1"
Level["scenegraph"]["checkpoints"][5]["delete"][3] = "l4_r2"
Level["scenegraph"]["checkpoints"][5]["delete"][5] = "l4_r2_90tun00"
Level["scenegraph"]["checkpoints"][5]["delete"][6] = "l4_r2_90tun01"
Level["scenegraph"]["checkpoints"][5]["delete"][7] = "l4_poles"
Level["scenegraph"]["checkpoints"][5]["delete"][8] = "l4_r2exit"
Level["scenegraph"]["checkpoints"][5][1] = "4-5 Vortex"
Level["scenegraph"]["checkpoints"][5][2] = {}
Level["scenegraph"]["checkpoints"][5][2][1] = 1168.7
Level["scenegraph"]["checkpoints"][5][2][2] = -313.6
Level["scenegraph"]["checkpoints"][5][2][3] = 119
Level["scenegraph"]["checkpoints"][5][3] = "sectionA"
Level["scenegraph"]["checkpoints"][5][4] = 1.3
Level["scenegraph"]["checkpoints"][6] = {}
Level["scenegraph"]["checkpoints"][6][1] = "4-6 Entry To Next Room"
Level["scenegraph"]["checkpoints"][6][2] = {}
Level["scenegraph"]["checkpoints"][6][2][1] = 1117.3
Level["scenegraph"]["checkpoints"][6][2][2] = -545.2
Level["scenegraph"]["checkpoints"][6][2][3] = 252.3
Level["scenegraph"]["checkpoints"][6][3] = "sectionB"
Level["scenegraph"]["checkpoints"][6][4] = 3.14
Level["scenegraph"]["checkpoints"][7] = {}
Level["scenegraph"]["checkpoints"][7][1] = "4-7 Room After Last"
Level["scenegraph"]["checkpoints"][7][2] = {}
Level["scenegraph"]["checkpoints"][7][2][1] = 1134.2
Level["scenegraph"]["checkpoints"][7][2][2] = -652.1
Level["scenegraph"]["checkpoints"][7][2][3] = 238.7
Level["scenegraph"]["checkpoints"][7][3] = "sectionB"
Level["scenegraph"]["checkpoints"][7][4] = 3.14
Level["scenegraph"]["checkpoints"][8] = {}
Level["scenegraph"]["checkpoints"][8][1] = "4-8 Arena"
Level["scenegraph"]["checkpoints"][8][2] = {}
Level["scenegraph"]["checkpoints"][8][2][1] = 1082.1
Level["scenegraph"]["checkpoints"][8][2][2] = -870.2
Level["scenegraph"]["checkpoints"][8][2][3] = 239.7
Level["scenegraph"]["checkpoints"][8][3] = "sectionB"
Level["scenegraph"]["checkpoints"][8][4] = 3.14
Level["scenegraph"]["checkpoints"][9] = {}
Level["scenegraph"]["checkpoints"][9]["delete"] = {}
Level["scenegraph"]["checkpoints"][9]["delete"][1] = "l4_r4"
Level["scenegraph"]["checkpoints"][9]["delete"][10] = "l4_r3"
Level["scenegraph"]["checkpoints"][9]["delete"][11] = "l4_r3exit"
Level["scenegraph"]["checkpoints"][9]["delete"][2] = "l4_r5"
Level["scenegraph"]["checkpoints"][9]["delete"][3] = "l4_r6"
Level["scenegraph"]["checkpoints"][9]["delete"][4] = "l4_r5a"
Level["scenegraph"]["checkpoints"][9]["delete"][5] = "l4_r5smash"
Level["scenegraph"]["checkpoints"][9]["delete"][6] = "l4_r5entrance"
Level["scenegraph"]["checkpoints"][9]["delete"][7] = "l4_r5exit"
Level["scenegraph"]["checkpoints"][9]["delete"][8] = "l4_r5shatter"
Level["scenegraph"]["checkpoints"][9]["delete"][9] = "l4_r5side"
Level["scenegraph"]["checkpoints"][9]["prevcp"] = 5
Level["scenegraph"]["checkpoints"][9][1] = "4-9 Flames"
Level["scenegraph"]["checkpoints"][9][2] = {}
Level["scenegraph"]["checkpoints"][9][2][1] = 673.8
Level["scenegraph"]["checkpoints"][9][2][2] = -993.8
Level["scenegraph"]["checkpoints"][9][2][3] = 239.8
Level["scenegraph"]["checkpoints"][9][3] = "sectionB"
Level["scenegraph"]["checkpoints"][9][4] = -0.35
Level["scenegraph"]["l4_levellight"] = {}
Level["scenegraph"]["l4_levelstars"] = {}
Level["scenegraph"]["l4_poles"] = {}
Level["scenegraph"]["l4_r0"] = {}
Level["scenegraph"]["l4_r0"]["env"] = 20
Level["scenegraph"]["l4_r0"]["visible"] = {}
Level["scenegraph"]["l4_r0"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r0"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r0"]["visible"][3] = "l4_r1"
Level["scenegraph"]["l4_r0"]["visible"][4] = "l4r1boundbits"
Level["scenegraph"]["l4_r0"]["visible"][5] = "l4r1outtun"
Level["scenegraph"]["l4_r0"]["visible"][6] = "l4r2intun"
Level["scenegraph"]["l4_r1"] = {}
Level["scenegraph"]["l4_r1"]["env"] = 20
Level["scenegraph"]["l4_r1"]["music"] = 13
Level["scenegraph"]["l4_r1"]["visible"] = {}
Level["scenegraph"]["l4_r1"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r1"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r1"]["visible"][3] = "l4_r0"
Level["scenegraph"]["l4_r1"]["visible"][4] = "l4r1boundbits"
Level["scenegraph"]["l4_r1"]["visible"][5] = "l4r1outtun"
Level["scenegraph"]["l4_r1"]["visible"][6] = "l4r2intun"
Level["scenegraph"]["l4_r2"] = {}
Level["scenegraph"]["l4_r2"]["music"] = 16
Level["scenegraph"]["l4_r2"]["visible"] = {}
Level["scenegraph"]["l4_r2"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r2"]["visible"][3] = "l4_r2_90tun00"
Level["scenegraph"]["l4_r2"]["visible"][4] = "l4_r2exit"
Level["scenegraph"]["l4_r2"]["visible"][5] = "l4r1outtun"
Level["scenegraph"]["l4_r2"]["visible"][6] = "l4r2intun"
Level["scenegraph"]["l4_r2"]["visible"][7] = "l4r2outerbits"
Level["scenegraph"]["l4_r2_180tun00"] = {}
Level["scenegraph"]["l4_r2_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r2_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2_180tun00"]["visible"][2] = "l4_r2_180tun01"
Level["scenegraph"]["l4_r2_180tun00"]["visible"][3] = "l4_r2_90tun00"
Level["scenegraph"]["l4_r2_180tun00"]["visible"][4] = "l4_r2_90tun01"
Level["scenegraph"]["l4_r2_180tun00"]["visible"][5] = "l4_r2_deadtun"
Level["scenegraph"]["l4_r2_180tun01"] = {}
Level["scenegraph"]["l4_r2_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r2_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2_180tun01"]["visible"][2] = "l4_r2_180tun00"
Level["scenegraph"]["l4_r2_180tun01"]["visible"][3] = "l4_r2_90tun00"
Level["scenegraph"]["l4_r2_180tun01"]["visible"][4] = "l4_r2_90tun01"
Level["scenegraph"]["l4_r2_180tun01"]["visible"][5] = "l4_r2_deadtun"
Level["scenegraph"]["l4_r2_90tun00"] = {}
Level["scenegraph"]["l4_r2_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r2_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r2_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][3] = "l4_r2"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][4] = "l4_r2_180tun00"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][5] = "l4_r2_180tun01"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][6] = "l4_r2_90tun01"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][7] = "l4_r2_deadtun"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][8] = "l4_r2exit"
Level["scenegraph"]["l4_r2_90tun00"]["visible"][9] = "l4r2outerbits"
Level["scenegraph"]["l4_r2_90tun01"] = {}
Level["scenegraph"]["l4_r2_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r2_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r2_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][2] = "l4_poles"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][3] = "l4_r2_180tun00"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][4] = "l4_r2_180tun01"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][5] = "l4_r2_90tun00"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][6] = "l4_r2_deadtun"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][7] = "l4_r3"
Level["scenegraph"]["l4_r2_90tun01"]["visible"][8] = "l4_r3entrance"
Level["scenegraph"]["l4_r2_deadtun"] = {}
Level["scenegraph"]["l4_r2_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r2_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2_deadtun"]["visible"][2] = "l4_r2_180tun00"
Level["scenegraph"]["l4_r2_deadtun"]["visible"][3] = "l4_r2_180tun01"
Level["scenegraph"]["l4_r2_deadtun"]["visible"][4] = "l4_r2_90tun00"
Level["scenegraph"]["l4_r2_deadtun"]["visible"][5] = "l4_r2_90tun01"
Level["scenegraph"]["l4_r2exit"] = {}
Level["scenegraph"]["l4_r2exit"]["env"] = 8
Level["scenegraph"]["l4_r2exit"]["visible"] = {}
Level["scenegraph"]["l4_r2exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r2exit"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r2exit"]["visible"][3] = "l4_r2"
Level["scenegraph"]["l4_r2exit"]["visible"][4] = "l4_r2_90tun00"
Level["scenegraph"]["l4_r2exit"]["visible"][5] = "l4r2outerbits"
Level["scenegraph"]["l4_r3"] = {}
Level["scenegraph"]["l4_r3"]["visible"] = {}
Level["scenegraph"]["l4_r3"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3"]["visible"][2] = "l4_poles"
Level["scenegraph"]["l4_r3"]["visible"][3] = "l4_r3entrance"
Level["scenegraph"]["l4_r3"]["visible"][4] = "l4_r3exit"
Level["scenegraph"]["l4_r3_180tun00"] = {}
Level["scenegraph"]["l4_r3_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r3_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3_180tun00"]["visible"][2] = "l4_r3_180tun01"
Level["scenegraph"]["l4_r3_180tun00"]["visible"][3] = "l4_r3_90tun00"
Level["scenegraph"]["l4_r3_180tun00"]["visible"][4] = "l4_r3_90tun01"
Level["scenegraph"]["l4_r3_180tun00"]["visible"][5] = "l4_r3_deadtun"
Level["scenegraph"]["l4_r3_180tun01"] = {}
Level["scenegraph"]["l4_r3_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r3_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3_180tun01"]["visible"][2] = "l4_r3_180tun00"
Level["scenegraph"]["l4_r3_180tun01"]["visible"][3] = "l4_r3_90tun00"
Level["scenegraph"]["l4_r3_180tun01"]["visible"][4] = "l4_r3_90tun01"
Level["scenegraph"]["l4_r3_180tun01"]["visible"][5] = "l4_r3_deadtun"
Level["scenegraph"]["l4_r3_90tun00"] = {}
Level["scenegraph"]["l4_r3_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r3_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r3_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3_90tun00"]["visible"][2] = "l4_poles"
Level["scenegraph"]["l4_r3_90tun00"]["visible"][3] = "l4_r3"
Level["scenegraph"]["l4_r3_90tun00"]["visible"][4] = "l4_r3_90tun01"
Level["scenegraph"]["l4_r3_90tun00"]["visible"][5] = "l4_r3exit"
Level["scenegraph"]["l4_r3_90tun01"] = {}
Level["scenegraph"]["l4_r3_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r3_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r3_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3_90tun01"]["visible"][2] = "l4_r3_90tun00"
Level["scenegraph"]["l4_r3_90tun01"]["visible"][3] = "l4_r4"
Level["scenegraph"]["l4_r3_deadtun"] = {}
Level["scenegraph"]["l4_r3_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r3_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3_deadtun"]["visible"][2] = "l4_r3_180tun00"
Level["scenegraph"]["l4_r3_deadtun"]["visible"][3] = "l4_r3_180tun01"
Level["scenegraph"]["l4_r3_deadtun"]["visible"][4] = "l4_r3_90tun00"
Level["scenegraph"]["l4_r3_deadtun"]["visible"][5] = "l4_r3_90tun01"
Level["scenegraph"]["l4_r3entrance"] = {}
Level["scenegraph"]["l4_r3entrance"]["env"] = 9
Level["scenegraph"]["l4_r3entrance"]["music"] = 13
Level["scenegraph"]["l4_r3entrance"]["visible"] = {}
Level["scenegraph"]["l4_r3entrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3entrance"]["visible"][2] = "l4_poles"
Level["scenegraph"]["l4_r3entrance"]["visible"][3] = "l4_r2_90tun01"
Level["scenegraph"]["l4_r3entrance"]["visible"][4] = "l4_r3"
Level["scenegraph"]["l4_r3entrance"]["visible"][5] = "l4_r3exit"
Level["scenegraph"]["l4_r3exit"] = {}
Level["scenegraph"]["l4_r3exit"]["env"] = 9
Level["scenegraph"]["l4_r3exit"]["visible"] = {}
Level["scenegraph"]["l4_r3exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r3exit"]["visible"][2] = "l4_poles"
Level["scenegraph"]["l4_r3exit"]["visible"][3] = "l4_r3"
Level["scenegraph"]["l4_r3exit"]["visible"][4] = "l4_r3_90tun00"
Level["scenegraph"]["l4_r3exit"]["visible"][5] = "l4_r3entrance"
Level["scenegraph"]["l4_r4"] = {}
Level["scenegraph"]["l4_r4"]["checkpoint"] = 5
Level["scenegraph"]["l4_r4"]["env"] = 8
Level["scenegraph"]["l4_r4"]["music"] = 17
Level["scenegraph"]["l4_r4"]["visible"] = {}
Level["scenegraph"]["l4_r4"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r4"]["visible"][2] = "l4_r3_90tun01"
Level["scenegraph"]["l4_r4"]["visible"][3] = "l4_r4_90tun00"
Level["scenegraph"]["l4_r4_180tun00"] = {}
Level["scenegraph"]["l4_r4_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r4_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r4_180tun00"]["visible"][2] = "l4_r4_180tun01"
Level["scenegraph"]["l4_r4_180tun00"]["visible"][3] = "l4_r4_90tun00"
Level["scenegraph"]["l4_r4_180tun00"]["visible"][4] = "l4_r4_90tun01"
Level["scenegraph"]["l4_r4_180tun00"]["visible"][5] = "l4_r4_deadtun"
Level["scenegraph"]["l4_r4_180tun01"] = {}
Level["scenegraph"]["l4_r4_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r4_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r4_180tun01"]["visible"][2] = "l4_r4_180tun00"
Level["scenegraph"]["l4_r4_180tun01"]["visible"][3] = "l4_r4_90tun00"
Level["scenegraph"]["l4_r4_180tun01"]["visible"][4] = "l4_r4_90tun01"
Level["scenegraph"]["l4_r4_180tun01"]["visible"][5] = "l4_r4_deadtun"
Level["scenegraph"]["l4_r4_90tun00"] = {}
Level["scenegraph"]["l4_r4_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r4_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r4_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r4_90tun00"]["visible"][2] = "l4_r4"
Level["scenegraph"]["l4_r4_90tun00"]["visible"][3] = "l4_r4_180tun00"
Level["scenegraph"]["l4_r4_90tun00"]["visible"][4] = "l4_r4_180tun01"
Level["scenegraph"]["l4_r4_90tun00"]["visible"][5] = "l4_r4_90tun01"
Level["scenegraph"]["l4_r4_90tun00"]["visible"][6] = "l4_r4_deadtun"
Level["scenegraph"]["l4_r4_90tun01"] = {}
Level["scenegraph"]["l4_r4_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r4_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r4_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][2] = "l4_r4_180tun00"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][3] = "l4_r4_180tun01"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][4] = "l4_r4_90tun00"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][5] = "l4_r4_deadtun"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][6] = "l4_r5a"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][7] = "l4_r5entrance"
Level["scenegraph"]["l4_r4_90tun01"]["visible"][8] = "l4_r5shatter"
Level["scenegraph"]["l4_r4_deadtun"] = {}
Level["scenegraph"]["l4_r4_deadtun"]["load"] = "sectionB"
Level["scenegraph"]["l4_r4_deadtun"]["music"] = 15
Level["scenegraph"]["l4_r4_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r4_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r4_deadtun"]["visible"][2] = "l4_r4_180tun00"
Level["scenegraph"]["l4_r4_deadtun"]["visible"][3] = "l4_r4_180tun01"
Level["scenegraph"]["l4_r4_deadtun"]["visible"][4] = "l4_r4_90tun00"
Level["scenegraph"]["l4_r4_deadtun"]["visible"][5] = "l4_r4_90tun01"
Level["scenegraph"]["l4_r5"] = {}
Level["scenegraph"]["l4_r5"]["env"] = 7
Level["scenegraph"]["l4_r5"]["visible"] = {}
Level["scenegraph"]["l4_r5"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5"]["visible"][2] = "l4_r5exit"
Level["scenegraph"]["l4_r5"]["visible"][3] = "l4_r5shatter"
Level["scenegraph"]["l4_r5"]["visible"][4] = "l4_r5smash"
Level["scenegraph"]["l4_r5"]["visible"][5] = "l4_ra_90tun01"
Level["scenegraph"]["l4_r5"]["visible"][6] = "l4_rb_90tun01"
Level["scenegraph"]["l4_r5_180tun00"] = {}
Level["scenegraph"]["l4_r5_180tun00"]["load"] = "sectionB"
Level["scenegraph"]["l4_r5_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r5_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5_180tun00"]["visible"][2] = "l4_r5_180tun01"
Level["scenegraph"]["l4_r5_180tun00"]["visible"][3] = "l4_r5_90tun00"
Level["scenegraph"]["l4_r5_180tun00"]["visible"][4] = "l4_r5_90tun01"
Level["scenegraph"]["l4_r5_180tun00"]["visible"][5] = "l4_r5_deadtun"
Level["scenegraph"]["l4_r5_180tun01"] = {}
Level["scenegraph"]["l4_r5_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r5_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5_180tun01"]["visible"][2] = "l4_r5_180tun00"
Level["scenegraph"]["l4_r5_180tun01"]["visible"][3] = "l4_r5_90tun00"
Level["scenegraph"]["l4_r5_180tun01"]["visible"][4] = "l4_r5_90tun01"
Level["scenegraph"]["l4_r5_180tun01"]["visible"][5] = "l4_r5_deadtun"
Level["scenegraph"]["l4_r5_90tun00"] = {}
Level["scenegraph"]["l4_r5_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r5_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r5_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5_90tun00"]["visible"][2] = "l4_r5"
Level["scenegraph"]["l4_r5_90tun00"]["visible"][3] = "l4_r5_90tun01"
Level["scenegraph"]["l4_r5_90tun00"]["visible"][4] = "l4_r5entrance"
Level["scenegraph"]["l4_r5_90tun00"]["visible"][5] = "l4_r5exit"
Level["scenegraph"]["l4_r5_90tun00"]["visible"][6] = "l4_r5shatter"
Level["scenegraph"]["l4_r5_90tun01"] = {}
Level["scenegraph"]["l4_r5_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r5_90tun01"]["music"] = 22
Level["scenegraph"]["l4_r5_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r5_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5_90tun01"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r5_90tun01"]["visible"][3] = "l4_r5_90tun00"
Level["scenegraph"]["l4_r5_90tun01"]["visible"][4] = "l4_r6"
Level["scenegraph"]["l4_r5_90tun01"]["visible"][5] = "l4_r6entrance"
Level["scenegraph"]["l4_r5_90tun01"]["visible"][6] = "l4_r6exit"
Level["scenegraph"]["l4_r5_deadtun"] = {}
Level["scenegraph"]["l4_r5_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r5_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5_deadtun"]["visible"][2] = "l4_r5_180tun00"
Level["scenegraph"]["l4_r5_deadtun"]["visible"][3] = "l4_r5_180tun01"
Level["scenegraph"]["l4_r5_deadtun"]["visible"][4] = "l4_r5_90tun00"
Level["scenegraph"]["l4_r5_deadtun"]["visible"][5] = "l4_r5_90tun01"
Level["scenegraph"]["l4_r5a"] = {}
Level["scenegraph"]["l4_r5a"]["env"] = 8
Level["scenegraph"]["l4_r5a"]["visible"] = {}
Level["scenegraph"]["l4_r5a"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5a"]["visible"][2] = "l4_r5entrance"
Level["scenegraph"]["l4_r5a"]["visible"][3] = "l4_r5side"
Level["scenegraph"]["l4_r5a"]["visible"][4] = "l4_ra_90tun00"
Level["scenegraph"]["l4_r5a"]["visible"][5] = "l4_rb_90tun00"
Level["scenegraph"]["l4_r5entrance"] = {}
Level["scenegraph"]["l4_r5entrance"]["env"] = 8
Level["scenegraph"]["l4_r5entrance"]["music"] = 15
Level["scenegraph"]["l4_r5entrance"]["visible"] = {}
Level["scenegraph"]["l4_r5entrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5entrance"]["visible"][2] = "l4_r4_90tun01"
Level["scenegraph"]["l4_r5entrance"]["visible"][3] = "l4_r5a"
Level["scenegraph"]["l4_r5entrance"]["visible"][4] = "l4_r5exit"
Level["scenegraph"]["l4_r5entrance"]["visible"][5] = "l4_r5shatter"
Level["scenegraph"]["l4_r5exit"] = {}
Level["scenegraph"]["l4_r5exit"]["visible"] = {}
Level["scenegraph"]["l4_r5exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r5exit"]["visible"][2] = "l4_r5"
Level["scenegraph"]["l4_r5exit"]["visible"][3] = "l4_r5_90tun00"
Level["scenegraph"]["l4_r5exit"]["visible"][4] = "l4_r5entrance"
Level["scenegraph"]["l4_r5exit"]["visible"][5] = "l4_r5shatter"
Level["scenegraph"]["l4_r5shatter"] = {}
Level["scenegraph"]["l4_r5side"] = {}
Level["scenegraph"]["l4_r5side"]["visible"] = {}
Level["scenegraph"]["l4_r5side"]["visible"][1] = "l4_r5a"
Level["scenegraph"]["l4_r5side"]["visible"][2] = "l4_r5entrance"
Level["scenegraph"]["l4_r5smash"] = {}
Level["scenegraph"]["l4_r6"] = {}
Level["scenegraph"]["l4_r6"]["visible"] = {}
Level["scenegraph"]["l4_r6"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r6"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r6"]["visible"][3] = "l4_r6entrance"
Level["scenegraph"]["l4_r6"]["visible"][4] = "l4_r6exit"
Level["scenegraph"]["l4_r6_90tun00"] = {}
Level["scenegraph"]["l4_r6_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r6_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r6_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r6_90tun00"]["visible"][2] = "l4_r6"
Level["scenegraph"]["l4_r6_90tun00"]["visible"][3] = "l4_r6_90tun01"
Level["scenegraph"]["l4_r6_90tun00"]["visible"][4] = "l4_r6entrance"
Level["scenegraph"]["l4_r6_90tun00"]["visible"][5] = "l4_r6exit"
Level["scenegraph"]["l4_r6_90tun01"] = {}
Level["scenegraph"]["l4_r6_90tun01"]["checkpoint"] = 9
Level["scenegraph"]["l4_r6_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r6_90tun01"]["music"] = 23
Level["scenegraph"]["l4_r6_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r6_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r6_90tun01"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r6_90tun01"]["visible"][3] = "l4_r6_90tun00"
Level["scenegraph"]["l4_r6_90tun01"]["visible"][4] = "l4_r7"
Level["scenegraph"]["l4_r6_90tun01"]["visible"][5] = "l4_r7entrance"
Level["scenegraph"]["l4_r6_90tun01"]["visible"][6] = "l4_r7exit"
Level["scenegraph"]["l4_r6entrance"] = {}
Level["scenegraph"]["l4_r6entrance"]["env"] = 10
Level["scenegraph"]["l4_r6entrance"]["music"] = 22
Level["scenegraph"]["l4_r6entrance"]["visible"] = {}
Level["scenegraph"]["l4_r6entrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r6entrance"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r6entrance"]["visible"][3] = "l4_r5_90tun01"
Level["scenegraph"]["l4_r6entrance"]["visible"][4] = "l4_r6"
Level["scenegraph"]["l4_r6entrance"]["visible"][5] = "l4_r6exit"
Level["scenegraph"]["l4_r6exit"] = {}
Level["scenegraph"]["l4_r6exit"]["env"] = 10
Level["scenegraph"]["l4_r6exit"]["visible"] = {}
Level["scenegraph"]["l4_r6exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r6exit"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r6exit"]["visible"][3] = "l4_r6"
Level["scenegraph"]["l4_r6exit"]["visible"][4] = "l4_r6_90tun00"
Level["scenegraph"]["l4_r6exit"]["visible"][5] = "l4_r6entrance"
Level["scenegraph"]["l4_r7"] = {}
Level["scenegraph"]["l4_r7"]["visible"] = {}
Level["scenegraph"]["l4_r7"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7"]["visible"][3] = "l4_r7entrance"
Level["scenegraph"]["l4_r7"]["visible"][4] = "l4_r7exit"
Level["scenegraph"]["l4_r7_90tun00"] = {}
Level["scenegraph"]["l4_r7_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r7_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r7_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7_90tun00"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7_90tun00"]["visible"][3] = "l4_r7"
Level["scenegraph"]["l4_r7_90tun00"]["visible"][4] = "l4_r7_90tun01"
Level["scenegraph"]["l4_r7_90tun00"]["visible"][5] = "l4_r7entrance"
Level["scenegraph"]["l4_r7_90tun00"]["visible"][6] = "l4_r7exit"
Level["scenegraph"]["l4_r7_90tun01"] = {}
Level["scenegraph"]["l4_r7_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r7_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r7_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7_90tun01"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7_90tun01"]["visible"][3] = "l4_r7_90tun00"
Level["scenegraph"]["l4_r7_90tun01"]["visible"][4] = "l4_r7a"
Level["scenegraph"]["l4_r7_90tun01"]["visible"][5] = "l4_r7aentrance"
Level["scenegraph"]["l4_r7_90tun01"]["visible"][6] = "l4_r7aexit"
Level["scenegraph"]["l4_r7a"] = {}
Level["scenegraph"]["l4_r7a"]["env"] = 0
Level["scenegraph"]["l4_r7a"]["music"] = 13
Level["scenegraph"]["l4_r7a"]["visible"] = {}
Level["scenegraph"]["l4_r7a"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7a"]["visible"][2] = "l4_r7aentrance"
Level["scenegraph"]["l4_r7a"]["visible"][3] = "l4_r7aexit"
Level["scenegraph"]["l4_r7a_180tun00"] = {}
Level["scenegraph"]["l4_r7a_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r7a_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7a_180tun00"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7a_180tun00"]["visible"][3] = "l4_r7a_180tun01"
Level["scenegraph"]["l4_r7a_180tun00"]["visible"][4] = "l4_r7a_90tun00"
Level["scenegraph"]["l4_r7a_180tun00"]["visible"][5] = "l4_r7a_90tun01"
Level["scenegraph"]["l4_r7a_180tun00"]["visible"][6] = "l4_r7a_deadtun"
Level["scenegraph"]["l4_r7a_180tun01"] = {}
Level["scenegraph"]["l4_r7a_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r7a_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7a_180tun01"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7a_180tun01"]["visible"][3] = "l4_r7a_180tun00"
Level["scenegraph"]["l4_r7a_180tun01"]["visible"][4] = "l4_r7a_90tun00"
Level["scenegraph"]["l4_r7a_180tun01"]["visible"][5] = "l4_r7a_90tun01"
Level["scenegraph"]["l4_r7a_180tun01"]["visible"][6] = "l4_r7a_deadtun"
Level["scenegraph"]["l4_r7a_90tun00"] = {}
Level["scenegraph"]["l4_r7a_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r7a_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][3] = "l4_r7a"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][4] = "l4_r7a_180tun00"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][5] = "l4_r7a_180tun01"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][6] = "l4_r7a_90tun01"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][7] = "l4_r7a_deadtun"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][8] = "l4_r7aentrance"
Level["scenegraph"]["l4_r7a_90tun00"]["visible"][9] = "l4_r7aexit"
Level["scenegraph"]["l4_r7a_90tun01"] = {}
Level["scenegraph"]["l4_r7a_90tun01"]["checkpoint"] = 11
Level["scenegraph"]["l4_r7a_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r7a_90tun01"]["music"] = 18
Level["scenegraph"]["l4_r7a_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][3] = "l4_r7a_180tun00"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][4] = "l4_r7a_180tun01"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][5] = "l4_r7a_90tun00"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][6] = "l4_r7a_deadtun"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][7] = "l4_r8"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][8] = "l4_r8entrance"
Level["scenegraph"]["l4_r7a_90tun01"]["visible"][9] = "l4_r8exit"
Level["scenegraph"]["l4_r7a_deadtun"] = {}
Level["scenegraph"]["l4_r7a_deadtun"]["load"] = "sectionC"
Level["scenegraph"]["l4_r7a_deadtun"]["music"] = 18
Level["scenegraph"]["l4_r7a_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r7a_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7a_deadtun"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7a_deadtun"]["visible"][3] = "l4_r7a_180tun00"
Level["scenegraph"]["l4_r7a_deadtun"]["visible"][4] = "l4_r7a_180tun01"
Level["scenegraph"]["l4_r7a_deadtun"]["visible"][5] = "l4_r7a_90tun00"
Level["scenegraph"]["l4_r7a_deadtun"]["visible"][6] = "l4_r7a_90tun01"
Level["scenegraph"]["l4_r7aentrance"] = {}
Level["scenegraph"]["l4_r7aentrance"]["music"] = 13
Level["scenegraph"]["l4_r7aentrance"]["visible"] = {}
Level["scenegraph"]["l4_r7aentrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7aentrance"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7aentrance"]["visible"][3] = "l4_r7_90tun01"
Level["scenegraph"]["l4_r7aentrance"]["visible"][4] = "l4_r7a"
Level["scenegraph"]["l4_r7aentrance"]["visible"][5] = "l4_r7aexit"
Level["scenegraph"]["l4_r7aexit"] = {}
Level["scenegraph"]["l4_r7aexit"]["visible"] = {}
Level["scenegraph"]["l4_r7aexit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7aexit"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7aexit"]["visible"][3] = "l4_r7a"
Level["scenegraph"]["l4_r7aexit"]["visible"][4] = "l4_r7a_90tun00"
Level["scenegraph"]["l4_r7aexit"]["visible"][5] = "l4_r7aentrance"
Level["scenegraph"]["l4_r7aexit"]["visible"][6] = "l4_r7aexit"
Level["scenegraph"]["l4_r7entrance"] = {}
Level["scenegraph"]["l4_r7entrance"]["env"] = 5
Level["scenegraph"]["l4_r7entrance"]["visible"] = {}
Level["scenegraph"]["l4_r7entrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7entrance"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7entrance"]["visible"][3] = "l4_r6_90tun01"
Level["scenegraph"]["l4_r7entrance"]["visible"][4] = "l4_r7"
Level["scenegraph"]["l4_r7entrance"]["visible"][5] = "l4_r7exit"
Level["scenegraph"]["l4_r7exit"] = {}
Level["scenegraph"]["l4_r7exit"]["env"] = 5
Level["scenegraph"]["l4_r7exit"]["visible"] = {}
Level["scenegraph"]["l4_r7exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r7exit"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r7exit"]["visible"][3] = "l4_r7"
Level["scenegraph"]["l4_r7exit"]["visible"][4] = "l4_r7_90tun00"
Level["scenegraph"]["l4_r7exit"]["visible"][5] = "l4_r7entrance"
Level["scenegraph"]["l4_r8"] = {}
Level["scenegraph"]["l4_r8"]["visible"] = {}
Level["scenegraph"]["l4_r8"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r8"]["visible"][3] = "l4_r8entrance"
Level["scenegraph"]["l4_r8"]["visible"][4] = "l4_r8exit"
Level["scenegraph"]["l4_r8_180tun00"] = {}
Level["scenegraph"]["l4_r8_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r8_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8_180tun00"]["visible"][2] = "l4_r8_180tun01"
Level["scenegraph"]["l4_r8_180tun00"]["visible"][3] = "l4_r8_90tun00"
Level["scenegraph"]["l4_r8_180tun00"]["visible"][4] = "l4_r8_90tun01"
Level["scenegraph"]["l4_r8_180tun00"]["visible"][5] = "l4_r8_deadtun"
Level["scenegraph"]["l4_r8_180tun01"] = {}
Level["scenegraph"]["l4_r8_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r8_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8_180tun01"]["visible"][2] = "l4_r8_180tun00"
Level["scenegraph"]["l4_r8_180tun01"]["visible"][3] = "l4_r8_90tun00"
Level["scenegraph"]["l4_r8_180tun01"]["visible"][4] = "l4_r8_90tun01"
Level["scenegraph"]["l4_r8_180tun01"]["visible"][5] = "l4_r8_deadtun"
Level["scenegraph"]["l4_r8_90tun00"] = {}
Level["scenegraph"]["l4_r8_90tun00"]["checkpoint"] = 14
Level["scenegraph"]["l4_r8_90tun00"]["env"] = 12
Level["scenegraph"]["l4_r8_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r8_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][3] = "l4_r8"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][4] = "l4_r8_180tun00"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][5] = "l4_r8_180tun01"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][6] = "l4_r8_90tun01"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][7] = "l4_r8_deadtun"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][8] = "l4_r8exit"
Level["scenegraph"]["l4_r8_90tun00"]["visible"][9] = "l4_r8entrance"
Level["scenegraph"]["l4_r8_90tun01"] = {}
Level["scenegraph"]["l4_r8_90tun01"]["env"] = 12
Level["scenegraph"]["l4_r8_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r8_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][3] = "l4_r8_180tun00"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][4] = "l4_r8_180tun01"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][5] = "l4_r8_90tun00"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][6] = "l4_r8_deadtun"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][7] = "l4_r9"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][8] = "l4_r9entrance"
Level["scenegraph"]["l4_r8_90tun01"]["visible"][9] = "l4_r9exit"
Level["scenegraph"]["l4_r8_deadtun"] = {}
Level["scenegraph"]["l4_r8_deadtun"]["load"] = "sectionD"
Level["scenegraph"]["l4_r8_deadtun"]["music"] = -1
Level["scenegraph"]["l4_r8_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r8_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8_deadtun"]["visible"][2] = "l4_r8_180tun00"
Level["scenegraph"]["l4_r8_deadtun"]["visible"][3] = "l4_r8_180tun01"
Level["scenegraph"]["l4_r8_deadtun"]["visible"][4] = "l4_r8_90tun00"
Level["scenegraph"]["l4_r8_deadtun"]["visible"][5] = "l4_r8_90tun01"
Level["scenegraph"]["l4_r8entrance"] = {}
Level["scenegraph"]["l4_r8entrance"]["env"] = 18
Level["scenegraph"]["l4_r8entrance"]["visible"] = {}
Level["scenegraph"]["l4_r8entrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8entrance"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r8entrance"]["visible"][3] = "l4_r7a_90tun01"
Level["scenegraph"]["l4_r8entrance"]["visible"][4] = "l4_r8"
Level["scenegraph"]["l4_r8entrance"]["visible"][5] = "l4_r8exit"
Level["scenegraph"]["l4_r8exit"] = {}
Level["scenegraph"]["l4_r8exit"]["env"] = 18
Level["scenegraph"]["l4_r8exit"]["visible"] = {}
Level["scenegraph"]["l4_r8exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r8exit"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r8exit"]["visible"][3] = "l4_r8"
Level["scenegraph"]["l4_r8exit"]["visible"][4] = "l4_r8_90tun00"
Level["scenegraph"]["l4_r8exit"]["visible"][5] = "l4_r8entrance"
Level["scenegraph"]["l4_r9"] = {}
Level["scenegraph"]["l4_r9"]["env"] = 9
Level["scenegraph"]["l4_r9"]["visible"] = {}
Level["scenegraph"]["l4_r9"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r9"]["visible"][3] = "l4_r8_90tun01"
Level["scenegraph"]["l4_r9_180tun00"] = {}
Level["scenegraph"]["l4_r9_180tun00"]["visible"] = {}
Level["scenegraph"]["l4_r9_180tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9_180tun00"]["visible"][2] = "l4_r9_180tun01"
Level["scenegraph"]["l4_r9_180tun00"]["visible"][3] = "l4_r9_90tun00"
Level["scenegraph"]["l4_r9_180tun00"]["visible"][4] = "l4_r9_90tun01"
Level["scenegraph"]["l4_r9_180tun00"]["visible"][5] = "l4_r9_deadtun"
Level["scenegraph"]["l4_r9_180tun01"] = {}
Level["scenegraph"]["l4_r9_180tun01"]["visible"] = {}
Level["scenegraph"]["l4_r9_180tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9_180tun01"]["visible"][2] = "l4_r9_180tun00"
Level["scenegraph"]["l4_r9_180tun01"]["visible"][3] = "l4_r9_90tun00"
Level["scenegraph"]["l4_r9_180tun01"]["visible"][4] = "l4_r9_90tun01"
Level["scenegraph"]["l4_r9_180tun01"]["visible"][5] = "l4_r9_deadtun"
Level["scenegraph"]["l4_r9_90tun00"] = {}
Level["scenegraph"]["l4_r9_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_r9_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][2] = "l4_r9"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][3] = "l4_r9_180tun00"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][4] = "l4_r9_180tun01"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][5] = "l4_r9_90tun01"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][6] = "l4_r9_deadtun"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][7] = "l4_r9entrance"
Level["scenegraph"]["l4_r9_90tun00"]["visible"][8] = "l4_r9exit"
Level["scenegraph"]["l4_r9_90tun01"] = {}
Level["scenegraph"]["l4_r9_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_r9_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][2] = "l4_r9_180tun00"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][3] = "l4_r9_180tun01"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][4] = "l4_r9_90tun00"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][5] = "l4_r9_deadtun"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][6] = "l4_r9down"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][7] = "l4_r9middle"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][8] = "l4_r9pod"
Level["scenegraph"]["l4_r9_90tun01"]["visible"][9] = "l4_r9up"
Level["scenegraph"]["l4_r9_deadtun"] = {}
Level["scenegraph"]["l4_r9_deadtun"]["visible"] = {}
Level["scenegraph"]["l4_r9_deadtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9_deadtun"]["visible"][2] = "l4_r9_180tun00"
Level["scenegraph"]["l4_r9_deadtun"]["visible"][3] = "l4_r9_180tun01"
Level["scenegraph"]["l4_r9_deadtun"]["visible"][4] = "l4_r9_90tun00"
Level["scenegraph"]["l4_r9_deadtun"]["visible"][5] = "l4_r9_90tun01"
Level["scenegraph"]["l4_r9down"] = {}
Level["scenegraph"]["l4_r9down"]["visible"] = {}
Level["scenegraph"]["l4_r9down"]["visible"][1] = "l4_r9"
Level["scenegraph"]["l4_r9down"]["visible"][2] = "l4_r9entrance"
Level["scenegraph"]["l4_r9down"]["visible"][3] = "l4_r9exit"
Level["scenegraph"]["l4_r9down"]["visible"][4] = "l4_r9middle"
Level["scenegraph"]["l4_r9down"]["visible"][5] = "l4_r9pod"
Level["scenegraph"]["l4_r9down"]["visible"][6] = "l4_r9up"
Level["scenegraph"]["l4_r9entrance"] = {}
Level["scenegraph"]["l4_r9entrance"]["visible"] = {}
Level["scenegraph"]["l4_r9entrance"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9entrance"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r9entrance"]["visible"][3] = "l4_r8_90tun01"
Level["scenegraph"]["l4_r9entrance"]["visible"][4] = "l4_r9"
Level["scenegraph"]["l4_r9entrance"]["visible"][5] = "l4_r9down"
Level["scenegraph"]["l4_r9entrance"]["visible"][6] = "l4_r9exit"
Level["scenegraph"]["l4_r9entrance"]["visible"][7] = "l4_r9middle"
Level["scenegraph"]["l4_r9entrance"]["visible"][8] = "l4_r9pod"
Level["scenegraph"]["l4_r9entrance"]["visible"][9] = "l4_r9up"
Level["scenegraph"]["l4_r9exit"] = {}
Level["scenegraph"]["l4_r9exit"]["visible"] = {}
Level["scenegraph"]["l4_r9exit"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9exit"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r9exit"]["visible"][3] = "l4_r9"
Level["scenegraph"]["l4_r9exit"]["visible"][4] = "l4_r9_90tun00"
Level["scenegraph"]["l4_r9exit"]["visible"][5] = "l4_r9down"
Level["scenegraph"]["l4_r9exit"]["visible"][6] = "l4_r9entrance"
Level["scenegraph"]["l4_r9exit"]["visible"][7] = "l4_r9middle"
Level["scenegraph"]["l4_r9exit"]["visible"][8] = "l4_r9pod"
Level["scenegraph"]["l4_r9exit"]["visible"][9] = "l4_r9up"
Level["scenegraph"]["l4_r9middle"] = {}
Level["scenegraph"]["l4_r9middle"]["visible"] = {}
Level["scenegraph"]["l4_r9middle"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9middle"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r9middle"]["visible"][3] = "l4_r9"
Level["scenegraph"]["l4_r9middle"]["visible"][4] = "l4_r9down"
Level["scenegraph"]["l4_r9middle"]["visible"][5] = "l4_r9entrance"
Level["scenegraph"]["l4_r9middle"]["visible"][6] = "l4_r9exit"
Level["scenegraph"]["l4_r9middle"]["visible"][7] = "l4_r9pod"
Level["scenegraph"]["l4_r9middle"]["visible"][8] = "l4_r9up"
Level["scenegraph"]["l4_r9pod"] = {}
Level["scenegraph"]["l4_r9pod"]["visible"] = {}
Level["scenegraph"]["l4_r9pod"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9pod"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r9pod"]["visible"][3] = "l4_r9"
Level["scenegraph"]["l4_r9pod"]["visible"][4] = "l4_r9down"
Level["scenegraph"]["l4_r9pod"]["visible"][5] = "l4_r9entrance"
Level["scenegraph"]["l4_r9pod"]["visible"][6] = "l4_r9exit"
Level["scenegraph"]["l4_r9pod"]["visible"][7] = "l4_r9middle"
Level["scenegraph"]["l4_r9pod"]["visible"][8] = "l4_r9up"
Level["scenegraph"]["l4_r9up"] = {}
Level["scenegraph"]["l4_r9up"]["visible"] = {}
Level["scenegraph"]["l4_r9up"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_r9up"]["visible"][2] = "l4_levelstars"
Level["scenegraph"]["l4_r9up"]["visible"][3] = "l4_r9"
Level["scenegraph"]["l4_r9up"]["visible"][4] = "l4_r9down"
Level["scenegraph"]["l4_r9up"]["visible"][5] = "l4_r9entrance"
Level["scenegraph"]["l4_r9up"]["visible"][6] = "l4_r9exit"
Level["scenegraph"]["l4_r9up"]["visible"][7] = "l4_r9middle"
Level["scenegraph"]["l4_r9up"]["visible"][8] = "l4_r9pod"
Level["scenegraph"]["l4_ra_90tun00"] = {}
Level["scenegraph"]["l4_ra_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_ra_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_ra_90tun00"]["visible"][2] = "l4_r5a"
Level["scenegraph"]["l4_ra_90tun00"]["visible"][3] = "l4_ra_90tun01"
Level["scenegraph"]["l4_ra_90tun01"] = {}
Level["scenegraph"]["l4_ra_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_ra_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_ra_90tun01"]["visible"][2] = "l4_r5"
Level["scenegraph"]["l4_ra_90tun01"]["visible"][3] = "l4_r5exit"
Level["scenegraph"]["l4_ra_90tun01"]["visible"][4] = "l4_r5shatter"
Level["scenegraph"]["l4_ra_90tun01"]["visible"][5] = "l4_r5smash"
Level["scenegraph"]["l4_ra_90tun01"]["visible"][6] = "l4_ra_90tun00"
Level["scenegraph"]["l4_rb_90tun00"] = {}
Level["scenegraph"]["l4_rb_90tun00"]["env"] = 12
Level["scenegraph"]["l4_rb_90tun00"]["visible"] = {}
Level["scenegraph"]["l4_rb_90tun00"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_rb_90tun00"]["visible"][2] = "l4_r5a"
Level["scenegraph"]["l4_rb_90tun00"]["visible"][3] = "l4_rb_90tun01"
Level["scenegraph"]["l4_rb_90tun01"] = {}
Level["scenegraph"]["l4_rb_90tun01"]["env"] = 12
Level["scenegraph"]["l4_rb_90tun01"]["visible"] = {}
Level["scenegraph"]["l4_rb_90tun01"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4_rb_90tun01"]["visible"][2] = "l4_r5"
Level["scenegraph"]["l4_rb_90tun01"]["visible"][3] = "l4_r5exit"
Level["scenegraph"]["l4_rb_90tun01"]["visible"][4] = "l4_rb_90tun00"
Level["scenegraph"]["l4r1boundbits"] = {}
Level["scenegraph"]["l4r1boundbits"]["bmax"] = {}
Level["scenegraph"]["l4r1boundbits"]["bmax"][1] = 0
Level["scenegraph"]["l4r1boundbits"]["bmax"][2] = 0
Level["scenegraph"]["l4r1boundbits"]["bmax"][3] = 0
Level["scenegraph"]["l4r1boundbits"]["bmin"] = {}
Level["scenegraph"]["l4r1boundbits"]["bmin"][1] = 0
Level["scenegraph"]["l4r1boundbits"]["bmin"][2] = 0
Level["scenegraph"]["l4r1boundbits"]["bmin"][3] = 0
Level["scenegraph"]["l4r1outtun"] = {}
Level["scenegraph"]["l4r1outtun"]["visible"] = {}
Level["scenegraph"]["l4r1outtun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4r1outtun"]["visible"][2] = "l4_r0"
Level["scenegraph"]["l4r1outtun"]["visible"][3] = "l4_r1"
Level["scenegraph"]["l4r1outtun"]["visible"][4] = "l4r1boundbits"
Level["scenegraph"]["l4r1outtun"]["visible"][5] = "l4r2intun"
Level["scenegraph"]["l4r2intun"] = {}
Level["scenegraph"]["l4r2intun"]["env"] = 8
Level["scenegraph"]["l4r2intun"]["visible"] = {}
Level["scenegraph"]["l4r2intun"]["visible"][1] = "l4_levellight"
Level["scenegraph"]["l4r2intun"]["visible"][2] = "l4_r2"
Level["scenegraph"]["l4r2intun"]["visible"][3] = "l4r1outtun"
Level["scenegraph"]["l4r2intun"]["visible"][4] = "l4r2outerbits"
Level["scenegraph"]["l4r2outerbits"] = {}
Level["scenegraph"]["l4r2outerbits"]["bmax"] = {}
Level["scenegraph"]["l4r2outerbits"]["bmax"][1] = 0
Level["scenegraph"]["l4r2outerbits"]["bmax"][2] = 0
Level["scenegraph"]["l4r2outerbits"]["bmax"][3] = 0
Level["scenegraph"]["l4r2outerbits"]["bmin"] = {}
Level["scenegraph"]["l4r2outerbits"]["bmin"][1] = 0
Level["scenegraph"]["l4r2outerbits"]["bmin"][2] = 0
Level["scenegraph"]["l4r2outerbits"]["bmin"][3] = 0
Level["scenegraph"]["sections"] = {}
Level["scenegraph"]["sections"]["preloaded"] = {}
Level["scenegraph"]["sections"]["preloaded"]["size"] = 4386758
Level["scenegraph"]["sections"]["preloaded"][1] = "apple.mod"
Level["scenegraph"]["sections"]["preloaded"][10] = "dummydecoy.mod"
Level["scenegraph"]["sections"]["preloaded"][11] = "effect00.mod"
Level["scenegraph"]["sections"]["preloaded"][12] = "effect02.mod"
Level["scenegraph"]["sections"]["preloaded"][13] = "explode0.mod"
Level["scenegraph"]["sections"]["preloaded"][14] = "explode1.mod"
Level["scenegraph"]["sections"]["preloaded"][15] = "explode12.mod"
Level["scenegraph"]["sections"]["preloaded"][16] = "explode16.mod"
Level["scenegraph"]["sections"]["preloaded"][17] = "explode3.mod"
Level["scenegraph"]["sections"]["preloaded"][18] = "explode9.mod"
Level["scenegraph"]["sections"]["preloaded"][19] = "fballgun.mod"
Level["scenegraph"]["sections"]["preloaded"][2] = "biologo1.tex"
Level["scenegraph"]["sections"]["preloaded"][20] = "fx_selectgun.mod"
Level["scenegraph"]["sections"]["preloaded"][21] = "fx_selecthth.mod"
Level["scenegraph"]["sections"]["preloaded"][22] = "fx_selectitm.mod"
Level["scenegraph"]["sections"]["preloaded"][23] = "grenade.mod"
Level["scenegraph"]["sections"]["preloaded"][24] = "ham.mod"
Level["scenegraph"]["sections"]["preloaded"][25] = "hit1a.tex"
Level["scenegraph"]["sections"]["preloaded"][26] = "kurt.mod"
Level["scenegraph"]["sections"]["preloaded"][27] = "turshot09.mod"
Level["scenegraph"]["sections"]["preloaded"][28] = "kurthealth.mod"
Level["scenegraph"]["sections"]["preloaded"][29] = "kurtinv_active.mod"
Level["scenegraph"]["sections"]["preloaded"][3] = "blackhole.mod"
Level["scenegraph"]["sections"]["preloaded"][30] = "kurtinventory.mod"
Level["scenegraph"]["sections"]["preloaded"][31] = "kurtsnipe.mod"
Level["scenegraph"]["sections"]["preloaded"][32] = "kurtsnipeinv.mod"
Level["scenegraph"]["sections"]["preloaded"][33] = "l2_door.mod"
Level["scenegraph"]["sections"]["preloaded"][34] = "l4_blower.mod"
Level["scenegraph"]["sections"]["preloaded"][35] = "l4_levellight.mod"
Level["scenegraph"]["sections"]["preloaded"][36] = "l4_levelstars.mod"
Level["scenegraph"]["sections"]["preloaded"][37] = "l4_platform.mod"
Level["scenegraph"]["sections"]["preloaded"][38] = "l4_sniplock.mod"
Level["scenegraph"]["sections"]["preloaded"][39] = "lightflare02.tex"
Level["scenegraph"]["sections"]["preloaded"][4] = "breath.mod"
Level["scenegraph"]["sections"]["preloaded"][40] = "lightflare05.tex"
Level["scenegraph"]["sections"]["preloaded"][41] = "mdk2.str"
Level["scenegraph"]["sections"]["preloaded"][42] = "optionbox1.tex"
Level["scenegraph"]["sections"]["preloaded"][43] = "ricochet.mod"
Level["scenegraph"]["sections"]["preloaded"][44] = "schaingun.mod"
Level["scenegraph"]["sections"]["preloaded"][45] = "sniperbounce.mod"
Level["scenegraph"]["sections"]["preloaded"][46] = "sniperbullet.mod"
Level["scenegraph"]["sections"]["preloaded"][47] = "snipergrenade.mod"
Level["scenegraph"]["sections"]["preloaded"][48] = "sniperhoming.mod"
Level["scenegraph"]["sections"]["preloaded"][49] = "snipermortar.mod"
Level["scenegraph"]["sections"]["preloaded"][5] = "chaingun.mod"
Level["scenegraph"]["sections"]["preloaded"][50] = "snipershield.mod"
Level["scenegraph"]["sections"]["preloaded"][51] = "snipersilencer.mod"
Level["scenegraph"]["sections"]["preloaded"][52] = "snipeshield.mod"
Level["scenegraph"]["sections"]["preloaded"][53] = "textbox1.tex"
Level["scenegraph"]["sections"]["preloaded"][54] = "textbox2.tex"
Level["scenegraph"]["sections"]["preloaded"][55] = "turret04.mod"
Level["scenegraph"]["sections"]["preloaded"][56] = "turret06.mod"
Level["scenegraph"]["sections"]["preloaded"][57] = "turshot03.mod"
Level["scenegraph"]["sections"]["preloaded"][6] = "checkpoint.mod"
Level["scenegraph"]["sections"]["preloaded"][7] = "chute.mod"
Level["scenegraph"]["sections"]["preloaded"][8] = "cloak.mod"
Level["scenegraph"]["sections"]["preloaded"][9] = "decoygrenade.mod"
Level["scenegraph"]["sections"]["sectionA"] = {}
Level["scenegraph"]["sections"]["sectionA"]["size"] = 7039050
Level["scenegraph"]["sections"]["sectionA"][1] = "ao_pod.mod"
Level["scenegraph"]["sections"]["sectionA"][10] = "l4_pit.mod"
Level["scenegraph"]["sections"]["sectionA"][11] = "l4_poles.mod"
Level["scenegraph"]["sections"]["sectionA"][12] = "l4_r0.mod"
Level["scenegraph"]["sections"]["sectionA"][13] = "l4_r0portal.mod"
Level["scenegraph"]["sections"]["sectionA"][14] = "l4_r0shatter.mod"
Level["scenegraph"]["sections"]["sectionA"][15] = "l4_r1.mod"
Level["scenegraph"]["sections"]["sectionA"][16] = "l4_r1blimp.mod"
Level["scenegraph"]["sections"]["sectionA"][17] = "l4_r1dynamic.mod"
Level["scenegraph"]["sections"]["sectionA"][18] = "l4_r1mantas.mod"
Level["scenegraph"]["sections"]["sectionA"][19] = "l4_r1shatter.mod"
Level["scenegraph"]["sections"]["sectionA"][2] = "bif.mod"
Level["scenegraph"]["sections"]["sectionA"][20] = "l4_r1spacedeath.mod"
Level["scenegraph"]["sections"]["sectionA"][21] = "l4_r2.mod"
Level["scenegraph"]["sections"]["sectionA"][22] = "l4_r2_90tun00.mod"
Level["scenegraph"]["sections"]["sectionA"][23] = "l4_r2_90tun01.mod"
Level["scenegraph"]["sections"]["sectionA"][24] = "l4_r2ballhit.mod"
Level["scenegraph"]["sections"]["sectionA"][25] = "l4_r2blimps.mod"
Level["scenegraph"]["sections"]["sectionA"][26] = "l4_r2exit.mod"
Level["scenegraph"]["sections"]["sectionA"][27] = "l4_r3.mod"
Level["scenegraph"]["sections"]["sectionA"][28] = "l4_r3_90tun00.mod"
Level["scenegraph"]["sections"]["sectionA"][29] = "l4_r3_90tun01.mod"
Level["scenegraph"]["sections"]["sectionA"][3] = "bifshot.mod"
Level["scenegraph"]["sections"]["sectionA"][30] = "l4_r3entrance.mod"
Level["scenegraph"]["sections"]["sectionA"][31] = "l4_r3exit.mod"
Level["scenegraph"]["sections"]["sectionA"][32] = "l4_r3pulsing.mod"
Level["scenegraph"]["sections"]["sectionA"][33] = "l4_r4.mod"
Level["scenegraph"]["sections"]["sectionA"][34] = "l4_r4_180tun00.mod"
Level["scenegraph"]["sections"]["sectionA"][35] = "l4_r4_180tun00.mod"
Level["scenegraph"]["sections"]["sectionA"][36] = "l4_r4_180tun01.mod"
Level["scenegraph"]["sections"]["sectionA"][37] = "l4_r4_180tun01.mod"
Level["scenegraph"]["sections"]["sectionA"][38] = "l4_r4_90tun00.mod"
Level["scenegraph"]["sections"]["sectionA"][39] = "l4_r4_90tun00.mod"
Level["scenegraph"]["sections"]["sectionA"][4] = "explode12.mod"
Level["scenegraph"]["sections"]["sectionA"][40] = "l4_r4_90tun01.mod"
Level["scenegraph"]["sections"]["sectionA"][41] = "l4_r4_90tun01.mod"
Level["scenegraph"]["sections"]["sectionA"][42] = "l4_r4_deadtun.mod"
Level["scenegraph"]["sections"]["sectionA"][43] = "l4_r4_deadtun.mod"
Level["scenegraph"]["sections"]["sectionA"][44] = "l4_r4ball00.mod"
Level["scenegraph"]["sections"]["sectionA"][45] = "l4_r4ball01.mod"
Level["scenegraph"]["sections"]["sectionA"][46] = "l4_r4ball02.mod"
Level["scenegraph"]["sections"]["sectionA"][47] = "l4_r4falling.mod"
Level["scenegraph"]["sections"]["sectionA"][48] = "l4_r4vortex.mod"
Level["scenegraph"]["sections"]["sectionA"][49] = "l4_tornado.mod"
Level["scenegraph"]["sections"]["sectionA"][5] = "explode18.mod"
Level["scenegraph"]["sections"]["sectionA"][50] = "l4r1boundbits.mod"
Level["scenegraph"]["sections"]["sectionA"][51] = "l4r1outtun.mod"
Level["scenegraph"]["sections"]["sectionA"][52] = "l4r2intun.mod"
Level["scenegraph"]["sections"]["sectionA"][53] = "l4r2outerbits.mod"
Level["scenegraph"]["sections"]["sectionA"][54] = "manta.mod"
Level["scenegraph"]["sections"]["sectionA"][55] = "samrock.mod"
Level["scenegraph"]["sections"]["sectionA"][56] = "sniperlock.mod"
Level["scenegraph"]["sections"]["sectionA"][57] = "sod.mod"
Level["scenegraph"]["sections"]["sectionA"][58] = "switch01.mod"
Level["scenegraph"]["sections"]["sectionA"][59] = "turshot01.mod"
Level["scenegraph"]["sections"]["sectionA"][6] = "explode5.mod"
Level["scenegraph"]["sections"]["sectionA"][60] = "turshot02.mod"
Level["scenegraph"]["sections"]["sectionA"][61] = "udboy1shot.mod"
Level["scenegraph"]["sections"]["sectionA"][62] = "udboy2shot.mod"
Level["scenegraph"]["sections"]["sectionA"][63] = "ultradogan.mod"
Level["scenegraph"]["sections"]["sectionA"][7] = "explode7.mod"
Level["scenegraph"]["sections"]["sectionA"][8] = "explode8.mod"
Level["scenegraph"]["sections"]["sectionA"][9] = "generator.mod"
Level["scenegraph"]["sections"]["sectionB"] = {}
Level["scenegraph"]["sections"]["sectionB"]["size"] = 8806803
Level["scenegraph"]["sections"]["sectionB"][1] = "bif.mod"
Level["scenegraph"]["sections"]["sectionB"][10] = "explode13.mod"
Level["scenegraph"]["sections"]["sectionB"][11] = "explode2.mod"
Level["scenegraph"]["sections"]["sectionB"][12] = "explode5.mod"
Level["scenegraph"]["sections"]["sectionB"][13] = "explode6.mod"
Level["scenegraph"]["sections"]["sectionB"][14] = "generator.mod"
Level["scenegraph"]["sections"]["sectionB"][15] = "grunt.mod"
Level["scenegraph"]["sections"]["sectionB"][16] = "l4_r4_180tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][17] = "l4_r4_180tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][18] = "l4_r4_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][19] = "l4_r4_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][2] = "bifshot.mod"
Level["scenegraph"]["sections"]["sectionB"][20] = "l4_r4_deadtun.mod"
Level["scenegraph"]["sections"]["sectionB"][21] = "l4_r5.mod"
Level["scenegraph"]["sections"]["sectionB"][22] = "l4_r5_180tun69.mod"
Level["scenegraph"]["sections"]["sectionB"][23] = "l4_r5_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][24] = "l4_r5_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][25] = "l4_r5a.mod"
Level["scenegraph"]["sections"]["sectionB"][26] = "l4_r5dynbits.mod"
Level["scenegraph"]["sections"]["sectionB"][27] = "l4_r5entrance.mod"
Level["scenegraph"]["sections"]["sectionB"][28] = "l4_r5exit.mod"
Level["scenegraph"]["sections"]["sectionB"][29] = "l4_r5lights.mod"
Level["scenegraph"]["sections"]["sectionB"][3] = "boxingglove.mod"
Level["scenegraph"]["sections"]["sectionB"][30] = "l4_r5lights01.mod"
Level["scenegraph"]["sections"]["sectionB"][31] = "l4_r5shatter.mod"
Level["scenegraph"]["sections"]["sectionB"][32] = "l4_r5side.mod"
Level["scenegraph"]["sections"]["sectionB"][33] = "l4_r5sideani.mod"
Level["scenegraph"]["sections"]["sectionB"][34] = "l4_r5smash.mod"
Level["scenegraph"]["sections"]["sectionB"][35] = "l4_r6.mod"
Level["scenegraph"]["sections"]["sectionB"][36] = "l4_r6_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][37] = "l4_r6_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][38] = "l4_r6beamanim1.mod"
Level["scenegraph"]["sections"]["sectionB"][39] = "l4_r6beamanim2.mod"
Level["scenegraph"]["sections"]["sectionB"][4] = "conefart.mod"
Level["scenegraph"]["sections"]["sectionB"][40] = "l4_r6beamanim3.mod"
Level["scenegraph"]["sections"]["sectionB"][41] = "l4_r6entrance.mod"
Level["scenegraph"]["sections"]["sectionB"][42] = "l4_r6exit.mod"
Level["scenegraph"]["sections"]["sectionB"][43] = "l4_r6skyanim00.mod"
Level["scenegraph"]["sections"]["sectionB"][44] = "l4_r6skyanim01.mod"
Level["scenegraph"]["sections"]["sectionB"][45] = "l4_r7.mod"
Level["scenegraph"]["sections"]["sectionB"][46] = "l4_r7_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][47] = "l4_r7_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][48] = "l4_r7_emitter.mod"
Level["scenegraph"]["sections"]["sectionB"][49] = "l4_r7a.mod"
Level["scenegraph"]["sections"]["sectionB"][5] = "conehead.mod"
Level["scenegraph"]["sections"]["sectionB"][50] = "l4_r7a_180tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][51] = "l4_r7a_180tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][52] = "l4_r7a_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][53] = "l4_r7a_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][54] = "l4_r7a_deadtun.mod"
Level["scenegraph"]["sections"]["sectionB"][55] = "l4_r7aentrance.mod"
Level["scenegraph"]["sections"]["sectionB"][56] = "l4_r7aexit.mod"
Level["scenegraph"]["sections"]["sectionB"][57] = "l4_r7death.mod"
Level["scenegraph"]["sections"]["sectionB"][58] = "l4_r7entrance.mod"
Level["scenegraph"]["sections"]["sectionB"][59] = "l4_r7exit.mod"
Level["scenegraph"]["sections"]["sectionB"][6] = "dbgrenade.mod"
Level["scenegraph"]["sections"]["sectionB"][60] = "l4_ra_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][61] = "l4_ra_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][62] = "l4_rb_90tun00.mod"
Level["scenegraph"]["sections"]["sectionB"][63] = "l4_rb_90tun01.mod"
Level["scenegraph"]["sections"]["sectionB"][64] = "l4r6_doors.mod"
Level["scenegraph"]["sections"]["sectionB"][65] = "lightflare03.tex"
Level["scenegraph"]["sections"]["sectionB"][66] = "pdboy1shot.mod"
Level["scenegraph"]["sections"]["sectionB"][67] = "poopsy.mod"
Level["scenegraph"]["sections"]["sectionB"][7] = "dboy1shot.mod"
Level["scenegraph"]["sections"]["sectionB"][8] = "doganboy.mod"
Level["scenegraph"]["sections"]["sectionB"][9] = "exitlite.mod"
Level["scenegraph"]["sections"]["sectionC"] = {}
Level["scenegraph"]["sections"]["sectionC"]["size"] = 2715586
Level["scenegraph"]["sections"]["sectionC"][1] = "dbgrenade.mod"
Level["scenegraph"]["sections"]["sectionC"][10] = "l4_r7a_deadtun.mod"
Level["scenegraph"]["sections"]["sectionC"][11] = "l4_r8.mod"
Level["scenegraph"]["sections"]["sectionC"][12] = "l4_r8_180tun00.mod"
Level["scenegraph"]["sections"]["sectionC"][13] = "l4_r8_180tun00.mod"
Level["scenegraph"]["sections"]["sectionC"][14] = "l4_r8_180tun01.mod"
Level["scenegraph"]["sections"]["sectionC"][15] = "l4_r8_180tun01.mod"
Level["scenegraph"]["sections"]["sectionC"][16] = "l4_r8_90tun00.mod"
Level["scenegraph"]["sections"]["sectionC"][17] = "l4_r8_90tun00.mod"
Level["scenegraph"]["sections"]["sectionC"][18] = "l4_r8_90tun01.mod"
Level["scenegraph"]["sections"]["sectionC"][19] = "l4_r8_90tun01.mod"
Level["scenegraph"]["sections"]["sectionC"][2] = "dboy1shot.mod"
Level["scenegraph"]["sections"]["sectionC"][20] = "l4_r8_blowers.mod"
Level["scenegraph"]["sections"]["sectionC"][21] = "l4_r8_bridge.mod"
Level["scenegraph"]["sections"]["sectionC"][22] = "l4_r8_deadtun.mod"
Level["scenegraph"]["sections"]["sectionC"][23] = "l4_r8_deadtun.mod"
Level["scenegraph"]["sections"]["sectionC"][24] = "l4_r8_lava.mod"
Level["scenegraph"]["sections"]["sectionC"][25] = "l4_r8entrance.mod"
Level["scenegraph"]["sections"]["sectionC"][26] = "l4_r8exit.mod"
Level["scenegraph"]["sections"]["sectionC"][3] = "doganboy.mod"
Level["scenegraph"]["sections"]["sectionC"][4] = "explode6.mod"
Level["scenegraph"]["sections"]["sectionC"][5] = "generator.mod"
Level["scenegraph"]["sections"]["sectionC"][6] = "l4_r7a_180tun00.mod"
Level["scenegraph"]["sections"]["sectionC"][7] = "l4_r7a_180tun01.mod"
Level["scenegraph"]["sections"]["sectionC"][8] = "l4_r7a_90tun00.mod"
Level["scenegraph"]["sections"]["sectionC"][9] = "l4_r7a_90tun01.mod"
Level["scenegraph"]["sections"]["sectionD"] = {}
Level["scenegraph"]["sections"]["sectionD"]["size"] = 5549530
Level["scenegraph"]["sections"]["sectionD"][1] = "dialog.mod"
Level["scenegraph"]["sections"]["sectionD"][10] = "l4_r8_90tun01.mod"
Level["scenegraph"]["sections"]["sectionD"][11] = "l4_r8_deadtun.mod"
Level["scenegraph"]["sections"]["sectionD"][12] = "l4_r9.mod"
Level["scenegraph"]["sections"]["sectionD"][13] = "l4_r9a.mod"
Level["scenegraph"]["sections"]["sectionD"][14] = "l4_r9rimwall.mod"
Level["scenegraph"]["sections"]["sectionD"][15] = "l4r9_doorgob.mod"
Level["scenegraph"]["sections"]["sectionD"][16] = "l4r9_hutroof.mod"
Level["scenegraph"]["sections"]["sectionD"][17] = "l4r9_hutshat.mod"
Level["scenegraph"]["sections"]["sectionD"][18] = "l4r9_hutwalls.mod"
Level["scenegraph"]["sections"]["sectionD"][19] = "l4r9_ringbsp.mod"
Level["scenegraph"]["sections"]["sectionD"][2] = "dialogtop.mod"
Level["scenegraph"]["sections"]["sectionD"][20] = "l4r9_ringlava.mod"
Level["scenegraph"]["sections"]["sectionD"][21] = "l4r9_ringshat.mod"
Level["scenegraph"]["sections"]["sectionD"][22] = "l4sh_beamchrg.mod"
Level["scenegraph"]["sections"]["sectionD"][23] = "l4sh_beams1.mod"
Level["scenegraph"]["sections"]["sectionD"][24] = "l4sh_beams2.mod"
Level["scenegraph"]["sections"]["sectionD"][25] = "l4sh_beams3.mod"
Level["scenegraph"]["sections"]["sectionD"][26] = "l4sh_camera1.mod"
Level["scenegraph"]["sections"]["sectionD"][27] = "l4sh_camera2.mod"
Level["scenegraph"]["sections"]["sectionD"][28] = "l4sh_camera3.mod"
Level["scenegraph"]["sections"]["sectionD"][29] = "l4sh_deathcam.mod"
Level["scenegraph"]["sections"]["sectionD"][3] = "explode1.mod"
Level["scenegraph"]["sections"]["sectionD"][30] = "l4sh_switch.mod"
Level["scenegraph"]["sections"]["sectionD"][31] = "max.mod"
Level["scenegraph"]["sections"]["sectionD"][32] = "maxhead.mod"
Level["scenegraph"]["sections"]["sectionD"][33] = "ml4_stuntkurt.mod"
Level["scenegraph"]["sections"]["sectionD"][34] = "ml4_stuntmax.mod"
Level["scenegraph"]["sections"]["sectionD"][35] = "ml4_stuntshwang.mod"
Level["scenegraph"]["sections"]["sectionD"][36] = "ml4x_btnmover.mod"
Level["scenegraph"]["sections"]["sectionD"][37] = "ml4x_camera.mod"
Level["scenegraph"]["sections"]["sectionD"][38] = "ml4x_krmovegob.mod"
Level["scenegraph"]["sections"]["sectionD"][39] = "ml4x_maxmovegob.mod"
Level["scenegraph"]["sections"]["sectionD"][4] = "explode11.mod"
Level["scenegraph"]["sections"]["sectionD"][40] = "ml4x_shwmove.mod"
Level["scenegraph"]["sections"]["sectionD"][41] = "samrock.mod"
Level["scenegraph"]["sections"]["sectionD"][42] = "samsmite.mod"
Level["scenegraph"]["sections"]["sectionD"][43] = "schwhead.mod"
Level["scenegraph"]["sections"]["sectionD"][44] = "shwang.mod"
Level["scenegraph"]["sections"]["sectionD"][45] = "shwang_damage1.wav"
Level["scenegraph"]["sections"]["sectionD"][46] = "shwang_damage2.wav"
Level["scenegraph"]["sections"]["sectionD"][47] = "shwang_damage3.wav"
Level["scenegraph"]["sections"]["sectionD"][48] = "shwang_die2.wav"
Level["scenegraph"]["sections"]["sectionD"][49] = "shwang_taunt1.wav"
Level["scenegraph"]["sections"]["sectionD"][5] = "explode8.mod"
Level["scenegraph"]["sections"]["sectionD"][50] = "shwang_taunt2.wav"
Level["scenegraph"]["sections"]["sectionD"][51] = "shwang_taunt3.wav"
Level["scenegraph"]["sections"]["sectionD"][52] = "shwang_taunt4.wav"
Level["scenegraph"]["sections"]["sectionD"][53] = "sniperlock.mod"
Level["scenegraph"]["sections"]["sectionD"][54] = "turshot01.mod"
Level["scenegraph"]["sections"]["sectionD"][55] = "turshot13.mod"
Level["scenegraph"]["sections"]["sectionD"][56] = "uzi.mod"
Level["scenegraph"]["sections"]["sectionD"][57] = "dbgrenade.mod"
Level["scenegraph"]["sections"]["sectionD"][6] = "kurthead.mod"
Level["scenegraph"]["sections"]["sectionD"][7] = "l4_r8_180tun00.mod"
Level["scenegraph"]["sections"]["sectionD"][8] = "l4_r8_180tun01.mod"
Level["scenegraph"]["sections"]["sectionD"][9] = "l4_r8_90tun00.mod"
Level["scenegraph"]["sections"]["sectionE"] = {}
Level["scenegraph"]["sections"]["sectionE"]["size"] = 5121747
Level["scenegraph"]["sections"]["sectionE"][1] = "coneheadhead.mod"
Level["scenegraph"]["sections"]["sectionE"][10] = "l4r9_hutroof.mod"
Level["scenegraph"]["sections"]["sectionE"][11] = "l4r9_hutshat.mod"
Level["scenegraph"]["sections"]["sectionE"][12] = "l4r9_hutwalls.mod"
Level["scenegraph"]["sections"]["sectionE"][13] = "l4r9_ringbsp.mod"
Level["scenegraph"]["sections"]["sectionE"][14] = "l4r9_ringlava.mod"
Level["scenegraph"]["sections"]["sectionE"][15] = "l4r9_ringshat.mod"
Level["scenegraph"]["sections"]["sectionE"][16] = "l4sh_beamchrg.mod"
Level["scenegraph"]["sections"]["sectionE"][17] = "l4sh_beams1.mod"
Level["scenegraph"]["sections"]["sectionE"][18] = "l4sh_beams2.mod"
Level["scenegraph"]["sections"]["sectionE"][19] = "l4sh_beams3.mod"
Level["scenegraph"]["sections"]["sectionE"][2] = "dialog.mod"
Level["scenegraph"]["sections"]["sectionE"][20] = "l4sh_switch.mod"
Level["scenegraph"]["sections"]["sectionE"][21] = "ml4_stuntcnhead.mod"
Level["scenegraph"]["sections"]["sectionE"][22] = "ml4_stuntkurt.mod"
Level["scenegraph"]["sections"]["sectionE"][23] = "ml4_stuntmax.mod"
Level["scenegraph"]["sections"]["sectionE"][24] = "ml4_stuntshwang.mod"
Level["scenegraph"]["sections"]["sectionE"][25] = "ml4z_bridge.mod"
Level["scenegraph"]["sections"]["sectionE"][26] = "ml4z_camera01.mod"
Level["scenegraph"]["sections"]["sectionE"][27] = "ml4z_camera02.mod"
Level["scenegraph"]["sections"]["sectionE"][28] = "ml4z_ch1movegob.mod"
Level["scenegraph"]["sections"]["sectionE"][29] = "ml4z_ch2movegob.mod"
Level["scenegraph"]["sections"]["sectionE"][3] = "dialogtop.mod"
Level["scenegraph"]["sections"]["sectionE"][30] = "ml4z_kurtmovegb.mod"
Level["scenegraph"]["sections"]["sectionE"][31] = "ml4z_maxmovegob.mod"
Level["scenegraph"]["sections"]["sectionE"][32] = "ml4z_shwmovegob.mod"
Level["scenegraph"]["sections"]["sectionE"][33] = "schwhead.mod"
Level["scenegraph"]["sections"]["sectionE"][34] = "sniperlock.mod"
Level["scenegraph"]["sections"]["sectionE"][4] = "jd3_jladder01.mod"
Level["scenegraph"]["sections"]["sectionE"][5] = "kurthead.mod"
Level["scenegraph"]["sections"]["sectionE"][6] = "l4_r8_90tun01.mod"
Level["scenegraph"]["sections"]["sectionE"][7] = "l4_r9.mod"
Level["scenegraph"]["sections"]["sectionE"][8] = "l4_r9a.mod"
Level["scenegraph"]["sections"]["sectionE"][9] = "l4r9_doorgob.mod"
Level["scenegraph"]["sections"]["sectionF"] = {}
Level["scenegraph"]["sections"]["sectionF"]["size"] = 3845515
Level["scenegraph"]["sections"]["sectionF"][1] = "ao_pod.mod"
Level["scenegraph"]["sections"]["sectionF"][10] = "l4_r1spacedeath.mod"
Level["scenegraph"]["sections"]["sectionF"][11] = "l4r1boundbits.mod"
Level["scenegraph"]["sections"]["sectionF"][12] = "l4r1outtun.mod"
Level["scenegraph"]["sections"]["sectionF"][13] = "l4r2intun.mod"
Level["scenegraph"]["sections"]["sectionF"][14] = "ml4_stuntkurt.mod"
Level["scenegraph"]["sections"]["sectionF"][15] = "ml4_stuntnude.mod"
Level["scenegraph"]["sections"]["sectionF"][16] = "ml4a_camera.mod"
Level["scenegraph"]["sections"]["sectionF"][17] = "ml4a_krmovegob.mod"
Level["scenegraph"]["sections"]["sectionF"][18] = "ml4a_ndmovegob.mod"
Level["scenegraph"]["sections"]["sectionF"][19] = "poopsy.mod"
Level["scenegraph"]["sections"]["sectionF"][2] = "bif.mod"
Level["scenegraph"]["sections"]["sectionF"][20] = "switch01.mod"
Level["scenegraph"]["sections"]["sectionF"][3] = "effect04.mod"
Level["scenegraph"]["sections"]["sectionF"][4] = "l4_r0.mod"
Level["scenegraph"]["sections"]["sectionF"][5] = "l4_r0portal.mod"
Level["scenegraph"]["sections"]["sectionF"][6] = "l4_r0shatter.mod"
Level["scenegraph"]["sections"]["sectionF"][7] = "l4_r1.mod"
Level["scenegraph"]["sections"]["sectionF"][8] = "l4_r1dynamic.mod"
Level["scenegraph"]["sections"]["sectionF"][9] = "l4_r1shatter.mod"
Level["sounds"] = {}
Level["sounds"]["amb_alien10.wav"] = 0
Level["sounds"]["amb_alien3.wav"] = 0
Level["sounds"]["amb_alien5.wav"] = 0
Level["sounds"]["amb_comp4.wav"] = 1
Level["sounds"]["bullet_bounce.wav"] = 0
Level["sounds"]["checkpoint.wav"] = 0
Level["sounds"]["cloak_disable.wav"] = 0
Level["sounds"]["cloak_use.wav"] = 0
Level["sounds"]["dogan_bounce.wav"] = 0
Level["sounds"]["dogan_grenade.wav"] = 0
Level["sounds"]["glass_break.wav"] = 0
Level["sounds"]["glass_break2.wav"] = 0
Level["sounds"]["grenade_bounce.wav"] = 0
Level["sounds"]["jd_hifi.wav"] = 0
Level["sounds"]["kurt_gun.wav"] = 1
Level["sounds"]["kurt_laser.wav"] = 1
Level["sounds"]["kurt_sgun.wav"] = 1
Level["sounds"]["max_jump.wav"] = 0
Level["sounds"]["max_whine.wav"] = 0
Level["sounds"]["mortar_bounce.wav"] = 0
Level["sounds"]["option_bar.wav"] = 0
Level["sounds"]["option_button.wav"] = 0
Level["sounds"]["option_select.wav"] = 0
Level["sounds"]["rumble1.wav"] = 0
Level["sounds"]["rumble2.wav"] = 0
Level["sounds"]["shatter1.wav"] = 0
Level["sounds"]["shatter3.wav"] = 0

if PreInitLevel()==1 then Level=nil return end

-- FUNCTIONS



Level.BeamOnAnimLoop = function(gob, animid)

    if (animid == ANIM_ACTION00) then

        local colorinfo = l4_r9.colorinfo[l4_r9.activeswitch.color]

        --print(format("stop damage (%s)", gob.name))

        -- restore play mode --
        mdkEnablePlayerControl()
        mdkEnableDefaultCamera()
        omGobEnterStasis(colorinfo.camera)
        mdkGobSyncExitStasis(max2)
        PlayerExitStasis()
        God(0)

        -- undo the temporary lock on other enabled switches --
        foreach( l4_r9.switches,
            function(i, gob)
                if (not gob.flipped) then
                    omAnimPlay(gob.sniperlock, ANIM_ENABLED, 0)
                end
            end )

        -- reset switch --
        l4_r9.ResetSwitch(l4_r9.activeswitch)

        -- beam animation is over --
        l4_r9.startdamage = nil
        l4_r9.activeswitch = nil
        l4_r9.damageshwang = nil
        l4_r9.damageplayer = nil
        l4_r9.beamstarted = nil
        --l4_r9.shwanginbeam = nil

    end

end
----------------------------------------------------

Level.BeamOnCustomKey = function(gob, part, key)

    -- trigger damage to shwang and the player --
    if (key == CUSTKEY_USER1) and (not l4_r9.startdamage) then

        --print(format("start damage (%s)", gob.name))

        l4_r9.damageshwang = 1
        l4_r9.damageplayer = 1
        l4_r9.startdamage = 1

    end

end
----------------------------------------------------

Level.BridgeMovie = function()
	
	if (l4_r8_bridge==nil) then return end
    God(1)

    mdkProxDoorLock(l4_r8entrdoor,1)

    StartMovie(l4_r8_bridge, {

        -- switch to movie mode --
        { PlayerEnterStasis },
	    { mdkDisablePlayerControl, {} },
        { mdkDisableDefaultCamera, {} },
        { mdkDisableGui,    {} },

        -- Bridge Animation --
        { omAnimPlay, { l4_r8_bridge, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
	    { omAnimJustLooped, { l4_r8_bridge, ANIM_ACTION00 } },
       
	    -- restore play mode --
        { mdkEnableGui,    {} },
	    { mdkEnableDefaultCamera, {} },
	    { mdkEnablePlayerControl, {} },
        { PlayerExitStasis },
        { God, { 0 } },
    })
	
end
----------------------------------------------------

Level.GenDone = function()
    
    Save.gensdone = Save.gensdone + 1

    if(Save.gensdone == 1) then
        omAnimPlay(l4_r6exitlite, ANIM_ACTION00, 0)
    elseif(Save.gensdone == 2) then
        omAnimPlay(l4_r6exitlite, ANIM_ACTION01, 0)
    elseif(Save.gensdone == 3) then
        omAnimPlay(l4_r6exitlite, ANIM_ACTION02, 0)
        omGobEnterStasis(l4_r6exitglove)
        omGobEnterStasis(l4r6_doors)
    end

end

----------------------------------------------------

Level.Init = function(cp)
    -- display KURT icon animation
    chControlAnimateImage(KURT_ICON_ANIM, 4);

    -- do checkpoint-specific initialization --
    if (cp >= 0) then
        CreateKurt()
        l4_plat03.hit = 0 
        l4_plat06.hit = 0
        mdkSpawnerSetSpawnedObject (l4_r2_gen00, OBJ_OBSIDIANSAMSMITE, 'l4_r2center', 70, 0, 0, 0, 2, l4_r2)
	    mdkSpawnerSetSpawnedObject (l4_r6gen00, OBJ_POOPSY, "l4_r6pooppen1", 160, 0.5, 36, 0, 2, l4_r6)
	    mdkSpawnerSetSpawnedObject (l4_r6gen02, OBJ_POOPSY, "l4_r6pooppen1", 160, 0.5, 36, 0, 2, l4_r6)
	    mdkSpawnerSetSpawnedObject (l4_r6gen03, OBJ_POOPSY, "l4_r6pooppen1", 160, 0.5, 36, 0, 2, l4_r6)
        l4_r4snipball00.hit = 0
	    l4_r4ball00.spd = 0.8
        l4_r4snipball01.hit = 0
	    l4_r4ball01.spd = 0.8
        l4_r4snipball02.hit = 0
	    l4_r4ball02.spd = 0.8
	    l4_r8.bridge = 0
	    mdkGobSetExplodeOnContact (l4_r8sniplock00,1)
	    mdkGobSetExplodeOnContact (l4_r8sniplock01,1)
        omGobExitStasis(l4_r9max)

        l4_r9.switches = { l4sh_switch1, l4sh_switch2, l4sh_switch3 }
        l4_r9.colorinfo = {
            { camera = l4sh_camera1, beam = l4sh_beams1, point = "shwang_wp6", radius = 15 },
            { camera = l4sh_camera2, beam = l4sh_beams2, point = "shwang_wp2", radius = 15 },
            { camera = l4sh_camera3, beam = l4sh_beams3, point = "shwang_wp8", radius = 15 },
        }

        dofile('ml4x_movie')

        -- start --
        if (cp == 1) then
            mdkSavePoint()
            chSndSwitchMusic(13)

        elseif (cp == 5) then
            mdkProxDoorLock(l4_r3exitdoor, 1)

        elseif (cp == 9) then
            Save.donttakegloveoutofstasis = 1
            omGobEnterStasis(l4_r6exitglove)
            omGobEnterStasis(l4r6_doors)
            mdkProxDoorLock(l4_r6exitdoor, 1)

        elseif (cp == 14) then
            Save.dontspawnbouncebullets = 1
            mdkProxDoorLock(l4_r8exitdoor, 1)

        -- intro movie --
        elseif (cp == 12) then
            dofile('ml4a_movie')
            omGobEnterStasis(l4_r2bif00)
            omGobEnterStasis(l4_r2bif01)
            omGobEnterStasis(l4_r2manta)
            omGobEnterStasis(l4_r2manta01)
            omGobEnterStasis(l4_r1mantas)
            omGobEnterStasis(l4_r1blimp)
            Level.PlayIntroMovie()
            mdkSetAutoSave(4,12)

        -- boss movie --
        elseif (cp == 15) then
            omGobEnterStasis(l4_r9max)
            Level.PlayBossMovie()

        -- end movie --
        elseif (cp == 13) then
            dofile('ml4z_movie')
            omGobEnterStasis(l4_r9max)
            Level.PlayEndMovie()
        end

    end

end

----------------------------------------------------

l4_r0shatter.OnDie = function(gob, crit)
    omGobGMShatter(l4_r0,omGobGMGetSltIndexByName(l4_r0,"l4_r0shatterme"), 1, 0, 0, 80, SHATTEROPTION_VECTOR,3,1)
	omGobGSPlay(l4_r0.shattersound, 0,0,0,0)
    l4_r0.glassgone=1
end
----------------------------------------------------

l4_r0.OnEnterRoom = function(gob)
    if(not l4_r0.shattersound) then
        l4_r0.shattersound = omGobAddSound(l4_r0, "glass_break", 0)
    end
end
----------------------------------------------------

l4_r1shatter.OnDie = function(gob, crit)
    omGobGMShatter(l4_r1,omGobGMGetSltIndexByName(l4_r1,"l4_r1shatterme"), -1, 0, 0, 80, SHATTEROPTION_VECTOR,3,1)
	omGobGSPlay(l4_r1.shattersound, 0,0,0,0)
    l4_r1.glassgone=1
end
----------------------------------------------------

l4_r1.OnEnterRoom = function(gob)
    if(not l4_r1.shattersound) then
        l4_r1.shattersound = omGobAddSound(l4_r1, "glass_break", 0)
    end
end
----------------------------------------------------

l4_r2lock.OnDamage = function(gob, from, damage, damagetype, part)

    if(mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) then
        omAnimPlay(gob, ANIM_DISABLED,0)
        mdkProxDoorLock(l4_r2door00, 0)

    end

end

----------------------------------------------------

l4_r2.OnCreate = function(gob)
    mdkProxDoorLock(l4_r2door00,1)
    
end

----------------------------------------------------

l4_blowlock00.OnDamage = function(gob, from, damage, damagetype, part)
    -- turns on the blower if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_blowlock00, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_r1_blower00, ANIM_ENABLED, 0)
        omAnimPlay(l4_blowlock00, ANIM_DISABLED, 0)
        mdkBlowerEnable(l4_r1_blower00)
    end
end
----------------------------------------------------

l4_blowlock01.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_blowlock01, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_r1_blower01, ANIM_ENABLED, 0)
        omAnimPlay(l4_blowlock01, ANIM_DISABLED, 0)
        mdkBlowerEnable(l4_r1_blower01)
    end
end
----------------------------------------------------

l4_blowlock02.OnDamage = function(gob, from, damage, damagetype, part)
    -- turns on the blower if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and (omAnimIsPlaying(l4_blowlock02, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_r1_blower02, ANIM_ENABLED, 0)
        omAnimPlay(l4_blowlock02, ANIM_DISABLED, 0)
        mdkBlowerEnable(l4_r1_blower02)
    end
end

----------------------------------------------------

l4_lock00.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock00, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_plat00, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat00, ANIM_ENABLED, 0)
    end
end
----------------------------------------------------

l4_lock01.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock01, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_plat01, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat01, ANIM_ENABLED, 0)
    end
end
----------------------------------------------------

l4_lock02.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock02, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_plat02, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat02, ANIM_ENABLED, 0)
    end
end
----------------------------------------------------

l4_lock03.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock03, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_plat03, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat03, ANIM_ENABLED, 0)
    end
end
----------------------------------------------------

l4_lock04.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock04, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_plat04, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat04, ANIM_ENABLED, 0)
    end
end
----------------------------------------------------

l4_lock05.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock05, ANIM_ENABLED) == 1)) then
        omAnimSetSpeed(l4_plat05, ANIM_ENABLED, 0.7)
        omAnimPlay(l4_plat05, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat05, ANIM_ENABLED, 0)
    end
end
----------------------------------------------------

l4_lock06.OnDamage = function(gob, from, damage, damagetype, part)
    -- open the door if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and
        (omAnimIsPlaying(l4_lock06, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_plat06, ANIM_ENABLED, 0)
        omAnimSetDelta(l4_plat06, ANIM_ENABLED, 0)
    end
end

----------------------------------------------------

l4_plat03.OnCollision = function(gob, from)
     if l4_plat03.hit == 0 then
         omAnimPlay(l4_blowlock00,ANIM_ENABLED,0)
         l4_plat03.hit = 1 
     end
end
----------------------------------------------------

l4_plat06.OnCollision = function(gob, from)
    if l4_plat06.hit == 0 then
         omAnimPlay(l4_blowlock01,ANIM_ENABLED,0)
         l4_plat06.hit = 1 
    end
end
----------------------------------------------------

l4_r3.OnCreate = function(gob)
    if (gob.entered == nil) then
        gob.entered = 1
        omAnimPlay(l4_blowlock00,ANIM_DISABLED,0)
        omAnimPlay(l4_blowlock01,ANIM_DISABLED,0)
		omAnimPlay(l4_r1_blower03,ANIM_ENABLED,0)
        mdkBlowerDisable (l4_r1_blower00)
        mdkBlowerDisable (l4_r1_blower01)
        mdkBlowerDisable (l4_r1_blower02)
    end
end
----------------------------------------------------

l4_r4snipball00.OnDamage = function(gob, from, damage, damagetype, part)
	if (mdkIsDamageType(damagetype,DAMAGE_SNIPER)==1) then
        if (l4_r4snipball00.hit == 0) then
		    omAnimSetSpeed ( l4_r4ball00, ANIM_ACTION00, 0)
		    mdkBlowerEnable (l4_r4tornup00)
		    l4_r4snipball00.hit =1
	    else
		    omAnimSetSpeed ( l4_r4ball00, ANIM_ACTION00, l4_r4ball00.spd )
		    mdkBlowerDisable (l4_r4tornup00)
		    l4_r4snipball00.hit =0
	    end
    end
end
----------------------------------------------------

l4_r4snipball00.OnUpdate = function(gob)

    if((mdkGobDistance(gob, mdkGetPlayerGob())>80) and (gob.hit==1)) then
        --player is far away, send ball on its way
        omAnimSetSpeed ( l4_r4ball00, ANIM_ACTION00, l4_r4ball00.spd )
		mdkBlowerDisable (l4_r4tornup00)
		l4_r4snipball00.hit =0

    end

end

----------------------------------------------------

l4_r4snipball01.OnDamage = function(gob, from, damage, damagetype, part)
	if (mdkIsDamageType(damagetype,DAMAGE_SNIPER)==1) then
        if (l4_r4snipball01.hit == 0) then
		    omAnimSetSpeed ( l4_r4ball01, ANIM_ACTION00, 0)
		    mdkBlowerEnable (l4_r4tornup01)
		    l4_r4snipball01.hit =1
	    else
		    omAnimSetSpeed ( l4_r4ball01, ANIM_ACTION00, l4_r4ball01.spd )
		    mdkBlowerDisable (l4_r4tornup01)
		    l4_r4snipball01.hit =0
	    end
    end
end
----------------------------------------------------

l4_r4snipball01.OnUpdate = function(gob)

		
    if((mdkGobDistance(gob, mdkGetPlayerGob())>80) and (gob.hit==1)) then
        --player is far away, send ball on its way
        omAnimSetSpeed ( l4_r4ball01, ANIM_ACTION00, l4_r4ball00.spd )
		mdkBlowerDisable (l4_r4tornup01)
        l4_r4snipball01.hit =0

    end

end

----------------------------------------------------

l4_r4snipball02.OnDamage = function(gob, from, damage, damagetype, part)
	if (mdkIsDamageType(damagetype,DAMAGE_SNIPER)==1) then
        if (l4_r4snipball02.hit == 0) then
		    omAnimSetSpeed ( l4_r4ball02, ANIM_ACTION00, 0)
		    mdkBlowerEnable (l4_r4tornup02)
		    l4_r4snipball02.hit =1
	    else
		    omAnimSetSpeed ( l4_r4ball02, ANIM_ACTION00, l4_r4ball02.spd )
		    mdkBlowerDisable (l4_r4tornup02)
		    l4_r4snipball02.hit =0
	    end
    end
end
----------------------------------------------------

l4_r4snipball02.OnUpdate = function(gob)

    if((mdkGobDistance(gob, mdkGetPlayerGob())>80) and (gob.hit==1)) then
        --player is far away, send ball on its way
        omAnimSetSpeed ( l4_r4ball02, ANIM_ACTION00, l4_r4ball00.spd )
		mdkBlowerDisable (l4_r4tornup02)
		l4_r4snipball02.hit =0

    end

end

----------------------------------------------------

l4_r4.OnCreate = function(gob)

    local cloakeffect

    if (gob.entered == nil) then
        gob.entered = 1
    	mdkBlowerDisable (l4_r4tornup00)
	    mdkBlowerDisable (l4_r4tornup01)
	    mdkBlowerDisable (l4_r4tornup02)
        
       
        --player entered room, spawn the evil disappearing cloak at first point
        l4_r4.cloakitem = mdkCreateObjectLua("cloakitem", OBJ_CLOAK, mdkGetScene(), gob, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )
        mdkGobSetPosition(l4_r4.cloakitem, "l4_r4clk01")
       
        -- make the sound, attach it to cloak so that it is 3d
        if(not l4_r4.cloakitem.cloaksound) then
            l4_r4.cloakitem.cloaksound = omGobAddSound(l4_r4.cloakitem, "cloak_use",0)
        end

        --make the effect. Since after the effect is done, it destroys itself, no worries
        cloakeffect = mdkCreateObjectLua("cloakeffect", OBJ_EFFECT02, mdkGetScene(), gob, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )
        l4_r4.fx=1
        mdkGobSetPosition(cloakeffect, "l4_r4clk01")
        --set the onupdate function
        l4_r4.cloakitem.OnUpdate = Level.R4CloakOnUpdate

        --set the table of points for the on update function
        l4_r4.currentpoint=1
        l4_r4.CloakPoints = {
        [1]= "l4_r4clk01",
        [2]= "l4_r4clk02",
        [3]= "l4_r4clk03",
        [4]= "l4_r4clk04"}

    end
end
----------------------------------------------------

l4_r4.OnEnterRoom = function(gob)

    mdkProxDoorLock(l4_r3exitdoor, 1)

end

----------------------------------------------------

l4_r4_180tun01.OnEnterRoom = function(gob)

    -- block loading tunnel until loading completes --
    mdkProxDoorLock(l4_r4exitdoor02, 1)
    StartGlobalScript(l4_r4_180tun01, {
        { WaitForResourceLoad },
        { mdkProxDoorLock, { l4_r4exitdoor02, 0 } },
    })
   
end
----------------------------------------------------

l4_r4_deadtun.OnEnterRoom = function(gob)
    mdkProxDoorLock(l4_r4exitdoor01, 1)
end
----------------------------------------------------

l4_r5.CheeringDoganUpdate = function(gob)

    if(gob.attack) then
        
        mdkWalkerAnimUpdate(gob)
        
    elseif(not gob.properdir) then
        mdkWalkerAnimUpdate(gob)
        if(mdkWalkerHeadToPoint(gob, gob.pt)==1) then
            gob.properdir=1
        end
    end
end

----------------------------------------------------

l4_r5.DoganOnAnimLoop = function(gob, animid)

    if(animid == ANIM_VICTORY) then
        omAnimPlay(gob, ANIM_READY0, 0)
        omGobSetTimer(gob, random(5,10))
    end

end

----------------------------------------------------

l4_r5.DoganOnTimer = function(gob)

    omAnimPlay(gob, ANIM_VICTORY, 0)
    
end

----------------------------------------------------

l4_r5.OnCreate = function(gob)

    l4_r5.dead = 0

    l4_r5.shattersound = omGobAddSound(l4_r5, "glass_break2", 0)

    StopScript(l4_r5dgnchr1)
    StopScript(l4_r5dgnchr2)
    StopScript(l4_r5dgnchr3)

    mdkGobSetDamageFilter(l4_r5dgnchr1, 0)
    mdkGobSetDamageFilter(l4_r5dgnchr2, 0)
    mdkGobSetDamageFilter(l4_r5dgnchr3, 0)

    mdkGobSetResistBlower(l4_r5dgnchr1, 1)
    mdkGobSetResistBlower(l4_r5dgnchr2, 1)
    mdkGobSetResistBlower(l4_r5dgnchr3, 1)

    mdkSetLuaEvent(l4_r5grunt, "OnDie", Level.R5OnDie)
    mdkSetLuaEvent(l4_r5dogan, "OnDie", Level.R5OnDie)
    mdkSetLuaEvent(l4_r5conedate, "OnDie", Level.R5OnDie)
    mdkSetLuaEvent(l4_r5bif, "OnDie", Level.R5OnDie)

    gob.dir = 0
    gob.count = 0
    gob.moves = 0
    gob.playing = nil
    gob.cooldown = 0
    gob.stoptime = 0
    gob.dancetime = 0
    gob.curtime = 0

    gob.music = omGobAddSound(gob, "jd_hifi", 0)
end
----------------------------------------------------

l4_r5.OnUpdate = function(gob)

    local dt = chGetDeltaT()

    if (l4_r5.dead < 4 or l4_r5.donedamnit) then
        return
    end

    if (l4_r5dgnchr1==nil and l4_r5dgnchr2==nil and l4_r5dgnchr3==nil) then -- already killed by blackhole or blast damage
        l4_r5.SongSuccessful(gob)
    end

    if (mdkKurtIsCloaked(mdkGetPlayerGob())==1 or mdkGetPlayMode()==PLAYMODE_SNIPER) then
        if (gob.playing) then
            gob.StopMusic(gob)
        end
        return
    end

    if (mdkGobOnMagicSpot(mdkGetPlayerGob(), "centerstage", 13, PI/4) == 1) then
        if (not gob.zoomed) then
            mdkZoomMessage(606)
            gob.zoomed = 1
        end
    else
        if (gob.playing) then
            gob.StopMusic(gob)
        end
        return
    end

    if (gob.cooldown > 0) then
        gob.cooldown = gob.cooldown - dt
        return
    end

    local cur = 0

    if (omGetCommandValue(COM_FORWARD)>0) then
        cur = 1
    elseif (omGetCommandValue(COM_BACKWARD)>0) then
        cur = 2
    elseif (omGetCommandValue(COM_STRAFELEFT)>0) then
        cur = 3
    elseif (omGetCommandValue(COM_STRAFERIGHT)>0) then
        cur = 4
    end

    if (cur == 0) then
        if (gob.playing) then
            gob.stoptime = gob.stoptime + dt
            if (gob.stoptime > 0.4) then
                gob.dancetime = 0
                gob.stoptime = 0
                gob.curtime = 0
                gob.StopMusic(gob)
            end
        end
    else
        if (not gob.playing) then
            gob.StartMusic(gob)
        end
        gob.curtime = gob.curtime + dt
        if (gob.curtime > 1.0) then
            gob.dancetime = 0
            gob.stoptime = 0
            gob.curtime = 0
            gob.StopMusic(gob)
        else
            gob.dancetime = gob.dancetime + dt
            if (gob.dancetime > 2.6) then
                gob.SongSuccessful(gob)
            end
        end
        if (gob.dir ~= cur) then
            gob.curtime = 0
        end
    end

    gob.dir = cur

end
----------------------------------------------------

l4_r5.SongSuccessful = function(gob)

    --print("yay!")

    local gooddogan

    --chSndSwitchMusic(22)

    if (l4_r5dgnchr1) then
        gooddogan = l4_r5dgnchr1 
    end

    if (l4_r5dgnchr2) then
        gooddogan = l4_r5dgnchr2 
    end

    if (l4_r5dgnchr3) then
        gooddogan = l4_r5dgnchr3 
    end

    l4_r5.donedamnit = 1

    StartGlobalScript(l4_r5, {
        { ScriptJumpIfNil,   { 3, l4_r5dgnchr1 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr1, ANIM_VICTORY } },
        { Wait, { l4_r5, 0.1 } },
        { ScriptJumpIfNil,   { 3, l4_r5dgnchr2 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr2, ANIM_VICTORY } },
        { Wait, { l4_r5, 0.1 } },
        { ScriptJumpIfNil,   { 3, l4_r5dgnchr3 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr3, ANIM_VICTORY } },
        { omAnimJustLooped, { gooddogan, ANIM_VICTORY } },
        { Wait, { l4_r5, 0.4 } },
        { ScriptJumpIfNil,   { 2, l4_r5dgnchr1 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr1, ANIM_MELEE } },
        { ScriptJumpIfNil,   { 2, l4_r5dgnchr2 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr2, ANIM_MELEE } },
        { ScriptJumpIfNil,   { 2, l4_r5dgnchr3 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr3, ANIM_MELEE } },
        { Wait, { l4_r5, 0.3 } },
        { omGobGMShatter, { l4_r5shatter,omGobGMGetSltIndexByName(l4_r5shatter,"l4_r5shatterme"), 0, 1, 0, 20, SHATTEROPTION_VECTOR } },

        { Level.R5PlayShatterSound },

	    { omSceneShake, { mdkGetScene(), 0.03, 3, 3, 'rumble1' } },
        { omGobGMShatter, { l4_r5smash,omGobGMGetSltIndexByName(l4_r5smash,"l4_r5shatgl00"), 0, 1, 0, 20, SHATTEROPTION_VECTOR } },
        { Wait, { l4_r5, 0.1 } },
        { omGobGMShatter, { l4_r5smash,omGobGMGetSltIndexByName(l4_r5smash,"l4_r5shatgl01"), 0, 1, 0, 20, SHATTEROPTION_VECTOR } },
        { Wait, { l4_r5, 0.1 } },
        { omGobGMShatter, { l4_r5smash,omGobGMGetSltIndexByName(l4_r5smash,"l4_r5shatgl02"), 0, 1, 0, 20, SHATTEROPTION_VECTOR } },
        { Wait, { l4_r5, 1.5 } },

        { ScriptJumpIfNil,   { 5, l4_r5dgnchr3 } },
        { mdkWalkerJumpToPoint, { l4_r5dgnchr3, "l4_r5dgnpt3", 10 } },
        { StartScript, { l4_r5dgnchr3, DefaultAIScripts[OBJ_DOGANBOY].script } },
        { mdkGobSetResistBlower, { l4_r5dgnchr3, 0 } },
        { mdkGobSetDamageFilter, { l4_r5dgnchr3, DAMAGE_GOODGUY+DAMAGE_SNIPER } },
        { Wait, { l4_r5, 0.1 } },

        { ScriptJumpIfNil,   { 5, l4_r5dgnchr1 } },
        { mdkWalkerJumpToPoint, { l4_r5dgnchr1, "l4_r5dgnpt1", 10 } },
        { StartScript, { l4_r5dgnchr1, DefaultAIScripts[OBJ_DOGANBOY].script } },
        { mdkGobSetResistBlower, { l4_r5dgnchr1, 0 } },
        { mdkGobSetDamageFilter, { l4_r5dgnchr1, DAMAGE_GOODGUY+DAMAGE_SNIPER } },
        { Wait, { l4_r5, 0.2 } },

        { ScriptJumpIfNil,   { 5, l4_r5dgnchr2 } },
        { mdkWalkerJumpToPoint, { l4_r5dgnchr2, "l4_r5dgnpt2", 10 } },
        { StartScript, { l4_r5dgnchr2, DefaultAIScripts[OBJ_DOGANBOY].script } },
        { mdkGobSetResistBlower, { l4_r5dgnchr2, 0 } },
        { mdkGobSetDamageFilter, { l4_r5dgnchr2, DAMAGE_GOODGUY+DAMAGE_SNIPER } }
    })

end

Level.R5PlayShatterSound = function()
    omGobGSPlay(l4_r5.shattersound, 0,0,0,0)
end

----------------------------------------------------

l4_r5.StartMusic = function(gob)
    omGobGSPlay(gob.music, 0,0,0,0)
    chSndSwitchMusic(-1)
    --print("play")
    gob.playing = 1
end
----------------------------------------------------

l4_r5.StopMusic = function(gob)
    omGobGSStop(gob.music)
    --print("stop")
    gob.playing = nil
    gob.cooldown = 1.5
    StartGlobalScript(l4_r5, {
        { ScriptJumpIfNil,   { 3, l4_r5dgnchr2 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr2, ANIM_TAUNT0 } },
        { Wait, { l4_r5, 0.1 } },
        { ScriptJumpIfNil,   { 3, l4_r5dgnchr3 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr3, ANIM_TAUNT0 } },
        { Wait, { l4_r5, 0.1 } },
        { ScriptJumpIfNil,   { 2, l4_r5dgnchr1 } },
        { mdkWalkerPlayAnim, { l4_r5dgnchr1, ANIM_TAUNT0 } },
    })
end
----------------------------------------------------

l4_r5side.OnEnterRoom = function(gob)
    if (gob.state == nil) then
        mdkBoxingGloveAlwaysPunch(l4_r5glove00)
        mdkBoxingGloveAlwaysPunch(l4_r5glove01)
        mdkBoxingGloveAlwaysPunch(l4_r5glove02)
        mdkBoxingGloveAlwaysPunch(l4_r5glove03)
        mdkBoxingGloveAlwaysPunch(l4_r5glove04)
        local poo = { l4_r5glove00, l4_r5glove01, l4_r5glove02, l4_r5glove03, l4_r5glove04 }
        mdkBoxingGloveSetPrize(poo[random(5)], OBJ_APPLE)
        gob.state = 1    
    end
end
----------------------------------------------------

l4_r5side.OnTimer = function(gob)
    if (gob.state == 2) then

        -- spin player around --
        local player = mdkGetPlayerGob()
        mdkGobSetPosition(player, "l4_r5telept")
        mdkGobSetOrientation(player, random()*PI*2, 0, 0)

        -- put a boxing glove mirage at the entrance --
        local glove = mdkCreateObjectLua("", OBJ_BOXINGGLOVE, mdkGetScene(), gob, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0)
        mdkGobAlignWith(glove, l4_r5entrdoor, 1)
        mdkBoxingGloveSetMirage(glove, 1)

        -- spawn two apples in the entrance hallway --
        local apple = mdkCreateObjectLua("", OBJ_APPLE, mdkGetScene(), l4_r5_180tun69, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0)
        mdkGobSetPosition(apple, "l4r5_applesp1")
        apple = mdkCreateObjectLua("", OBJ_APPLE, mdkGetScene(), l4_r5_180tun69, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0)
        mdkGobSetPosition(apple, "l4r5_applesp2")

        gob.state = 3
        omGobSetTimer(gob, 2)
    else
        omAnimPlay(l4_r5sideani, ANIM_ACTIVATE, ANIMFLAG_NOTRANS)
        mdkProxDoorLock(l4_r5entrdoor, 0)
    end
end
----------------------------------------------------

l4_r5side.OnUpdate = function(gob)
    if (gob.state == 1) then
        local player = mdkGetPlayerGob()
        if (mdkGobDistancePoint(player, "l4_r5telept") < 21 and mdkGobDistance(player, l4_r5entrdoor) > 8) then
            omAnimPlay(l4_r5sideani, ANIM_DISABLED, ANIMFLAG_NOTRANS)
            mdkProxDoorLock(l4_r5entrdoor, 1)
            omGobSetTimer(gob, 1)
            gob.state = 2
        end
    end    
end
----------------------------------------------------

l4_r6gen00.OnDie = function(gob, crit)

    Level.GenDone()
end

----------------------------------------------------

l4_r6gen02.OnDie = function(gob, crit)

    Level.GenDone()
end

----------------------------------------------------

l4_r6gen03.OnDie = function(gob, crit)

    Level.GenDone()

end

----------------------------------------------------

l4_r6.OnCreate = function(gob)

    Save.gensdone = 0

    if(Save.donttakegloveoutofstasis==nil) then
        omGobExitStasis(l4_r6exitglove)
        omGobExitStasis(l4r6_doors)
    end

end

----------------------------------------------------

l4_r6_90tun00.OnEnterRoom = function(gob)

    chFogDisable()

end
----------------------------------------------------

l4_r6_90tun01.OnEnterRoom = function(gob)

    mdkProxDoorLock(l4_r6exitdoor, 1)
	chFogStartEnd(80, 100)
    chFogColor(0.03,0.05,0.03,1)
    chFogEnable()

end
----------------------------------------------------

l4_r7lock.OnDamage = function(gob, from, damage, damagetype, part)
    -- turns on the blower if the lock is sniped --
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and (omAnimIsPlaying(l4_r7lock, ANIM_ENABLED) == 1)) then
        omAnimPlay(l4_r7ablower, ANIM_ENABLED, 0)
        omAnimPlay(l4_r7lock, ANIM_DISABLED, 0)
        mdkBlowerEnable(l4_r7ablower)
    end
end
----------------------------------------------------

l4_r7a.OnCreate = function(gob)
    if (gob.entered == nil) then
        gob.entered = 1
        omAnimPlay(l4_r7ablower,ANIM_DISABLED,0)
        mdkBlowerDisable (l4_r7ablower)

        -- to hide z-fighting, we've removed this glove from the game --
        mdkProxDoorLock(l4_r7adoor00, 1)
        omGobEnterStasis(l4_r7glove00)
    end
end
----------------------------------------------------

l4_r7a.OnEnterRoom = function(gob)

	chFogStartEnd(80, 100)
    chFogColor(0.03,0.05,0.03,1)
    chFogEnable()

end
----------------------------------------------------

l4_r7a_90tun00.OnEnterRoom = function(gob)

	chFogStartEnd(80, 100)
    chFogColor(0.03,0.05,0.03,1)
    chFogEnable()

end
----------------------------------------------------

l4_r7a_90tun01.OnEnterRoom = function(gob)

    chFogDisable()

end
----------------------------------------------------

l4_r7a_deadtun.OnEnterRoom = function(gob)
    mdkProxDoorLock(l4_r7aexitd01, 1)
    chFogDisable()
end
----------------------------------------------------

l4_r8generator.OnSpawn = function(gen, gob)
	--mdkWalkerSetPen (gob, "l4_r8seekurt", 6)
	mdkWalkerAlert (gob,0)
    mdkWalkerJumpToPoint(gob, "l4_r8jumpto", 7)
    StartScript(gob, {
        { mdkWalkerIsReady },
        { mdkWalkerGotoPoint, { "l4_r8seekurt", 1,0,0,0 } },
        { mdkDoganboyAttack },
    })
    mdkWalkerSetTurret(gob, 1)
end
----------------------------------------------------

l4_r8sniplock00.OnDamage = function(gob, from, damage, damagetype, part)
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and (omAnimIsPlaying(l4_r8sniplock00, ANIM_ENABLED) == 1)) then
		l4_r8.bridge = l4_r8.bridge + 1
        omAnimPlay(l4_r8sniplock00, ANIM_DISABLED, 0)
		--print (l4_r8.bridge)
    end
end
----------------------------------------------------

l4_r8sniplock01.OnDamage = function(gob, from, damage, damagetype, part)
    if ((mdkIsDamageType(damagetype, DAMAGE_SNIPER)==1) and (omAnimIsPlaying(l4_r8sniplock01, ANIM_ENABLED) == 1)) then
		l4_r8.bridge = l4_r8.bridge + 1
        omAnimPlay(l4_r8sniplock01, ANIM_DISABLED, 0)
		--print (l4_r8.bridge)
    end
end
----------------------------------------------------

l4_r8.OnCreate = function(gob)

--    SetSpawnedItem(l4_r8, OBJ_SNIPERBOUNCEITEM, "l4_r8snipbnc01", 15)
--    SetSpawnedItem(l4_r8, OBJ_SNIPERBOUNCEITEM, "l4_r8snipbnc02", 15)

    if(Save.dontspawnbouncebullets) then return end
    
        mdkCreateObjectLua("bullet1", OBJ_SNIPERBOUNCEITEM, mdkGetScene(), l4_r8, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )    
        mdkGobSetPosition(bullet1,"l4_r8snipbnc01")
        mdkSetLuaEvent(bullet1, "OnPickedUp", Level.R8ItemOnPickedUp1)
        l4_r8.b1 = 1

        mdkCreateObjectLua("bullet2", OBJ_SNIPERBOUNCEITEM, mdkGetScene(), l4_r8, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )    
        mdkGobSetPosition(bullet2,"l4_r8snipbnc02")
        mdkSetLuaEvent(bullet2, "OnPickedUp", Level.R8ItemOnPickedUp2)
        l4_r8.b2 = 1

        mdkSetLuaEvent(mdkGetPlayerGob(), "OnOutOfAmmo", Level.R8BobOnOutOfAmmo)


end

----------------------------------------------------

l4_r8.OnUpdate = function(gob)
    if (l4_r8.bridge == 2) and (mdkIsCutSceneAllowed() == 1) then
		mdkKurtEnterNormalMode(mdkGetPlayerGob())
        mdkSetLuaEvent(mdkGetPlayerGob(), "OnOutOfAmmo", nil)

		Level.BridgeMovie()
        l4_r8.bridge = 3
    end
end
----------------------------------------------------

l4_r8_180tun01.OnEnterRoom = function(gob)

    -- block loading tunnel until loading completes --
    mdkProxDoorLock(l4_r8aexitd02, 1)
    StartGlobalScript(l4_r8_180tun01, {
        { WaitForResourceLoad },
        { mdkProxDoorLock, { l4_r8aexitd02, 0 } },
    })
   
end
----------------------------------------------------

l4_r8_deadtun.OnEnterRoom = function(gob)

    mdkProxDoorLock(l4_r8aexitd01, 1)

end

----------------------------------------------------

l4_r9.AllSwitchesFlipped = function()

    local flipped = 1

    local n,v = next(l4_r9.switches, nil)
    while (n) do
        if (not v.flipped) then
            flipped = nil
        end
        n,v = next(l4_r9.switches, n)
    end

    return flipped

end
----------------------------------------------------

l4_r9.AssignSwitchColors = function()

    l4sh_switch1.color = 1
    l4sh_switch2.color = 2
    l4sh_switch3.color = 3

end
----------------------------------------------------

l4_r9.InitColors = function()

    foreach( l4_r9.colorinfo,
        function(i, colorinfo)
            mdkSetLuaEvent(colorinfo.beam, "OnAnimLoop", Level.BeamOnAnimLoop )
            mdkSetLuaEvent(colorinfo.beam, "OnCustomKey", Level.BeamOnCustomKey )
        end )

end
----------------------------------------------------

l4_r9.InitSwitches = function()

    foreach( l4_r9.switches,
        function(i, gob)
            omAnimPlay(gob, ANIM_OPEN, ANIMFLAG_NOTRANS)
            gob.sniperlock = mdkCreateObjectLua("", OBJ_SCENERY, scene, gob, "L4SH_SNIPEDMY", 0,0,0, 1,0,0,0, "sniperlock",0,0,0,0)
            mdkSetLuaEvent(gob.sniperlock, "OnDamage", Level.SniperLockOnDamage)
            omAnimPlay(gob.sniperlock, ANIM_LOCK, 0)
            gob.sniperlock.switch = gob
        end )

end
----------------------------------------------------

l4_r9shwang.OnAIUpdate = function(gob)
end
----------------------------------------------------

l4_r9shwang.OnAnimLoop = function(gob, anim)

    if (gob.done) then

        -- start second stage boss fight --
        Level.StartBossFight2()

    elseif (gob.hits == 0) then

        -- shwang climbs off the hut in defeat --
        omAnimPlay(gob, ANIM_ACTION11, ANIMFLAG_NOTRANS)
        gob.done = 1

    elseif (gob.squishes == 0) then

        omAnimPlay(gob, ANIM_ACTION06, ANIMFLAG_NOTRANS)   -- shoot
        gob.squishes = 3

    else

        gob.nextanim = gob.nextanim + 1
        if (gob.nextanim > ANIM_ACTION05) then gob.nextanim = ANIM_ACTION01 end
        omAnimPlay(gob, gob.nextanim, 0)    -- squish
        gob.squishes = gob.squishes - 1

    end

end
----------------------------------------------------

l4_r9shwang.OnCustomKey = function(gob, part, key)
    if (key == CUSTKEY_USER4) then

        -- find the point shwang just smacked --
        local point
        if (gob.nextanim == ANIM_ACTION01) then
            point = "l4_r9smack1"
        elseif (gob.nextanim == ANIM_ACTION02) then
            point = "l4_r9smack2"
        elseif (gob.nextanim == ANIM_ACTION03) then
            point = "l4_r9smack3"
        elseif (gob.nextanim == ANIM_ACTION04) then
            point = "l4_r9smack4"
        elseif (gob.nextanim == ANIM_ACTION05) then
            point = "l4_r9smack5"
        end

        -- deal damage to kurt if he's on the ground --
        if (mdkKurtIsOnGround(mdkGetPlayerGob()) == 1) then

            if (mdkGobDistancePoint(mdkGetPlayerGob(), point) < 6) then

                -- ground zero: deal large damage and play a taunt voice-over --
                mdkDialogPanel(l4_r9.taunts[random(l4_r9.taunts.n)], DIALOGPORTRAIT_SCHWANG, 0, DIALOGFLAG_HIDE+DIALOGFLAG_NODUMP)
                mdkDealDamage(gob, mdkGetPlayerGob(), 25, DAMAGE_BADGUY+DAMAGE_KNOCKDOWN, -1)

            else

                -- far off: deal small damage --
                mdkDealDamage(gob, mdkGetPlayerGob(), 5, DAMAGE_BADGUY+DAMAGE_KNOCKDOWN, -1)

            end

        end

        omSceneShake(mdkGetScene(), 0.01, 3, 3, 'rumble1')
    end
end
----------------------------------------------------

l4_r9shwang.OnDamage = function(gob, from, damage, damagetype, part)

    if (gob.hits > 0) and (part == "SHWANG_OAKLEYS") and (not gob.oakleysinvuln) and
       (omAnimIsPlaying(gob, ANIM_ACTION07) == 0) then
        omAnimPlay(gob, ANIM_ACTION07, 0)
        gob.hits = gob.hits - 1
        gob.oakleysinvuln = 1
        omGobSetTimer(gob, 3)
    end

end
----------------------------------------------------

l4_r9shwang.OnTimer = function(gob)
    gob.oakleysinvuln = nil
end
----------------------------------------------------

l4_r9.OnCreate = function(gob)
    l4_r9.bossstage = 0
    l4_r9.shattersound = omGobAddSound(l4_r9, "shatter3", 0)
end
----------------------------------------------------

l4_r9.OnEnterRoom = function(gob)

    omAnimPlay(l4_r9max, ANIM_ACTION30, 0)
    l4_r9.InitColors()
    l4_r9.InitSwitches()

end
----------------------------------------------------

l4_r9.OnTimer = function(gob)
    if (l4_r9.fade == nil) then
        omSceneFade(mdkGetScene(), 0, 0, 0, 1, 3, 2, 0)
        omGobSetTimer(l4_r9, 3.1)
        l4_r9.fade = 1
    else
        HideNextLoadingScreen()
        mdkStartLevel(4,13)
    end
end
----------------------------------------------------

l4_r9.OnUpdate = function(gob)

    -- check whether a beam is active --
    if (l4_r9.activeswitch) then

        local colorinfo = l4_r9.colorinfo[l4_r9.activeswitch.color]

        -- start the beam animation if not already started --
        if (l4_r9.startbeam) and (mdkIsCutSceneAllowed() == 1) then
            
            -- enter cutscene mode --
            God(1)
            PlayerEnterStasis()
            mdkGobSyncEnterStasis(max2)
            mdkDisablePlayerControl()
            mdkDisableDefaultCamera()
            omGobExitStasis(colorinfo.camera)
            omAnimPlay(colorinfo.camera, ANIM_ACTION00, 0)
            omAnimPlay(colorinfo.beam, ANIM_ACTION00, 0)
            omAnimPlay(l4sh_beamchrg, ANIM_ACTION00, 0)
            l4_r9.beamstarted = 1
            l4_r9.startbeam = nil

        end

        if (l4_r9.beamstarted) then

            -- damage shwang once --
            if (shwang2) and (mdkGobDistancePoint(shwang2, colorinfo.point) < colorinfo.radius) then
                --l4_r9.shwanginbeam = 1
                if (l4_r9.damageshwang) then
                    --print("hit shwang")
                    mdkDealDamage(colorinfo.beam, shwang2, 300, DAMAGE_GOODGUY, -1)
                    l4_r9.damageshwang = nil
                end
            end

            -- damage player once --
            if (player) and (l4_r9.damageplayer) and
               (mdkGobDistancePoint(shwang2, colorinfo.point) < colorinfo.radius) then
                --print("hit player")
                mdkDealDamage(colorinfo.beam, mdkGetPlayerGob(), 50, DAMAGE_BADGUY, -1)
                l4_r9.damageplayer = nil
            end

        end

    end

    if (l4_r9.bossstage == 0) then

        -- start first stage boss fight --
        if (mdkGobDistancePoint(mdkGetPlayerGob(), "l4_r9center") <= 5) and (mdkIsCutSceneAllowed() == 1) then
            Level.PlayBossMovie()
        end

    elseif (l4_r9.bossstage == 2) and (l4_r9.stageover) then

        -- when Max lands, go to stage 3 --
        if (mdkGobDistancePoint(max2, "l4_r9center") < 2) then
            Level.StartBossFight3()
            l4_r9.stageover = nil
        end

    elseif (l4_r9.bossstage == 3) and (l4_r9.startdeath) and (not l4_r9.activeswitch) then

        -- start shwang's death movie -- 
        Level.PlayDeathMovie(l4_r9.startdeath)
        l4_r9.startdeath = nil

    end

end
----------------------------------------------------

l4_r9.ResetSwitch = function(gob)
    gob.flipped = nil
    omAnimPlay(gob, ANIM_ACTION00, 0)
    omAnimPlay(gob.sniperlock, ANIM_ENABLED, 0)
end
----------------------------------------------------

l4_r9.ResetSwitches = function()

    foreach( l4_r9.switches,
        function(i, gob)
            l4_r9.ResetSwitch(gob)
        end )

end
----------------------------------------------------

Level.l4Dogan00OnUpdate = function(gob)
    if l4_plat03.hit == 1 and gob.jumped==nil then
        mdkWalkerJumpToPoint(gob, "l4_way00",75)
		mdkWalkerSetPen(gob, "l4_way00",5)
		gob.jumped = 1
    end
    mdkWalkerAnimUpdate(gob)
end
----------------------------------------------------

Level.l4Dogan01OnUpdate = function(gob)
    if l4_plat03.hit == 1 and gob.jumped==nil then
        mdkWalkerJumpToPoint(gob, "l4_way01",100)
		mdkWalkerSetPen(gob, "l4_way01",5)
		gob.jumped = 1
    end
	mdkWalkerAnimUpdate(gob)
end
----------------------------------------------------

Level.PlayBossMovie = function()

    if (ml4x_camera==nil) then return end
	omGobEnterStasis(l4_r9max)
    omGobExitStasis(ml4x_camera)

    l4_r9.bossstage = 1

    mdkSaveMovie(4,"x")

    StartMovie(mdkGetCameraGob(), {

        -- switch to movie mode --
        { chSndSwitchMusic, { -1 } },
        { mdkPreloadRes,    { "ml4x_kurt1.wav", 0 } },
        { omGobEnterStasis, { l4r9_hutroof } },
        { omGobExitStasis,  { ml4x_krmovegob } },
        { omGobExitStasis,  { ml4x_maxmovegob } },
	    { omGobExitStasis,  { ml4x_shwmove } },
	    { omGobExitStasis,  { ml4x_stuntkurt } },
	    { omGobExitStasis,  { ml4x_stuntmax } },
	    { omGobExitStasis,  { ml4x_stuntshw } },
	    { omGobExitStasis,  { ml4x_btnmover } },
        { PlayerEnterStasis },
        { mdkDisableDefaultCamera, {} },
        { mdkDisableGui,    {} },
        { UncloakKurt },

        -- cut 1 --
        { omSceneFade,      { mdkGetScene() , 0, 0, 0, 0, 0.3, 0.1, 0 } },
        { omAnimPlay, { ml4x_camera, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION14, ANIMFLAG_NOTRANS } },        
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION19, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_btnmover, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { WaitForResourceLoad },
        { mdkPreloadRes,    { "ml4x_max1.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_kurt1, DIALOGPORTRAIT_KURT, 2, DIALOGFLAG_BOTTOM } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION00 } },

        -- cut 2 --
        { mdkPreloadRes,    { "ml4x_kurt2.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_max1, DIALOGPORTRAIT_MAX, 2, DIALOGFLAG_BOTTOM } },
        { omAnimPlay, { ml4x_camera, ANIM_ACTION01, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_shwmove, ANIM_ACTION07, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION01, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION19, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION01, ANIMFLAG_NOTRANS } },        
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION15, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_btnmover, ANIM_ACTION01, ANIMFLAG_NOTRANS } },    
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION01 } },

        -- cut 3 --
        { mdkPreloadRes,    { "ml4x_max2.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_kurt2, DIALOGPORTRAIT_KURT, 2, DIALOGFLAG_BOTTOM } },
        { omAnimPlay, { ml4x_camera, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION16, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION21, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_btnmover, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION02 } },
            
        -- cut 4 --
        { mdkPreloadRes,    { "ml4x_kurt3.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_max2, DIALOGPORTRAIT_MAX, 1.5, DIALOGFLAG_BOTTOM } },
        { omAnimPlay, { ml4x_camera, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION17, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION22, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_btnmover, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION03 } },

        -- cut 5 --
        { omAnimPlay, { ml4x_camera, ANIM_ACTION04, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION04, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION18, 0 } },
        { mdkPreloadRes,    { "ml4x_max3.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_kurt3, DIALOGPORTRAIT_KURT, 0, DIALOGFLAG_BOTTOM } },
        { omAnimPlay, { ml4x_btnmover, ANIM_ACTION04, ANIMFLAG_NOTRANS } }, 
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION04 } },

        -- cut 6 --
        { omAnimPlay, { ml4x_camera, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION08, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION04, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION23, ANIMFLAG_NOTRANS } },
        { mdkPreloadRes,    { "ml4x_max4.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_max3, DIALOGPORTRAIT_MAX, .5, DIALOGFLAG_BOTTOM } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION05 } },
 
        -- cut 7 --
        { omAnimPlay, { ml4x_camera, ANIM_ACTION06, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION19, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION24, ANIMFLAG_NOTRANS } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION06 } },

        -- cut 8 --
        { omAnimPlay, { ml4x_camera, ANIM_ACTION11, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_shwmove, ANIM_ACTION04, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntshw, ANIM_ACTION18, ANIMFLAG_NOTRANS } },
        { omSceneShake,     { mdkGetScene(), 0.03, 3, 4, "rumble1" } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION11 } },

        -- cut 9 --
        { mdkPreloadRes,    { "ml4x_shwang1.wav", 0 } },
        { omAnimPlay, { ml4x_camera, ANIM_ACTION07, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION06, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION25, ANIMFLAG_NOTRANS } },         
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION20, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_shwmove, ANIM_ACTION01, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntshw, ANIM_ACTION12, ANIMFLAG_NOTRANS } }, 
        { omAnimPlay, { ml4x_btnmover, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
        { Wait,         { ml4x_camera, 3.8 } },
        { mdkDialogPanel,   { strings.ml4x_max4, DIALOGPORTRAIT_MAX, 1.5, DIALOGFLAG_TOP } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION07 } },

        -- cut 10 --  
        { omAnimPlay, { ml4x_camera, ANIM_ACTION08, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_shwmove, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntshw, ANIM_ACTION13, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION07, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION26, ANIMFLAG_NOTRANS } },
        { mdkPreloadRes,    { "ml4x_kurt4.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_shwang1, DIALOGPORTRAIT_SCHWANG, 4, DIALOGFLAG_BOTTOM } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION08 } },

        -- cut 11 --
        { omAnimPlay, { ml4x_camera, ANIM_ACTION09, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_shwmove, ANIM_ACTION06, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION06, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION21, ANIMFLAG_NOTRANS } },
        { mdkPreloadRes,    { "ml4x_shwang2.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4x_kurt4, DIALOGPORTRAIT_KURT, 2.5, DIALOGFLAG_BOTTOM } },
        { omAnimJustLooped, { ml4x_camera, ANIM_ACTION09 } },

        -- cut 12 --
        { omAnimPlay, { ml4x_camera, ANIM_ACTION10, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_shwmove, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntshw, ANIM_ACTION14, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_maxmovegob, ANIM_ACTION08, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntmax, ANIM_ACTION26, ANIMFLAG_NOTRANS } },         
        { omAnimPlay, { ml4x_krmovegob, ANIM_ACTION07, ANIMFLAG_NOTRANS } },
        { omAnimPlay, { ml4x_stuntkurt, ANIM_ACTION22, ANIMFLAG_NOTRANS } },
        { mdkDialogPanel,   { strings.ml4x_shwang2, DIALOGPORTRAIT_SCHWANG, 2.2, DIALOGFLAG_BOTTOM } },
        { Wait, { ml4x_camera, 1.4 } },
        { omSceneFade,      { mdkGetScene() , 0, 0, 0, 1, 0.3, 1, 0 } },
	    { mdkDialogIsDone,  {} };

        -- restore play mode --
        Done = function()
            mdkDialogDestroy()
            mdkEnableGui()
            mdkEnableDefaultCamera()
            PlayerExitStasis()
            omGobEnterStasis( ml4x_krmovegob )
            omGobEnterStasis( ml4x_maxmovegob )
	        omGobEnterStasis( ml4x_shwmove )
	        omGobEnterStasis( ml4x_stuntkurt )
	        omGobEnterStasis( ml4x_stuntmax )
	        omGobEnterStasis( ml4x_stuntshw )
	        omGobEnterStasis( ml4x_btnmover )
	        omGobEnterStasis( ml4x_camera )
            Level.StartBossFight1()
            chSndSwitchMusic(14)
        end
    })

end
----------------------------------------------------

Level.PlayDeathMovie = function(deathbeam)

    if (not l4sh_deathcam) then return end
    omGobExitStasis(l4sh_deathcam)

    local animid = ANIM_ACTION01
    if (deathbeam == l4sh_beams1) then
        animid = ANIM_ACTION01
    elseif (deathbeam == l4sh_beams2) then
        animid = ANIM_ACTION02
    elseif (deathbeam == l4sh_beams3) then
        animid = ANIM_ACTION03
    end

    StartGlobalScript(mdkGetCameraGob(), {

        -- switch to movie mode --
        { mdkDilateSetFactor, { 0.5, 0.1, 1 } },
        { chSndSwitchMusic, { -1 } },
        { PlayerEnterStasis },
        { mdkDisableDefaultCamera },
        { mdkDisableGui },
        { UncloakKurt },

        -- cut 1 --
        { omAnimPlay,       { l4sh_deathcam, animid, ANIMFLAG_NOTRANS } },
        { omAnimJustLooped, { l4sh_deathcam, animid } },

        -- restore play mode --
        { Level.DeathMovieDone }
    })

end

Level.DeathMovieDone = function()
    mdkDilateStop()
    omGobEnterStasis(l4sh_deathcam)
    mdkEnableGui()
    mdkEnableDefaultCamera()
    PlayerExitStasis()
end

----------------------------------------------------

Level.PlayEndMovie = function()

    if (ml4z_camera01==nil) then return end
    omGobExitStasis(ml4z_camera01)

    -- put gobs shattered by the fight into stasis --
    omGobEnterStasis(l4r9_doorgob)
    omGobEnterStasis(l4r9_hutwalls)
    omGobEnterStasis(l4r9_ringbsp)
    omGobEnterStasis(l4_r9shwang)
    omGobEnterStasis(l4r9_hutshat)
    omGobEnterStasis(l4r9_ringshat)
    omGobEnterStasis(l4_r12item01)
    omGobEnterStasis(l4_r12item02)
    omGobEnterStasis(l4_r12item03)
    omGobEnterStasis(l4_r12item04)
    omGobEnterStasis(l4_r12item05)

    -- create kurt's parachute --
    mdkCreateObjectLua("ml4z_chute", OBJ_SCENERY, scene, ml4z_stuntkurt, "KT_TORSO", 0,0,0, 1,0,0,0, "chute",0,0,0,0)
    omAnimPlay(ml4z_chute, ANIM_CLOSE, ANIMFLAG_NOTRANS)

    mdkSaveMovie(4,"z")

    StartMovie(mdkGetCameraGob(), {

        -- switch to movie mode --
        { chSndSwitchMusic, {-1} },
        { omGobExitStasis,      { ml4z_camera01 } },
        { omGobExitStasis,      { ml4z_camera02 } },
        { omGobExitStasis,      { ml4z_stuntkurt } },
        { omGobExitStasis,      { ml4z_stuntmax } },    
  
        { omGobExitStasis,      { ml4z_stuntcnhd1 } },
        { omGobExitStasis,      { ml4z_stuntcnhd2 } },
        { omGobExitStasis,      { ml4z_bridge } },
        { omGobExitStasis,      { ml4z_maxmovegob } },
        { omGobExitStasis,      { ml4z_kurtmovegb } },
        { omGobExitStasis,      { ml4z_ch2movegob } },
        { omGobExitStasis,      { ml4z_ch1movegob } },
        { PlayerEnterStasis },
        { mdkDisableDefaultCamera, {} },
        { mdkDisableGui,        {} },

        -- cut 1 --

        { mdkPreloadRes,    { "ml4z_kurt1.wav", 0 } },
        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_maxmovegob, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_stuntmax, ANIM_ACTION27, 0 } },
        { omAnimPlay,       { ml4z_kurtmovegb, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_stuntkurt, ANIM_ACTION07, 0 } },
        { WaitForResourceLoad },
        { mdkPreloadRes,    { "ml4z_cone1.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_kurt1, DIALOGPORTRAIT_KURT, 3.8, DIALOGFLAG_BOTTOM } },
        
  
        { mdkDialogIsDone,  {} },
    
            -- cut 2 --

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION01, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_ch2movegob, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_ch1movegob, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_stuntcnhd1, ANIM_ACTION02, 0 } },
        { omAnimPlay,       { ml4z_stuntcnhd2, ANIM_ACTION03, 0 } },
        { mdkPreloadRes,    { "ml4z_kurt2.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_cone1, DIALOGPORTRAIT_CONEHEAD, 2, DIALOGFLAG_TOP } },
        { mdkDialogIsDone,  {} },

            -- cut 3 --

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
	{ omAnimPlay,       { ml4z_camera02, ANIM_ACTION02, ANIMFLAG_NOTRANS } }, 
   	{ omAnimPlay,       { ml4z_kurtmovegb, ANIM_ACTION02, ANIMFLAG_NOTRANS } },






   
	{ omAnimPlay,       { ml4z_ch2movegob, ANIM_ACTION01, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_ch1movegob, ANIM_ACTION01, ANIMFLAG_NOTRANS } },



       	{ omAnimPlay,       { ml4z_stuntkurt, ANIM_ACTION25, 0 } },
        { omAnimPlay,       { ml4z_stuntcnhd1, ANIM_ACTION04, 0 } },
     	{ omAnimPlay,       { ml4z_stuntcnhd2, ANIM_ACTION05, 0 } },

    	{ mdkPreloadRes,    { "ml4z_cone2.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_kurt2, DIALOGPORTRAIT_KURT, 2.4, DIALOGFLAG_BOTTOM } },
        { mdkDialogIsDone,  {} },
        { mdkPreloadRes,    { "ml4z_kurt3.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_cone2, DIALOGPORTRAIT_CONEHEAD, 4, DIALOGFLAG_TOP } },
        { mdkDialogIsDone,  {} },
        { mdkPreloadRes,    { "ml4z_cone3.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_kurt3, DIALOGPORTRAIT_KURT, 1.1, DIALOGFLAG_BOTTOM } },
        { mdkDialogIsDone,  {} },
        { mdkPreloadRes,    { "ml4z_kurt4.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_cone3, DIALOGPORTRAIT_CONEHEAD, 4, DIALOGFLAG_TOP } },
       	{ mdkDialogIsDone,  {} },
        { omGobEnterStasis,  { ml4z_camera02 } },
               
        -- cut 4 --
      	{ omGobExitStasis,      { ml4z_stuntshwan } },
       	{ omGobExitStasis,      { ml4z_shwmovegob } },
        { omGobEnterStasis, { ml4z_camera02 } },
        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_maxmovegob, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_shwmovegob, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_kurtmovegb, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
	{ omAnimPlay,       { ml4z_stuntkurt, ANIM_ACTION24, 0 } },
        { omAnimPlay,       { ml4z_stuntmax, ANIM_ACTION28, 0 } },
        { mdkPreloadRes,    { "ml4z_shwang1.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_kurt4, DIALOGPORTRAIT_KURT, 2, DIALOGFLAG_BOTTOM } },
        { mdkDialogIsDone,  {} },     
    	{ omAnimPlay,       { ml4z_stuntshwan, ANIM_ACTION17, 0 } },
        { mdkPreloadRes,    { "ml4z_shwang2.wav", 0 } },
        { mdkDialogPanel,   { strings.ml4z_shwang1, DIALOGPORTRAIT_SCHWANG, 3, DIALOGFLAG_HIDE} },
        { mdkPreloadRes,    { "ml4z_kurt5.wav", 0 } },
        { mdkDialogIsDone,  {} },
        { mdkDialogPanel,   { strings.ml4z_shwang2, DIALOGPORTRAIT_SCHWANG, 4, DIALOGFLAG_TOP} },
        { mdkPreloadRes,    { "ml4z_alien1.wav", 0 } },
        { mdkDialogIsDone,  {} },
   
        -- cut 5 --

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION04, ANIMFLAG_NOTRANS } },
      	{ omAnimPlay,       { ml4z_shwmovegob, ANIM_ACTION04, ANIMFLAG_NOTRANS } },
    	{ omAnimPlay,       { ml4z_stuntshwan, ANIM_ACTION16, 0 } },
        { omAnimJustLooped, { ml4z_camera01, ANIM_ACTION04 } },
        { mdkDialogPanel,   { strings.ml4z_alien1, DIALOGPORTRAIT_NONE, 0, DIALOGFLAG_HIDE } },

        -- cut 6 --

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
      	{ omAnimPlay,       { ml4z_shwmovegob, ANIM_ACTION05, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_stuntshwan, ANIM_ACTION15, 0 } },
        { omAnimJustLooped, { ml4z_camera01, ANIM_ACTION05 } },



        -- cut 7 --

      	{ omGobEnterStasis,  { ml4z_stuntshwan } },

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION06, ANIMFLAG_NOTRANS } },
        { mdkDialogPanel,   { strings.ml4z_kurt5, DIALOGPORTRAIT_KURT, 4, DIALOGFLAG_BOTTOM } },
	{ omAnimPlay,       { ml4z_maxmovegob, ANIM_ACTION06, ANIMFLAG_NOTRANS } },
       	{ omAnimPlay,       { ml4z_kurtmovegb, ANIM_ACTION06, ANIMFLAG_NOTRANS } },


        { omAnimPlay,       { ml4z_stuntkurt, ANIM_ACTION23, 0 } },

   
        { omAnimPlay,       { ml4z_stuntmax, ANIM_READY1, 0 } },
        { omAnimJustLooped, { ml4z_camera01, ANIM_ACTION06 } },

      

        
        -- cut 8 --

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION07, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_kurtmovegb, ANIM_ACTION07, ANIMFLAG_NOTRANS } },
    
        { omAnimPlay,       { ml4z_stuntkurt, ANIM_ACTION13, 0 } },
        { Wait,             { ml4z_camera01, 0.5 } },
        { omAnimPlay,       { ml4z_chute, ANIM_OPEN, ANIMFLAG_NOTRANS } },
        { omAnimJustLooped, { ml4z_kurtmovegb, ANIM_ACTION07 } },

    
        -- cut 9 -- 

        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION08, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_maxmovegob, ANIM_ACTION08, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_stuntmax, ANIM_RUNF, 0 } },
        { omAnimJustLooped, { ml4z_camera01, ANIM_ACTION08 } },

        -- cut 10 --

        { omAnimStop,       { ml4z_stuntmax, ANIM_RUNF, 0 } },
        { omAnimPlay,       { ml4z_camera01, ANIM_ACTION09, ANIMFLAG_NOTRANS } },
        { omAnimPlay,       { ml4z_kurtmovegb, ANIM_ACTION09, ANIMFLAG_NOTRANS } },
    
        { omAnimPlay,       { ml4z_stuntkurt, ANIM_CHUTEF, 0 } },
        { Wait, { ml4z_camera01, 2 } },
    	{ omSceneFade, { mdkGetScene() , 0, 0, 0, 1, 1, 1, 0 } },
        { omAnimJustLooped, { ml4z_kurtmovegb, ANIM_ACTION09 } };

        Done = function()
            mdkStartLevel(5,11)
        end
    })

end
----------------------------------------------------

Level.PlayIntroMovie = function()

    if (ml4a_camera==nil) then return end

    mdkSaveMovie(4,"a")

    StartMovie(mdkGetCameraGob(), {

        -- switch to movie mode --
        { chSndSwitchMusic, { -1 } },
        { omGobExitStasis,  { ml4a_camera } },
        { omGobExitStasis,  { ml4a_krmovegob } },
        { omGobExitStasis,  { ml4a_ndmovegob } },
        { omGobExitStasis,  { ml4a_stuntnude } },
        { PlayerEnterStasis },
        { mdkDisableDefaultCamera, {} },
        { mdkDisableGui,    {} },

    -- cut 2 --
    { omAnimPlay, { ml4a_camera, ANIM_ACTION01, ANIMFLAG_NOTRANS } },
    { omAnimPlay, { ml4a_ndmovegob, ANIM_ACTION01, ANIMFLAG_NOTRANS } },        
    { omAnimPlay, { ml4a_stuntnude, ANIM_ACTION09, ANIMFLAG_NOTRANS } },
    { omAnimJustLooped, { ml4a_camera, ANIM_ACTION01 } },

    -- cut 3 --
    { omAnimPlay, { ml4a_camera, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
    { omAnimPlay, { ml4a_ndmovegob, ANIM_ACTION02, ANIMFLAG_NOTRANS } },
    { omAnimPlay, { ml4a_stuntnude, ANIM_ACTION10, 0 } },
    { omAnimJustLooped, { ml4a_camera, ANIM_ACTION02 } },

    -- cut 4 --
    { omAnimPlay, { ml4a_camera, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
    { omAnimPlay, { ml4a_ndmovegob, ANIM_ACTION03, ANIMFLAG_NOTRANS } },
    { omAnimPlay, { ml4a_krmovegob, ANIM_ACTION00, ANIMFLAG_NOTRANS } },
    { omAnimPlay, { ml4a_stuntnude, ANIM_ACTION11, 0 } },
    { omAnimJustLooped, { ml4a_stuntnude, ANIM_ACTION11 } },
    { omGobEnterStasis, { ml4a_stuntnude } },
    { omGobExitStasis,  { ml4a_stuntkurt } },
    { omAnimPlay, { ml4a_stuntkurt, ANIM_ACTION12, 0 } },
    { Wait, {ml4a_camera, 5.6 } },
    { omSceneFade, { mdkGetScene() , 0, 0, 0, 1, 2, 2, 0 } },
    { Wait, {ml4a_camera, 2.1 } };
            

    Done = function()
        HideNextLoadingScreen(strings.l4chk1)
        mdkNewGame(4,1)
    end
    })

end
----------------------------------------------------

Level.R4CloakOnUpdate = function(gob)

    local cloakeffect

    if(l4_r4.clkdone) then return end
    if(mdkGobDistance(gob, mdkGetPlayerGob())<16) then
        --play an effect for disappearing
        cloakeffect = mdkCreateObjectLua("cloakeffect"..l4_r4.fx, OBJ_EFFECT02, mdkGetScene(), gob, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )
        l4_r4.fx=l4_r4.fx+1
        omGobGSPlay(l4_r4.cloakitem.cloaksound, 0,0,0,0)

        mdkGobSetPosition(cloakeffect, l4_r4.CloakPoints[l4_r4.currentpoint])
    
        --move the cloak to the next point
        l4_r4.currentpoint= l4_r4.currentpoint+1
        if(l4_r4.currentpoint>=5) then
            l4_r4.clkdone=1
            l4_r4.currentpoint=1 
            --mdkSetLuaEvent(l4_r4.cloakitem, "OnUpdate", "")
        end
        mdkGobSetPosition(l4_r4.cloakitem, l4_r4.CloakPoints[l4_r4.currentpoint])
        --play an effect for appearing
        cloakeffect = mdkCreateObjectLua("cloakeffect"..l4_r4.fx, OBJ_EFFECT02, mdkGetScene(), gob, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )
        l4_r4.fx=l4_r4.fx+1
        mdkGobSetPosition(cloakeffect, l4_r4.CloakPoints[l4_r4.currentpoint])
   end

end

----------------------------------------------------

Level.R5OnDie = function(gob)
	l4_r5.dead = l4_r5.dead + 1
end
----------------------------------------------------

Level.R8BobOnOutOfAmmo = function(gob, id)

    if(id == OBJ_SNIPERBOUNCEITEM) then

        if(not l4_r8.b1) then
            mdkCreateObjectLua("bullet1", OBJ_SNIPERBOUNCEITEM, mdkGetScene(), l4_r8, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )    
            mdkGobSetPosition(bullet1,"l4_r8snipbnc01")
            mdkSetLuaEvent(bullet1, "OnPickedUp", Level.R8ItemOnPickedUp1)
            l4_r8.b1 = 1
        end

        if(not l4_r8.b2) then
            mdkCreateObjectLua("bullet2", OBJ_SNIPERBOUNCEITEM, mdkGetScene(), l4_r8, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )    
            mdkGobSetPosition(bullet2,"l4_r8snipbnc02")
            mdkSetLuaEvent(bullet2, "OnPickedUp", Level.R8ItemOnPickedUp2)
            l4_r8.b2 = 1
        end

    end

end

----------------------------------------------------

Level.R8ItemOnPickedUp1 = function(gob, id)

    l4_r8.b1 = nil

end

----------------------------------------------------

Level.R8ItemOnPickedUp2 = function(gob, id)

    l4_r8.b2 = nil

end

----------------------------------------------------

Level.SamsmiteOnUpdate = function(gob)
    
    -- kill a samsmite when it gets too far from the platform center --
    if (mdkGobDistancePoint(gob, "l4_r9center") > 150) and (not gob.killed) then
        StopScript(gob)
        mdkWalkerDie(gob)
        gob.killed = 1
    end

    mdkWalkerAnimUpdate(gob)

end
----------------------------------------------------

Level.ShwangActionJump = function(gob)

    -- jump attack --
    if (not gob.jumpstate) then

        if (mdkWalkerHeadToPoint(gob, "l4_r9center") == 1) then

            -- jump to the platform --
            mdkWalkerJumpToPoint(gob, "l4_r9center", 20)
            gob.jumpstate = 1
            gob.atomicaction = 1

            -- our next waypoint is the opposite side of the ring --
            Level.ShwangAdvanceRunWP(gob, 3)

        end

    elseif (gob.jumpstate == 1) then

        if (mdkGobDistancePoint(gob, "l4_r9center") < 5) then

            -- deal out area damage just before shwang hits the ground --
            local explodegob
            explodegob = mdkCreateObjectLua("", OBJ_EXPLOSION11, mdkGetScene(), l4_r9, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0)
            mdkGobAlignWith(explodegob, gob, 1)
            omSceneShake(mdkGetScene(), 0.01, 3, 3, 'rumble1')
            mdkDealDamageArea(gob, 18, 20, 10, DAMAGE_BADGUY + DAMAGE_KNOCKDOWN)
            gob.jumpstate = 2

        end

    elseif (gob.jumpstate == 2) then

        if (mdkWalkerIsReady(gob) == 1) and (not l4_r9.shwanginbeam) then
            local point = gob.runwps[gob.currunwp]
            if (mdkWalkerHeadToPoint(gob, point) == 1) then

                -- jump to the opposite side of the ring --
                mdkWalkerJumpToPoint(gob, point, 20)
                gob.jumpstate = 3

                -- run the waypoints as normal from now on --
                Level.ShwangAdvanceRunWP(gob)

            end
        end

    elseif (gob.jumpstate == 3) then

        -- when we land, the attack is over --
        if (mdkWalkerIsReady(gob) == 1) then
            gob.jumpstate = nil
            gob.atomicaction = nil
            Level.ShwangEndAction(gob)
        end

    end

end
----------------------------------------------------

Level.ShwangActionReady = function(gob)

    local player = mdkGetPlayerGob()

    -- stand ready --
    if (not gob.animstarted) then
        if (mdkWalkerHeadToGob(gob, player) == 1) then
            mdkWalkerPlayAnim(gob, ANIM_READY1)
            gob.animstarted = 1
        end
    end

end
----------------------------------------------------

Level.ShwangActionSummon = function(gob)

    local player = mdkGetPlayerGob()

    -- summon fire samsmites --
    if (not gob.animstarted) then
        if (mdkWalkerHeadToGob(gob, player) == 1) then

            omSceneShake(mdkGetScene(), 0.01, 3, 3, 'rumble1')

            local spawnpoints = { "l4r9_samspawn1", "l4r9_samspawn2", "l4r9_samspawn3", "l4r9_samspawn4", "l4r9_samspawn5", "l4r9_samspawn6"; n = 6 }
            local samsmite, i

            i = 1
            while (i <= 2) do

                -- create fire samsmite and make it fall from the roof --
                samsmite = mdkCreateObjectLua("", OBJ_OBSIDIANSAMSMITE, mdkGetScene(), l4_r9, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0)
                mdkGobSetPosition(samsmite, spawnpoints[random(spawnpoints.n)])
                mdkSetLuaEvent(samsmite, "OnUpdate", Level.SamsmiteOnUpdate)

                i = i + 1
            end

            mdkWalkerPlayAnim(gob, ANIM_ACTION08)
            gob.animstarted = 1

        end
    end

end
----------------------------------------------------

Level.ShwangActionTaunt = function(gob)

    local player = mdkGetPlayerGob()

    -- taunt the player --
    if (not gob.animstarted) then
        if (mdkWalkerHeadToGob(gob, player) == 1) then

            -- play one of shwang's taunt voice-overs --
            mdkDialogPanel(l4_r9.taunts[random(l4_r9.taunts.n)], DIALOGPORTRAIT_SCHWANG, 0, DIALOGFLAG_HIDE+DIALOGFLAG_NODUMP)
            
            mdkWalkerPlayAnim(gob, ANIM_TAUNT0)
            gob.animstarted = 1

        end
    end

end
----------------------------------------------------

Level.ShwangActionThrow = function(gob)

    local player = mdkGetPlayerGob()

    -- throw rock samsmite --
    if (not gob.animstarted) then
        if (mdkWalkerHeadToGob(gob, player) == 1) then
            --print("Throw samsmite")
            mdkWalkerPlayAnim(gob, ANIM_THROW)
            gob.animstarted = 1
        end
    end

end
----------------------------------------------------

Level.ShwangAdvanceRunWP = function(gob, n)

    -- advance by 1 if no increment is given --
    if (not n) then
        n = 1
    end

    -- increment current waypoint --
    gob.currunwp = gob.currunwp + n

    -- wrap it into the valid range --
    while (gob.currunwp > gob.runwps.n) do
        gob.currunwp = gob.currunwp - gob.runwps.n
    end

end
----------------------------------------------------

Level.ShwangAttack = function(gob)

    local result = 0

    if (gob.throwmax) and (not gob.atomicaction) then

        -- throw max to the platform --
        Level.ShwangThrowMax(gob)

    elseif (gob.burn) and (not gob.atomicaction) then

        -- burn if shwang's been beamed --
        Level.ShwangBurn(gob)

    elseif (gob.flinch) and (not gob.atomicaction) then

        -- flinch if shwang's been sniped --
        Level.ShwangFlinch(gob)

    elseif (gob.actiondone) then

        gob.actiondone = nil

        if (l4_r9.bossstage == 2) then

            if (gob.action == 2) then

                -- taunt the player after the ready cycle --
                gob.action = 1

            elseif (gob.action == 1) then

                -- allow the script to proceed after the taunt --
                gob.action = 0
                result = 1

            else

                -- start a ready cycle after each action --
                gob.action = 2

            end

        elseif (l4_r9.bossstage == 3) then

            if (gob.action == 1) then

                -- allow the script to proceed after the taunt --
                gob.action = 0
                result = 1

            else

                -- start a taunt cycle after each action --
                gob.action = 1

            end

        end

    elseif (gob.action == 1) then

        -- taunt player action --
        Level.ShwangActionTaunt(gob)

    elseif (gob.action == 2) then

        -- stand ready action --
        Level.ShwangActionReady(gob)

    elseif (gob.action == 3) then

        -- jump on player action --
        Level.ShwangActionJump(gob)

    elseif (gob.action == 4) then

        -- throw rock samsmite action --
        Level.ShwangActionThrow(gob)

    elseif (gob.action == 5) then

        -- summon fire samsmites action --
        Level.ShwangActionSummon(gob)

    else

        -- choose next attack action --
        if (l4_r9.bossstage == 2) then

            -- choose a stage 2 attack --
            if (gob.attackcounter == 3) and (not l4_r9.shwanginbeam) then
                gob.action = 3
            else
                gob.action = 4
            end

        elseif (l4_r9.bossstage == 3) then

            -- choose a stage 3 attack --
            if (gob.attackcounter == 3) and (not l4_r9.shwanginbeam) then
                gob.action = 3
            else
                gob.action = 5
            end

        end

        -- increment attack counter --
        gob.attackcounter = gob.attackcounter + 1
        if (gob.attackcounter > 3) then
            gob.attackcounter = 1
        end

    end

    return result

end
----------------------------------------------------

Level.ShwangBurn = function(gob)

    local player = mdkGetPlayerGob()

    -- play burn animation --
    if (not gob.burnstarted) then

        -- play one of shwang's burning voice-overs --
        mdkDialogPanel(l4_r9.burns[random(l4_r9.burns.n)], DIALOGPORTRAIT_SCHWANG, 0, DIALOGFLAG_HIDE+DIALOGFLAG_NODUMP)

        omAnimPlay(gob, ANIM_BURNING, ANIMFLAG_OVERLAY)
        gob.burnstarted = 1

    end

end
----------------------------------------------------

Level.ShwangEndAction = function(gob)
    gob.animstarted = nil
    gob.actiondone = 1
end
----------------------------------------------------

Level.ShwangFlinch = function(gob)

    local player = mdkGetPlayerGob()

    -- play flinch animation --
    if (not gob.flinchstarted) then
        if (mdkWalkerHeadToGob(gob, player) == 1) then

            -- play one of shwang's ouch voice-overs --
            mdkDialogPanel(l4_r9.ouches[random(l4_r9.ouches.n)], DIALOGPORTRAIT_SCHWANG, 0, DIALOGFLAG_HIDE+DIALOGFLAG_NODUMP)
            
            omAnimPlay(gob, ANIM_SCARED, ANIMFLAG_OVERLAY)
            gob.flinchstarted = 1
        end
    end

end
----------------------------------------------------

Level.ShwangOnAnimLoop = function(gob, animid)

    if (animid == ANIM_TAUNT0) or (animid == ANIM_READY1) or (animid == ANIM_ACTION08) or (animid == ANIM_THROW) then

        -- flag when an attack action ends --
        Level.ShwangEndAction(gob)

    elseif (animid == ANIM_ACTION09) then

        -- flag when the throw max sequence ends --
        omAnimStop(gob, animid, 0)
        gob.throwmaxstarted = nil
        gob.throwmax = nil

    elseif (animid == ANIM_SCARED) then
        
        -- flag when the flinch animation ends --
        omAnimStop(gob, animid, 0)
        gob.flinchstarted = nil
        gob.flinch = nil

    elseif (animid == ANIM_BURNING) then
        
        -- flag when the burn animation ends --
        omAnimStop(gob, animid, 0)
        gob.burnstarted = nil
        gob.burn = nil

    elseif (animid == ANIM_ACTION13) then

        -- shwang's fist is no longer in pain --
        omAnimStop(gob, ANIM_ACTION13, 0)

    end

end
----------------------------------------------------

Level.ShwangOnCustomKey = function(gob, part, key)

    if (key == CUSTKEY_THROW) and (part == "SHWANG_PALMR") then

        local jumppoints = { "l4_r9center", "l4_r9smack1", "l4_r9smack2", "l4_r9smack3", "l4_r9smack4", "l4_r9smack5"; n = 6 }
        local x, y, z = mdkGetSlotPositionLua(shwang2, "SHWANG_HOLDPOSR")
        local samsmite, i

        --print("throw key")

        i = 1
        while (i <= 2) do

            -- create rock samsmite and make it jump from shwang's hand to the platform --
            samsmite = mdkCreateObjectLua("", OBJ_SAMSMITE, mdkGetScene(), nil, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0)
            mdkGobSetPositionXYZ(samsmite, x, y, z)
            mdkWalkerJumpToPoint(samsmite, jumppoints[random(jumppoints.n)], random() * 20 + 20)
            mdkSetLuaEvent(samsmite, "OnUpdate", Level.SamsmiteOnUpdate)

            i = i + 1
        end

    elseif (key == CUSTKEY_USER1) and (part == "SHWANG_PALML") then

        if (not l4_r9.stageover) then

            -- detach max and make him jump to the platform --
            --print("max key")
            local x, y, z = mdkGetSlotPositionLua(shwang2, "SHWANG_HOLDPOSL")
            omGobAttach( mdkGetScene(), nil, max2, -1)
            mdkGobSetPositionXYZ(max2, x, y, z)
            mdkMaxAIJumpToPoint(max2, "l4_r9center", 20)
            l4_r9.stageover = 1

        end

    end

end
----------------------------------------------------

Level.ShwangOnDamage = function(gob, from, damage, damagetype, part)
    
    if (l4_r9.bossstage == 2) then

        -- in stage 2, check for sniper damage to the hand holding max --
        if (mdkIsDamageType(damagetype, DAMAGE_SNIPER) == 1) and (not gob.fistpain) then

            if (part == "SHWANG_PALML") or (part == "SHWANG_THUMBL") or
               (part == "SHWANG_FIN1AL") or (part == "SHWANG_FIN1BL") or
               (part == "SHWANG_FIN2AL") or (part == "SHWANG_FIN2BL") then

                if (gob.numhits <= 0) then

                    -- trigger throw max sequence if not already triggered --
                    if (not l4_r9.maxthrown) then
                        l4_r9.maxthrown = 1
                        gob.throwmax = 1
                    end

                else

                    -- count down the number of hits to shwang's left hand --
                    gob.numhits = gob.numhits - 1

                    -- trigger flinch sequence if not already triggered --
                    if (not gob.flinchstarted) then
                        gob.flinch = 1
                    end

                end

                -- shwang's fist is in pain for 5 seconds --
                omAnimPlay(gob, ANIM_ACTION13, ANIMFLAG_OVERLAY)
                omAnimSetPriority(gob, ANIM_ACTION13, 20)
                omGobSetTimer(gob, 5)
                gob.fistpain = 1
    
            end

        end

    elseif (l4_r9.bossstage == 3) then

        -- in stage 3, only take damage from the beams --
        if ((from == l4sh_beams1) or (from == l4sh_beams2) or (from == l4sh_beams3)) and (not gob.atomicaction) and
           (not gob.killed) and (mdkIsDamageType(mdkGobGetDamageFilter(gob), damagetype) == 1) then

            if (mdkSubtractHitpoints(gob, damage) == 1) then

                -- kill shwang --
                gob.killed = 1
                gob.startkill = 1
                l4_r9.startdeath = from

            elseif (not gob.burnstarted) then

                -- trigger burn sequence if not already triggered --
                gob.burn = 1

            end

            mdkShowHealthBar(gob)
        end

    end

end
----------------------------------------------------

Level.ShwangOnDie = function(gob)
    mdkDialogPanel(strings.ml4y_shwang9, DIALOGPORTRAIT_SCHWANG, 0, DIALOGFLAG_HIDE+DIALOGFLAG_NODUMP)
    mdkMaxAIShoot(max2, 0)
    StopScript(max2)
    omGobSetTimer(l4_r9, 5)
    mdkHideBossHealthBar()
    God(1)
end
----------------------------------------------------

Level.ShwangOnTimer = function(gob)
    gob.fistpain = nil
end
----------------------------------------------------

Level.ShwangOnUpdate = function(gob)

    local player = mdkGetPlayerGob()

    -- start shwang's death sequence --
    if (gob.startkill) and (not gob.atomicaction) then
        StopScript(gob)
        omAnimStop(gob, ANIM_ACTION09, 0)
        omAnimStop(gob, ANIM_ACTION12, 0)
        omAnimStop(gob, ANIM_BURNING, 0)
        omAnimStop(gob, ANIM_SCARED, 0)
        mdkWalkerStop(gob)
        gob.killing = 1
        gob.startkill = nil
    end

    -- update shwang's death sequence --
    if (gob.killing) then
        if (mdkWalkerHeadToGobDelta(gob, player, -PI/2) == 1) then
            mdkWalkerDie(gob)
            gob.killing = nil
        end
    end

    mdkWalkerAnimUpdate(gob)
end
----------------------------------------------------

Level.ShwangRun = function(gob)

    local result = 0
    local point = gob.runwps[gob.currunwp]

    if (gob.throwmax) then

        -- stop and throw max to the platform --
        mdkWalkerStop(gob)
        Level.ShwangThrowMax(gob)

    elseif (gob.burn) and (not gob.atomicaction) then

        -- stop and burn if shwang's been beamed --
        mdkWalkerStop(gob)
        Level.ShwangBurn(gob)

    elseif (gob.flinch) then

        -- stop and flinch if shwang's been sniped --
        mdkWalkerStop(gob)
        Level.ShwangFlinch(gob)

    else

        -- start the shooting animation --
        if (not gob.shooting) then
            omAnimPlay(gob, ANIM_ACTION12, ANIMFLAG_OVERLAY)
            gob.shooting = 1
        end
        
        result = mdkWalkerGotoPointDirectly(gob, point, 1, 10)

        -- when shwang's reached the waypoint --
        if (result == 1) then

            -- stop on a dime --
            mdkWalkerStop(gob)
            Level.ShwangAdvanceRunWP(gob)

            -- stop the shooting animation --
            omAnimStop(gob, ANIM_ACTION12, 0)
            gob.shooting = nil

        elseif (l4_r9.shwanginbeam) then

            -- stop on a dime --
            mdkWalkerStop(gob)

            -- stop the shooting animation --
            omAnimStop(gob, ANIM_ACTION12, 0)
            gob.shooting = nil
            result = 1

        end

    end

    return result
end
----------------------------------------------------

Level.ShwangThrowMax = function(gob)

    local player = mdkGetPlayerGob()

    -- throw max to the platform --
    if (not gob.throwmaxstarted) then
        if (mdkWalkerHeadToGob(gob, player) == 1) then
            omAnimStop(gob, ANIM_ACTION10, 0)
            omAnimPlay(gob, ANIM_ACTION09, ANIMFLAG_OVERLAY)
            --print("Throw max")
            gob.throwmaxstarted = 1
        end
    end

end
----------------------------------------------------

Level.SniperLockOnDamage = function(gob, from, damage, damagetype, part)

    if (mdkIsDamageType( damagetype, DAMAGE_SNIPER ) == 1) and (not gob.switch.flipped) and (not l4_r9.activeswitch) then

        -- trigger the beam cutscene --
        mdkKurtEnterNormalMode(mdkGetPlayerGob())
        l4_r9.activeswitch = gob.switch
        l4_r9.startbeam = 1

        -- flip the switch --
        omAnimPlay(gob.switch, ANIM_CLOSE, 0)
        omAnimPlay(gob, ANIM_DISABLED, 0)
        gob.switch.flipped = 1

        -- temporarily lock any other enabled switches --
        foreach( l4_r9.switches,
            function(i, gob)
                if (not gob.flipped) then
                    omAnimPlay(gob.sniperlock, ANIM_LOCK, 0)
                end
            end )

    end

end
----------------------------------------------------

Level.StartBossFight1 = function()
    mdkProxDoorLock(l4r9_doorgob, 1)
	omGobExitStasis(l4_r9shwang)
	omAnimPlay(l4_r9shwang, ANIM_ACTION00, ANIMFLAG_NOTRANS)
    l4_r9.bossstage = 1
    l4_r9shwang.squishes = 3
    l4_r9shwang.nextanim = ANIM_ACTION01
    l4_r9shwang.hits = 3

    -- shwang's voice-overs --
    l4_r9.taunts = { strings.ml4y_shwang1, strings.ml4y_shwang2, strings.ml4y_shwang3, strings.ml4y_shwang4; n = 4 }
    l4_r9.ouches = { strings.ml4y_shwang6, strings.ml4y_shwang7; n = 2 }
    l4_r9.burns = { strings.ml4y_shwang8; n = 1 }

end
----------------------------------------------------

Level.StartBossFight2 = function()

    local slotindex, i
    local player = mdkGetPlayerGob()

    l4_r9.bossstage = 2

    mdkKurtEnterNormalMode( player )

    -- hide/shatter hut walls and inner ring of floor --
    omGobEnterStasis(l4r9_doorgob)
    omGobEnterStasis(l4r9_hutwalls)
    omGobEnterStasis(l4r9_ringbsp)
    omGobEnterStasis(l4_r9shwang)
    slotindex = omGobGMGetSltIndexByName(l4r9_hutshat, "SHATTERME")
    omGobGMShatter(l4r9_hutshat, slotindex, 0, 0, 1, 10, SHATTEROPTION_CENTRE)
    slotindex = omGobGMGetSltIndexByName(l4r9_ringshat, "SHATTERME")
    omGobGMShatter(l4r9_ringshat, slotindex, 0, 0, 1, 40, SHATTEROPTION_VECTOR)
    omGobGSPlay(l4_r9.shattersound, 0,0,0,0)
    omGobExitStasis(l4_r9rimwall)

    -- create shwang and set him running about the room --
    mdkCreateObjectLua("shwang2", OBJ_SHWANG, mdkGetScene(), l4_r9, nil, 0,0,0, 1,0,0,0, nil,0,0,0,0 )
    mdkGobSetPosition(shwang2, "shwang_wp8")
    mdkSetLuaEvent(shwang2, "OnAnimLoop", Level.ShwangOnAnimLoop)
    mdkSetLuaEvent(shwang2, "OnCustomKey", Level.ShwangOnCustomKey)
    mdkSetLuaEvent(shwang2, "OnDamage", Level.ShwangOnDamage)
    mdkSetLuaEvent(shwang2, "OnDie", Level.ShwangOnDie)
    mdkSetLuaEvent(shwang2, "OnTimer", Level.ShwangOnTimer)
    mdkSetLuaEvent(shwang2, "OnUpdate", Level.ShwangOnUpdate)
    shwang2.normaldamagefilter = mdkGobGetDamageFilter(shwang2)
    mdkGobSetDamageFilter(shwang2, 0)
    mdkGobSetBoss(shwang2, 1)
    shwang2.runwps = { "shwang_wp1", "shwang_wp2", "shwang_wp3", "shwang_wp4", "shwang_wp5", "shwang_wp6", "shwang_wp7", "shwang_wp8"; n = 8 }
    shwang2.currunwp = 1
    shwang2.numhits = 3
    shwang2.attackcounter = 1

    StartScript(shwang2, {
        { Level.ShwangRun },
        { Level.ShwangAttack },
        { LoopScript },
    })

    -- create max and place him in shwang's left hand --
    mdkCreateObjectLua("max2", OBJ_MAX, mdkGetScene(), shwang2, "SHWANG_HOLDPOSL", 0,0,0, 1,0,0,0, nil,0,0,0,0 )
    mdkMaxInitAI(max2)
    mdkMaxAISetActorHitCheck(max2, 0)
    omAnimPlay(shwang2, ANIM_ACTION10, ANIMFLAG_OVERLAY)
    omAnimSetPriority(shwang2, ANIM_ACTION10, 15)

end
----------------------------------------------------

Level.StartBossFight3 = function()

    local player = mdkGetPlayerGob()

    l4_r9.bossstage = 3

    -- shwang is damageable now --
    mdkGobSetDamageFilter(shwang2, shwang2.normaldamagefilter)

    -- max runs about attacking shwang --
    max2.nextpoint = 0
    max2.points = { "l4_r9smack1", "l4_r9smack2", "l4_r9smack3", "l4_r9smack4", "l4_r9smack5"; n = 5 }
    mdkMaxAISetActorHitCheck(max2, 1)
    mdkMaxAIGiveGun(max2, OBJ_UZI)

    StartScript(max2, {
        { Level.BossMaxPickNextPoint },
        { Level.BossMaxGotoPoint },
        { mdkMaxAIPlayAnim,   { ANIM_READY2 } },
        { omAnimJustLooped,   { ANIM_READY2 } },
        { mdkMaxAIShoot,      { 1 } },
        { Level.BossMaxHeadToShwang },
        { mdkMaxAIShoot,      { 0 } },
        { LoopScript },
    })

    l4_r9.AssignSwitchColors()
    l4_r9.ResetSwitches()

end

Level.BossMaxPickNextPoint = function(gob)
    gob.nextpoint = gob.nextpoint + 1
    if (gob.nextpoint > max2.points.n) then gob.nextpoint = 1 end
end

Level.BossMaxGotoPoint = function(gob)
    return mdkMaxAIGotoPoint(gob, gob.points[gob.nextpoint])
end

Level.BossMaxHeadToShwang = function(gob)
    mdkMaxAIHeadToGob(gob, shwang2)
    return Wait(gob, 5)
end

----------------------------------------------------
