;; _

;; fix vehicles

modify:
{
	match:
	{
		"targetname" "wart"
		"classname" "func_tracktrain"
	}
	replace:
	{
		"orientationtype" "2"
	}
}
modify:
{
	match:
	{
		"targetname" "path_46"
		"classname" "path_track"
	}
	replace:
	{
		"origin" "4912 15808 1485"
	}
}
modify:
{
	match:
	{
		"targetname" "path_48"
		"classname" "path_track"
	}
	replace:
	{
		"origin" "5568 14976 1488"
	}
}

modify:
{
	match:
	{
		"targetname" "pelican"
		"classname" "func_tracktrain"
	}
	replace:
	{
		"orientationtype" "2"
	}
}
modify:
{
	match:
	{
		"targetname" "pelican_13"
		"classname" "path_track"
	}
	replace:
	{
		"target" "pelican_12"
		"speed" "100"
		"angles" "0 -90 0"
		"orientationtype" "2"
	}
	insert:
	{
		"OnPass" "pelican,SetSpeedReal,150,5.01,1"
	}
}
modify:
{
	match:
	{
		"targetname" "pelican_12"
		"classname" "path_track"
	}
	insert:
	{
		"OnPass" "nuke,Enable,,2,1"
		"OnPass" "nuke_sound,PlaySound,,0,1"
	}
}

modify:
{
	match:
	{
		"targetname" "path_49"
		"classname" "path_track"
	}
	delete:
	{
		"target" "path_75"
	}
}

;; prevent ct from delaying on spawn

modify:
{
	match:
	{
		"targetname" "/invasion?/"
		"classname" "trigger_teleport"
	}
	delete:
	{
		"filtername" "zombie"
	}
}
modify:
{
	match:
	{
		"targetname" "paf_1"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "invasion,Enable,,0,-1"
		"OnPass" "invasion1,Enable,,0,-1"
	}
	insert:
	{
		"OnPass" "invasion*,Enable,,10,1"
	}
}

;; fix zm teleport before boss

modify:
{
	match:
	{
		"targetname" "path_67"
		"classname" "path_track"
	}
	insert:
	{
		"OnPass" "tele_4,AddOutput,angles 0 270 0,14.1,1"
		"OnPass" "tele_4,AddOutput,origin 6144 6656 1600,14.1,1"
	}
}

;; music volume

modify:
{
	match:
	{
		"message" "epic.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#epic.mp3"
	}
}
modify:
{
	match:
	{
		"message" "halo_end.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#halo_end.mp3"
	}
}
modify:
{
	match:
	{
		"message" "halo_theme.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#halo_theme.mp3"
	}
}

;; fix boosting issue

add:
{
	"targetname" "stopper"
	"model" "*77"
	"wait" "1"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "6161 10964 1849"
	"classname" "trigger_multiple"
	"OnStartTouch" "!activator,AddOutput,absvelocity 0 0 0,0,-1"
}
modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "224616"
	}
	insert:
	{
		"OnMapSpawn" "stopper,AddOutput,angles 0 0 90,1,-1"
	}
}

;; fix bossfight

modify:
{
	match:
	{
		"targetname" "path_67"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "wall_end,Toggle,,15,-1"
	}
	insert:
	{
		"OnPass" "server,Command,say *** Follow Master Chief! ***,15,1"
	}
}
modify:
{
	match:
	{
		"targetname" "path_68"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "nuke_sound,PlaySound,,60,-1"
		"OnPass" "nuke,Enable,,60,-1"
		"OnPass" "halo_4,Toggle,,48,1"
		"OnPass" "halo_3,Toggle,,36,1"
		"OnPass" "halo_2,Toggle,,24,1"
		"OnPass" "halo_1,Toggle,,12,1"
		"OnPass" "server,Command,say *** The prophet is going to use the halo to destroy humanity! ***,0,-1"
		"OnPass" "server,Command,say *** Kill him before it's too late! ***,1,-1"
		"OnPass" "blast0,Enable,,57,-1"
		"OnPass" "blast1,Enable,,57,-1"
		"OnPass" "blast2,Enable,,57,-1"
		"OnPass" "blast3,Enable,,57,-1"
		"OnPass" "blast4,Enable,,57,-1"
		"OnPass" "blast5,Enable,,57,-1"
		"OnPass" "blast6,Enable,,57,-1"
		"OnPass" "blast7,Enable,,57,-1"
		"OnPass" "blast_m,StartForward,,57,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "path_71"
		"classname" "path_track"
	}
	insert:
	{
		"OnPass" "wall_end,Toggle,,0,1"
	}
}

modify:
{
	match:
	{
		"targetname" "path_73"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "server,Command,say *** Keep shootting! ***,0,-1"
		"OnPass" "bridge_3,Toggle,,10,-1"
		"OnPass" "wall_end,Toggle,,5,-1"
	}
	insert:
	{
		"OnPass" "wall_end,Toggle,,0,1"
		"OnPass" "pro,Enable,,0,1"
		"OnPass" "bridge_3,Toggle,,5,1"
		"OnPass" "nuke_sound,PlaySound,,60,1"
		"OnPass" "nuke,Enable,,60,1"
		"OnPass" "halo_4,Toggle,,48,1"
		"OnPass" "halo_3,Toggle,,36,1"
		"OnPass" "halo_2,Toggle,,24,1"
		"OnPass" "halo_1,Toggle,,12,1"
		"OnPass" "server,Command,say *** The prophet is going to use the halo to destroy humanity! ***,0,1"
		"OnPass" "server,Command,say *** Kill him before it's too late! ***,1,1"
		"OnPass" "blast0,Enable,,57,1"
		"OnPass" "blast1,Enable,,57,1"
		"OnPass" "blast2,Enable,,57,1"
		"OnPass" "blast3,Enable,,57,1"
		"OnPass" "blast4,Enable,,57,1"
		"OnPass" "blast5,Enable,,57,1"
		"OnPass" "blast6,Enable,,57,1"
		"OnPass" "blast7,Enable,,57,1"
		"OnPass" "blast_m,StartForward,,57,1"
	}
}

modify:
{
	match:
	{
		"targetname" "counter"
		"classname" "math_counter"
	}
	delete:
	{
		"OnHitMin" "wall_end,Toggle,,1,-1"
		"OnHitMin" "glass_end,Break,,1,-1"
		"OnHitMin" "wall_end3,Toggle,,0,-1"
		"OnHitMin" "timer,Disable,,0,-1"
		"OnHitMin" "pelican,StartForward,,0,-1"
		"OnHitMin" "prop,StartForward,,0,-1"
		"OnHitMin" "bridge_3,Toggle,,1,-1"
	}
	insert:
	{
		"OnHitMin" "server,Command,say *** The prophet has been killed! Wait for pelican to arrive. ***,0,1"
		"OnHitMin" "att*,Kill,,0,1"
		"OnHitMin" "timer,Disable,,0,1"
		"OnHitMin" "prop,StartForward,,0,1"
		"OnHitMin" "bridge_3,Toggle,,2,1"
		"OnHitMin" "wall_end,Toggle,,2,1"
		"OnHitMin" "glass_end,Break,,5,1"
		"OnHitMin" "wall_end3,Toggle,,5,1"
		"OnHitMin" "pelican,StartForward,,7,1"
	}
}

modify:
{
	match:
	{
		"targetname" "pro"
		"classname" "prop_dynamic"
	}
	replace:
	{
		"StartDisabled" "1"
	}
}
