; Make all teleport triggers (including zm tps and the spawn tp) reset gravity
modify:
{
	match:
	{
		"classname" "trigger_teleport"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,gravity 1,0.05,-1"
	}
}

; Add a 2nd, delayed output to reset gravity on the antigrav triggers, juuuuust to be sure
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"origin" "-1584 -9088 -13994.8"
	}
	insert:
	{
		"OnEndTouch" "!activator,AddOutput,gravity 1,0.05,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"origin" "-1024 -1536 5952"
	}
	insert:
	{
		"OnEndTouch" "!activator,AddOutput,gravity 1,0.05,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"origin" "1744 11392 -10508.3"
	}
	insert:
	{
		"OnEndTouch" "!activator,AddOutput,gravity 1,0.05,-1"
	}
}

; Disable bhop during the split area on stage 2
modify:
{
	match:
	{
		"origin" "512 -7840 5776"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "[CONSOLE],Command,sv_enablebunnyhopping 0,0,1"
	}
}
modify:
{
	match:
	{
		"origin" "2560 424 5872"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "[CONSOLE],Command,sv_enablebunnyhopping 1,30,1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_auto"
	}
	insert:
	{
		"OnStartTouch" "[CONSOLE],Command,sv_enablebunnyhopping 1,0,1"
	}
}

; Teleport the player to the book knife and very briefly freeze them so they actually pick it up
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK01_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin -11342.7 -12736 256,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK02_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin 7922 -14557 -1403,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK03_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin 11968 4600 3848,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK04_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin -5364 -9639 -4729,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK05_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin 5655 8477 -5511,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK06_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin 4309 2163 4940,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK07_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin 3416 6912 8032,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "[ITEM_BLOODLINES]BOOK08_STRIP"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,origin 3413 -13563 -11200,0,1"
		"OnStartTouch" "speed,ModifySpeed,0.01,0,1"
		"OnStartTouch" "speed,ModifySpeed,1,0.02,1"
		"OnStartTouch" "!self,Kill,,0,1"
	}
}

; Add small sprites to the knives because weapons can sometimes become invisible for whatever reason
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15688.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK01_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK01"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15656.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK02_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK02"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15624.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK03_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK03"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15592.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK04_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK04"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15560.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK05_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK05"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15528.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK06_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK06"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15496.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK07_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK07"
}
add:
{
	"rendercolor" "255 255 255"
	"fademindist" "-1"
	"mingpulevel" "0"
	"disableX360" "0"
	"scale" "0.5"
	"maxgpulevel" "0"
	"GlowProxySize" "2.0"
	"fademaxdist" "0"
	"spawnflags" "1"
	"maxcpulevel" "0"
	"rendermode" "9"
	"model" "sprites/glow01.spr"
	"classname" "env_sprite"
	"HDRColorScale" "1.0"
	"framerate" "10.0"
	"fadescale" "1"
	"renderfx" "0"
	"mincpulevel" "0"
	"renderamt" "255"
	"disablereceiveshadows" "0"
	"origin" "-6160 15464.1 11732"
	"parentname" "[ITEM_BLOODLINES]BOOK08_STRIP"
	"targetname" "[ITEM_BLOODLINES]BOOK08"
}
