$surfaceprop "flesh"

$bbox -13 -13 0  13 13 72

$poseparameter "move_yaw" -180 180 wrap

/* -- commented out -- doesn't work on cheaple skeleton
$ikchain rhand "valvebiped.Bip01_R_Hand" Z 0
$ikchain lhand "valvebiped.Bip01_L_Hand" Z 0
$ikchain rfoot "valvebiped.Bip01_R_Foot" Z 0
$ikchain lfoot "valvebiped.Bip01_L_Foot" Z 0
*/

/* -- commented out -- doesn't work on cheaple skeleton
$heirarchy "valvebiped.Bip01_L_Clavicle" "valvebiped.Bip01_Spine4" 
$heirarchy "valvebiped.Bip01_R_Clavicle" "valvebiped.Bip01_Spine4" 
$heirarchy "valvebiped.Bip01_L_Thigh" "valvebiped.Bip01_Pelvis" 
$heirarchy "valvebiped.Bip01_R_Thigh" "valvebiped.Bip01_Pelvis" 
*/

$alwayscollapse "ValveBiped.Male_cheaple_01"
$alwayscollapse "ValveBiped.Bip01_Pelvis"
$alwayscollapse "ValveBiped.Bip01_Spine1"
$alwayscollapse "ValveBiped.Bip01_Spine4"
$alwayscollapse "ValveBiped.Bip01_Neck1"
$alwayscollapse "ValveBiped.Bip01_L_Hand"
$alwayscollapse "ValveBiped.Bip01_R_Hand"

$weightlist upperbodyreplace "Valvebiped.bip01_spine" 1.0
$weightlist Lowerbodyreplace "valvebiped.bip01" 1.0 "valvebiped.bip01_spine" 0.0

$sequence idle_angry idle_subtle loop activity ACT_IDLE_ANGRY 1 node "standing"
$sequence idle_subtle idle_subtle loop activity ACT_IDLE 1 node "standing"
$sequence idle01 idle01 loop frames 0 358 fixuploop -15 0 activity ACT_IDLE 1 node "standing"
$sequence Idle02 Idle02 loop activity ACT_IDLE 1 node "standing"
$sequence Idle03 Idle03 loop activity ACT_IDLE 1 node "standing"

//$sequence Crouch_idle01 Crouchidle_01 fps 1 loop activity ACT_COVER_LOW 1 node "crouching"
$sequence Crouch_idleA1 Crouchidle_A fps 30 loop activity ACT_COVER_LOW -1 node "crouchingA"
$sequence Crouch_idleB1 CrouchIdle_B fps 30 loop activity ACT_COVER_LOW -1 node "crouchingB"
$sequence Crouch_idleC1 crouchidle_C1 fps 30 loop activity ACT_COVER_LOW -1 node "crouchingC"
$sequence Crouch_idleC2 crouchidle_C2 fps 30 loop activity ACT_COVER_LOW -1 node "crouchingC"
$sequence Crouch_idleC3 crouchidle_C3 fps 30 loop activity ACT_COVER_LOW -1 node "crouchingC"

$skiptransition "crouchingA" "crouchingB" "crouchingC"

//---------------------------------------------------------------


// all movement cycles begin right-foot-planted, left-foot-nearest-to-right


// walking, no weapon
$animation a_WalkS WalkS loop LX LY startloop 0 rotateto -180 {
	alignto idle01
	// ikrule lfoot footstep 0 range  5 11 25 30
	// ikrule rfoot footstep 1 range 22 28  6 11
}
$animation a_WalkSE WalkSE loop LX LY startloop 0 rotateto -135 {
	alignto idle01
	// ikrule lfoot footstep 0 range  5  8 22 27
	// ikrule rfoot footstep 1 range 20 25 6 11
}
$animation a_WalkE WalkE loop LX LY startloop 0 rotateto -90 {
	alignto idle01
	// ikrule lfoot footstep 0 range  2  9 19 28
	// ikrule rfoot footstep 1 range 19 24  4  8
}
$animation a_WalkNE WalkNE loop LX LY startloop 0 rotateto -45 {
	alignto idle01
	// ikrule lfoot footstep 0 range  4 11 23  0
	// ikrule rfoot footstep 1 range 18 25  8 13
}
$animation a_WalkN WalkN loop LX LY startloop 0 rotateto 0 {
	alignto idle01
	// ikrule lfoot footstep 0 range  4 10 19 25
	// ikrule rfoot footstep 1 range 18 26 3 10
}
$animation a_WalkNW WalkNW loop LX LY startloop 0 rotateto 45 {
	alignto idle01
	// ikrule lfoot footstep 0 range  2  9 21 27
	// ikrule rfoot footstep 1 range 18 25  7 13
}
$animation a_WalkW WalkW loop LX LY startloop 0 rotateto 90 {
	alignto idle01
	// ikrule lfoot footstep 0 range  2 11 22 28
	// ikrule rfoot footstep 1 range 18 27  6 13
}
$animation a_WalkSW WalkSW loop LX LY startloop 0 rotateto 135 {
	alignto idle01
	// ikrule lfoot footstep 0 range  2 10 18 25
	// ikrule rfoot footstep 1 range 16 22  7 12
}


