;------------------------------------------------------------
; Prevents people from delaying on the final surf platform
;------------------------------------------------------------
filter:
{
    "origin" "3072 6576 484"
    "classname" "trigger_teleport"
}
filter:
{
    "origin" "4760 -2352 2267"
    "classname" "trigger_teleport"
}
add:
{
    "model" "*36"
    "targetname" "surf_1_end_teleporter"
    "target" "@target_2"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "3572 7076 1017"
    "classname" "trigger_teleport"
}
add:
{
    "model" "*36"
    "targetname" "surf_2_end_teleporter"
    "target" "@target_4"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "5256 -1856 2829"
    "classname" "trigger_teleport"
}

;------------------------------------------------------------
; Enables the human safe teleports a bit earlier
;------------------------------------------------------------
modify:
{
	match:
	{
		"origin" "-3971 11952 943"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "@tp_save_1,Enable,,28,1"
	}
	insert:
	{
		"OnStartTouch" "@tp_save_1,Enable,,20,1"
	}
}
modify:
{
	match:
	{
		"origin" "-136 10574 943"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "@tp_save_2,Enable,,28,1"
	}
	insert:
	{
		"OnStartTouch" "@tp_save_2,Enable,,20,1"
	}
}

;------------------------------------------------------------
; Fixes so the safe tp actually works as intended
;------------------------------------------------------------
modify:
{
	match:
	{
		"targetname" "@tp_save_1"
		"origin" "0 4344.5 1396"
		"classname" "trigger_teleport"
	}
	insert:
	{
		"filtername" "Human"
	}
}
filter:
{
	"targetname" "@tp_all_4"
	"origin" "0 -3816 2650"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*65"
	"targetname" "@tp_all_4"
	"target" "@target_4"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "0 -3816 2653"
	"classname" "trigger_teleport"
}
modify:
{
	match:
	{
		"targetname" "@tp_save_2"
		"origin" "0 -3816 2653"
		"classname" "trigger_teleport"
	}
	insert:
	{
		"filtername" "Human"
	}
}