;-----------
; Disable bhop in certain parts
;-----------

modify:
{
    match:
    {
        "targetname" "1_ready_relay"
    }
    insert:
    {
        "OnTrigger" "server,Command,sv_enablebunnyhopping 0,0,-1"
    }
}
 
modify:
{
    match:
    {
        "targetname" "2_ready_relay"
    }
    insert:
    {
        "OnTrigger" "server,Command,sv_enablebunnyhopping 1,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "2_boss_earthquake_relay"
    }
    insert:
    {
        "OnTrigger" "server,Command,sv_enablebunnyhopping 0,32,-1"
    }
}
 
modify:
{
    match:
    {
        "targetname" "3_ready_relay"
    }
    insert:
    {
        "OnTrigger" "server,Command,sv_enablebunnyhopping 1,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "3_room1_lastdoor"
    }
    insert:
    {
        "OnFullyOpen" "server,Command,sv_enablebunnyhopping 0,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "3_room2_lastdoor"
    }
    insert:
    {
        "OnFullyOpen" "server,Command,sv_enablebunnyhopping 1,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "3_room5_lift"
    }
    insert:
    {
        "OnFullyOpen" "server,Command,sv_enablebunnyhopping 0,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "3_bosslift"
    }
    insert:
    {
        "OnFullyOpen" "server,Command,sv_enablebunnyhopping 1,0,-1"
    }
}
 
modify:
{
    match:
    {
        "targetname" "4_ready_relay"
    }
    insert:
    {
        "OnTrigger" "server,Command,sv_enablebunnyhopping 1,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "5_ready_relay"
    }
    insert:
    {
        "OnTrigger" "server,Command,sv_enablebunnyhopping 1,0,-1"
    }
}

; Players' classnames are changed when they pick up items, make sure that's reset when they die
; Because specs are NOT immune from the map cleanup upon round change and so they end up getting killed
; Alive players automatically reset their classname on a new round
add:
{
	"model" "*278"
	"targetname" "game_playerdie"
	"classname" "trigger_brush"
	"OnUse" "!activator,AddOutput,classname player,0,-1"
}

; Add missing lava triggers on stage 5
add:
{
	"model" "*123"
	"target" "des2"
	"StartDisabled" "0"
	"spawnflags" "4097"
	"origin" "-9561 -8217.5 -12679"
	"filtername" "zombie"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*123"
	"origin" "-9561 -8217.5 -12679"
	"spawnflags" "4097"
	"nodmgforce" "0"
	"filtername" "human"
	"damagetype" "16384"
	"damagemodel" "0"
	"damagecap" "10000"
	"damage" "1000"
	"classname" "trigger_hurt"
}



;; _

;; fix playerequip

modify:
{
	match:
	{
		"origin" "-168 152 -2144"
		"targetname" "item_equip"
		"classname" "game_player_equip"
		"hammerid" "2174209"
	}
	replace:
	{
		"spawnflags" "1"
	}
}

;; stage 1 - fix shortcut

add:
{
	"model" "*86"
	"spawnobject" "0"
	"spawnflags" "1"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"propdata" "0"
	"pressuredelay" "0"
	"physdamagescale" "1.0"
	"PerformanceMode" "0"
	"origin" "2307 3859 -12370"
	"nodamageforces" "0"
	"minhealthdmg" "0"
	"material" "10"
	"health" "1"
	"gibdir" "0 0 0"
	"explosion" "0"
	"ExplodeRadius" "0"
	"explodemagnitude" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"classname" "func_breakable"
}