// running, no weapon
$animation a_RunS RunS loop LX LY startloop 0 rotateto -180 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 9 12 ..
	// ikrule rfoot footstep 1 range .. 0 3 ..
}
$animation a_RunSE RunSE loop LX LY startloop 0 rotateto -135 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 7 11 ..
	// ikrule rfoot footstep 1 range .. 17 1 ..
}
$animation a_RunE RunE loop LX LY startloop 0 rotateto -90 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 7 9 ..
	// ikrule rfoot footstep 1 range .. 14 0 ..
}
$animation a_RunNE RunNE loop LX LY startloop 0 rotateto -45 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 6 10 ..
	// ikrule rfoot footstep 1 range .. 17 19 ..
}
$animation a_RunN RunN loop LX LY startloop 0 rotateto 0 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 8 10 ..
	// ikrule rfoot footstep 1 range .. 17 1 ..
}
$animation a_RunNW RunNW loop LX LY startloop 0 rotateto 45 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 9 11 ..
	// ikrule rfoot footstep 1 range .. 18 1 ..
}
$animation a_RunW RunW loop LX LY startloop 0 rotateto 90 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 7 9 ..
	// ikrule rfoot footstep 1 range .. 16 0 ..
}
$animation a_RunSW RunSW loop LX LY startloop 0 rotateto 135 {
	alignto idle01
	// ikrule lfoot footstep 0 range .. 8 11 ..
	// ikrule rfoot footstep 1 range .. 16 1 ..
}

// crouch walking, aiming smg1
$animation a_Crouch_walkS_aim Crouch_walkS_aim loop LX LY fps 30 startloop 21 rotateto -180
$animation a_Crouch_walkSE_aim Crouch_walkSE_aim loop LX LY fps 30 startloop 22 rotateto -135
$animation a_Crouch_walkE_aim Crouch_walkE_aim loop LX LY fps 30 startloop 20 rotateto -90
$animation a_Crouch_walkNE_aim Crouch_walkNE_aim loop LX LY fps 35 startloop 0 rotateto -45
$animation a_Crouch_walkN_aim Crouch_walkN_aim loop LX LY fps 35 startloop 0 rotateto 0
$animation a_Crouch_walkNW_aim Crouch_walkNW_aim loop LX LY fps 35 startloop 0 rotateto 45
$animation a_Crouch_walkW_aim Crouch_walkW_aim loop LX LY fps 30 startloop 20 rotateto 90
$animation a_Crouch_walkSW_aim Crouch_walkSW_aim loop LX LY fps 30 startloop 20 rotateto 135


// crouch run N, holding a SMG
$animation a_Crouch_runN_smg1 "WeaponAnims_Shared\Crouch_runN_smg1" loop LX LY fps 30 rotateto 0

$sequence layer_crouch_run_holding "WeaponAnims_Shared\Crouch_runN_smg1" weightlist upperbodyreplace hidden

// crouch walk, no weapon
$sequence layer_crouch_walk_no_weapon "Crouch_walkN" weightlist upperbodyreplace hidden

// crouch walk, holding an smg
$sequence layer_crouch_walk_holding "WeaponAnims_Shared\Crouch_walkN_smg1" weightlist upperbodyreplace hidden

// crouch run, no weapon
$sequence layer_crouch_run_no_weapon "Crouch_runN" weightlist upperbodyreplace hidden

// run N holding a SMG
$sequence layer_run_holding "WeaponAnims_Shared\RunN_SMG1" weightlist upperbodyreplace hidden



$sequence walk_all {
	a_walkS a_walkSE a_walkE a_walkNE a_walkN a_walkNW a_walkW a_walkSW a_walkS
	blendwidth 9 blend move_yaw -180 180 ACT_WALK 1 node "walking"
{ event 2051 9 }
{ event 2050 23 }
}


