add:
{
	"origin" "6803 1888 -10742"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "6"
	"startvalue" "1"
	"classname" "math_counter"
}

modify:
{
	match:
	{
		"targetname" "1_ready_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "2_ready_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "3_ready_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "4_ready_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,4,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "5_ready_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,5,0,1"
	}
}

;-----------
; MAP FIXES
;-----------

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"
		"OnTrigger" "level4_dynamic_trigger,AddOutput,solid 2,0,-1"
		"OnTrigger" "level4_dynamic_trigger,AddOutput,mins -696 -600 -2,0.1,-1"
		"OnTrigger" "level4_dynamic_trigger,AddOutput,maxs 696 600 2,0.1,-1"
		"OnTrigger" "level4_dynamic_trigger,Enable,,0.2,-1"
    }
}

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

add:
{
	"classname" "trigger_multiple"
	"origin" "6803 1888 -10742"
	"spawnflags" "1"
	"targetname" "level4_dynamic_trigger"
	"wait" "0"
	"StartDisabled" "1"
	"OnStartTouch" "!activator,AddOutput,gravity 40,0.2,-1"
	"OnStartTouch" "!activator,AddOutput,gravity 1,0.3,-1"
}


;----------------------------
; FIX THE SHORTCUT ON STAGE4
;----------------------------

add:
{
	"classname" "prop_dynamic"
	"targetname" "prop_rightside"
	"origin" "4700 -4545 -9215"
	"angles" "90 90 90"
	"model" "models/airmodel/ze_rizomata/4_pillar.mdl"
	"solid" "6"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"rendermode" "10"
}

add:
{
	"classname" "prop_dynamic"
	"targetname" "prop_gate"
	"origin" "5300 -4545 -9000"
	"angles" "90 90 90"
	"model" "models/airmodel/ze_rizomata/4_pillar.mdl"
	"solid" "6"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"rendermode" "10"
}

add:
{
	"classname" "prop_dynamic"
	"targetname" "prop_leftside"
	"origin" "7200 -4545 -9000"
	"angles" "90 90 90"
	"model" "models/airmodel/ze_rizomata/4_pillar.mdl"
	"solid" "6"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"rendermode" "10"
}

;---------------------------------------------------------------------------------------------------------------------------------
; lower some tp heights to prevent a surf for zombies to get ahead during lvl 5 boss fight ascension phase (taken from gfl csgo)
;---------------------------------------------------------------------------------------------------------------------------------

modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "5_boss_enragetele_case1"
	}
	delete:
	{
		"OnCase01" "!activator,AddOutput,origin -6854 -4174 -4251,0,-1"
		"OnCase02" "!activator,AddOutput,origin -6854 1598 -4251,0,-1"
		"OnCase03" "!activator,AddOutput,origin -1082 -4174 -4251,0,-1"
		"OnCase04" "!activator,AddOutput,origin -1082 1598 -4251,0,-1"
	}
	insert:
	{
		"OnCase01" "!activator,AddOutput,origin -6854 -4174 -5901,0,-1"
		"OnCase02" "!activator,AddOutput,origin -6854 1598 -5901,0,-1"
		"OnCase03" "!activator,AddOutput,origin -1082 -4174 -5901,0,-1"
		"OnCase04" "!activator,AddOutput,origin -1082 1598 -5901,0,-1"
	}
}

;------------------------------------------------------------------
; Remove the admin room teleports (we can use !adminroom anyway)
;------------------------------------------------------------------

filter:
{
	"classname" "trigger_multiple"
	"OnStartTouch" "!activator,AddOutput,origin 0 0 -2056,0,-1"
}


;-----------------------------------
; Cant use zombie items during boss
;-----------------------------------


; Boss start
modify:
{
	match:
	{
		"targetname" "3_bosslift"
		"classname" "func_door"
		"hammerid" "2349298"
	}
	insert:
	{
		"OnFullyOpen" "ZOMBIE_ITEMS_DISABLE_USAGE,Trigger,,0,1"
	}
}

; Boss End
modify:
{
	match:
	{
		"targetname" "3_boss_hpmasscounter"
		"classname" "math_counter"
	}
	insert:
	{
		"OnHitMax" "ZOMBIE_ITEMS_ENABLE_USAGE,Trigger,,0,1"
	}
}

; Items edit

add:
{
	"origin" "-4704 11824 -5167"
	"targetname" "ZOMBIE_ITEMS_DISABLE_USAGE"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "haste_trigger_relay,Disable,,0,-1"
	"OnTrigger" "death_trigger_relay,Disable,,0,-1"
	"OnTrigger" "curse_trigger_relay,Disable,,0,-1"
}
add:
{
	"origin" "-4704 11824 -5167"
	"targetname" "ZOMBIE_ITEMS_ENABLE_USAGE"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "haste_trigger_relay,Enable,,0,-1"
	"OnTrigger" "death_trigger_relay,Enable,,0,-1"
	"OnTrigger" "curse_trigger_relay,Enable,,0,-1"
}

;
; +++++++++++++++++++prevent players from getting big boost on STAGE 4 first ramp+++++++++++++++++++
;
modify:
{
	match:
	{
		"targetname" "4_boost_1"
		"classname" "trigger_push"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,absvelocity 0 0 0,0,-1"
	}
}
