;--------------------------------
; fix basic out of bounds issues
;--------------------------------

add:
{
	"model" "*31"
	"angles" "0 300 0"
	"pushdir" "0 90 0"
	"StartDisabled" "0"
	"spawnflags" "1"
	"speed" "250"
	"origin" "-1447.5 -187 196.59"
	"classname" "trigger_push"
}

modify:
{
	match:
	{
		"targetname" "raptor1mover"
		"classname" "func_tracktrain"
	}
	replace:
	{
		"spawnflags" "522"
	}
}
modify:
{
	match:
	{
		"targetname" "raptor2mover"
		"classname" "func_tracktrain"
	}
	replace:
	{
		"spawnflags" "522"
	}
}


;----------------------------------------
; safe teleport at the bottom of the map
;----------------------------------------


add:
{
	"classname" "info_teleport_destination"
	"targetname" "ADestAtSpawn"
	"angles" "0 90 0"
	"origin" "-136 64 192"
}

add:
{
	"targetname" "ATeleportAtTheBottom"
	"target" "ADestAtSpawn"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "2288 6112 -2016"
	"classname" "trigger_teleport"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -5552 -7552 -96,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 5552 7552 96,0.1,1"
}

modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "684"
	}
	insert:
	{
		"OnMapSpawn" "ATeleportAtTheBottom,FireUser1,,1,1"
	}
}


;-------------
; other fixes
;-------------

modify:
{
	match:
	{
		"targetname" "helicopter"
	}
	replace:
	{
		"spawnflags" "515"
	}
}

modify:
{
	match:
	{
		"targetname" "dinotransportercar"
	}
	replace:
	{
		"spawnflags" "515"
	}
}

modify:
{
	match:
	{
		"targetname" "dinocarpath1"
	}
	replace:
	{
		"speed" "0"
	}
}

modify:
{
	match:
	{
		"targetname" "helipath1"
	}
	replace:
	{
		"speed" "0"
	}
}

modify:
{
	match:
	{
		"targetname" "helipath3"
	}
	replace:
	{
		"speed" "0"
	}
	insert:
	{
		"OnPass" "helicopter,SetSpeed,0,0,1"
		"OnPass" "helicopter,SetSpeed,150,5,1"
	}
}

modify:
{
	match:
	{
		"targetname" "phonebutton"
	}
	delete:
	{
		"OnPressed" "helicopter,SetSpeed,0,140,1"
		"OnPressed" "helicopter,SetSpeed,150,145,1"
	}
	insert:
	{
		"OnPressed" "tp_spawn,Enable,,65,1"
		"OnPressed" "callmainland,Command,say ***SPAWN TELEPORT ENABLED***,66,1"
	}
}

add:
{
	"model" "*3"
	"classname" "trigger_teleport"
	"spawnflags" "1"
	"startdisabled" "1"
	"target" "td_gate"
	"targetname" "tp_spawn"
}

add:
{
	"classname" "info_teleport_destination"
	"targetname" "td_gate"
	"angles" "0 180 0"
	"origin" "3632 8896 -912"
}

modify:
{
	match:
	{
		"targetname" "endgamekiller"
	}
	replace:
	{
		"damage" "50000"
	}
}