;--------------------------------------------------------------------------------------------------------------------------
; Fixes the way you are looking when teleporting to the stage 1 level so you will always face the ramp and not sideways
;--------------------------------------------------------------------------------------------------------------------------
modify:
{
	match:
	{
        "origin" "-384 736 88"
        "targetname" "stage1_dest_spawn1_4"
        "classname" "point_teleport"
	}
	replace:
	{
        "angles" "0 315 0"
	}
}
modify:
{
	match:
	{
        "origin" "1248 672 88"
        "targetname" "stage1_dest_spawn1_2"
        "classname" "point_teleport"
	}
	replace:
	{
        "angles" "0 225 0"
	}
}
modify:
{
	match:
	{
        "origin" "1232 -784 88"
        "targetname" "stage1_dest_spawn1_3"
        "classname" "point_teleport"
	}
	replace:
	{
        "angles" "0 135 0"
	}
}
modify:
{
	match:
	{
        "origin" "-384 -832 88"
        "targetname" "stage1_dest_spawn1_1"
        "classname" "point_teleport"
	}
	replace:
	{
        "angles" "0 45 0"
	}
}

;-------------------------
; once_score fixed
;-------------------------
modify:
{
	match:
	{
		"origin" "-2720 -2080 4832"
        "targetname" "end1_once_score_mg"
        "classname" "trigger_once"
	}
	replace:
	{
       "OnStartTouch" "end1_score_mg,ApplyScore,,0,-1"
	}
}

modify:
{
	match:
	{
		"origin" "-2720 -2576 5600"
        "targetname" "end1_once_score_skillissue"
        "classname" "trigger_once"
	}
	replace:
	{
       "OnStartTouch" "end1_score_skill_issue,ApplyScore,,0,-1"
	}
}

;-------------------------
; Add win message at end
;-------------------------
modify:
{
	match:
	{
        "targetname" "end1_once_win"
        "origin" "-2720 -2080 4816"
        "classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "cmd,Command,say *** GOOD JOB ***,0,1"
	}
}

;---------------------------------------------------------------------------------------------------------------------
; Fixes room 5 not being so hard. There is a trigger_push that now enables when the wall breaks for a few seconds
;---------------------------------------------------------------------------------------------------------------------
add:
{
    "model" "*101"
    "targetname" "s1_trigger_push_wall1"
    "StartDisabled" "1"
    "speed" "1200"
    "spawnflags" "1"
    "filtername" "filter_zombies"
    "pushdir" "0 270 0"
    "origin" "6688 2408 224"
    "alternateticksfix" "0"
    "classname" "trigger_push"
}
modify:
{
    match:
    {
        "targetname" "s1_once_break_wall1"
        "origin" "6688 2408 224"
        "classname" "trigger_once"
    }
    insert:
    {
        "OnStartTouch" "s1_trigger_push_wall1,Enable,,20,1"
        "OnStartTouch" "s1_trigger_push_wall1,Disable,,24,1"
    }
}
add:
{
    "model" "*25"
    "targetname" "s1_trigger_push_wall2"
    "StartDisabled" "1"
    "speed" "1200"
    "spawnflags" "1"
    "filtername" "filter_zombies"
    "pushdir" "0 270 0"
    "origin" "6688 3240 224"
    "alternateticksfix" "0"
    "classname" "trigger_push"
}
modify:
{
    match:
    {
        "targetname" "s1_once_break_wall2"
        "origin" "6688 3240 224"
        "classname" "trigger_once"
    }
    insert:
    {
        "OnStartTouch" "s1_trigger_push_wall2,Enable,,15,1"
        "OnStartTouch" "s1_trigger_push_wall2,Disable,,19,1"
    }
}

;--------------------------------------------------
; Fixes zombies health being too low for zombies
;--------------------------------------------------
modify:
{
    match:
    {
        "origin" "-1944 152 136"
        "classname" "logic_auto"
    }
    insert:
    {
        "OnMapSpawn" "cmd,Command,zr_class_modify zombies health 10000,0,-1"
    }
}