$sequence run_all {
	a_runS a_runSE a_runE a_runNE a_runN a_runNW a_runW a_runSW a_runS
	blendwidth 9 blend move_yaw -180 180 ACT_RUN 1 node "running"
}


$sequence Crouch_walk_all {
	a_Crouch_walkS_aim a_Crouch_walkSE_aim a_Crouch_walkE_aim 
	a_Crouch_walkNE_aim a_Crouch_walkN_aim a_Crouch_walkNW_aim 
	a_Crouch_walkW_aim a_Crouch_walkSW_aim a_Crouch_walkS_aim
	blendwidth 9 blend move_yaw -180 180 addlayer layer_Crouch_Walk_no_weapon ACT_WALK_CROUCH 1 node "walk_crouching"
}


$sequence Crouch_run_all {
	a_Crouch_walkS_aim a_Crouch_walkSE_aim a_Crouch_walkE_aim 
	a_Crouch_walkNW_aim a_Crouch_runN_smg1 a_Crouch_walkNE_aim
	a_Crouch_walkW_aim a_Crouch_walkSW_aim a_Crouch_walkS_aim
	blendwidth 9 blend move_yaw -180 180 addlayer layer_crouch_run_no_weapon ACT_RUN_CROUCH 1 node "run_crouching"
}


//---------------------------------------------------------------

/*
$sequence Stand_to_run Stand_to_run LX
$sequence Run_to_stand Run_to_stand {
	alignto a_RunN 
	// walkalign 23 idle_subtle LX LY LZR 0 36
}
$sequence Stand_to_walk Stand_to_walk {
	LX
	// transition "standing" "walking"
}
$sequence Walk_to_stand Walk_to_stand {
	alignto a_WalkN
	// walkalignto 24 idle_subtle LX LY LZR 0 35
	// transition "walking" "standing"
}

$sequence Stand_to_crouch Stand_to_crouch transition "standing" "crouchingB" ACT_TRANSITION 1
$sequence Crouch_to_stand Crouch_to_stand transition "crouchingB" "standing" ACT_TRANSITION 1
$sequence Crouch_to_run Crouch_to_run LX
$sequence Run_to_crouch Run_to_crouch LX

$skiptransition "running" "walking" "walk_crouching" "run_crouching"

*/

/*
$sequence stairs_up "Stairs_up" LX LZ ACT_CLIMB_UP 1
$sequence stairs_down "Stairs_down" LX LZ ACT_CLIMB_DOWN 1
$sequence ladder_up "Ladder_climb_up" LZ ACT_CLIMB_UP 1
$sequence ladder_down "Ladder_climb_down" LZ ACT_CLIMB_DOWN 1
$sequence shipladder_up "Borealis_stairs_up" LX LZ ACT_SHIPLADDER_UP 1
$sequence shipladder_down "Borealis_stairs_down" LX LZ ACT_SHIPLADDER_DOWN 1

$sequence Run_turn90_left Run_turn90_left
$sequence Run_turn90_right Run_turn90_right
*/

$sequence Startle_behind Startle_behind

/*
$sequence Runjump_start Runjump_start
$sequence Runjump_land Runjump_land
$sequence Jumpup_45 Jumpup_45
$sequence Jumpdown_45 Jumpdown_45
$sequence Run_jumpup_32 Run_jumpup_32
$sequence Run_jumpdown_32 Run_jumpdown_32
*/

$sequence Cover_R "WeaponAnims_Shared\Cover_R" fps 30 loop
$sequence Cover_L "WeaponAnims_Shared\Cover_L" fps 30 loop
$sequence CoverLow_R "WeaponAnims_Shared\CoverLow_R" fps 30 loop
$sequence CoverLow_L "WeaponAnims_Shared\CoverLow_L" fps 30 loop

$sequence ThrowItem "ThrowItem" fps 30 

$sequence DuckUnder "DuckUnder" fps 30 LX frames 0 62

$sequence spreadwallidle "Plaza_spreadwall_idle" fps 30 loop

$sequence crouchidlehide "crouchidle_hiding" fps 30 loop node "crouchhide"
$sequence standtocrouchhide "stand_to_crouchhide" fps 30 transition "standing" "crouchhide"
$sequence crouchhidetostand "crouchhide_to_stand" fps 30 transition "crouchhide" "standing"
$sequence scaredidle "Idle_scared" fps 30 loop node "standing"

$sequence preSkewer "preSkewer" fps 30 