;SDL
human

{extender "vitality"
	{Energy
		{Load 		20 	40           100 } ; equipment weight, kg
		{Update
			{stay	+15		+10		+9		+5}	; fatigue per second
			{walk 	+10		+5		0		-10}	; max.fatigue = 100
			{slow  	+10		+5		0		-10} 
			{normal	+2.5 	+1		0  		-20}
			{fast 	-5  	-10 	-20		-40}
		}
		{movement_limits
			{Fast  	    1 25}
			{Normal     0  0}
			{Slow  	   -1 -1}
		}
	}
}


{extender "inventory"
	{box
		{Size 6 8}
		{Weight 100}
	}
	{hand_left}
	{hand_right}
	{armor "head"
		{mask "head"}
		{bone "head"}
		{volumes "head"}
		{pierceAbsorb 30}
	}
	{armor "body"
		{mask "body"}
		{volumes "body" "foot1l" "foot1r" "foot2l" "foot2r"}
		{bone "IK_UpDown"}
		{pierceAbsorb 32}
		{HeatDamping 0.6}
	}
}

{extender "stuff"
	{item "human"}
}

{Sensor
	{Visor "eyes"
		{vision "human"}
		{bone "visor"}
	}
	{Visor "telescope"}
	{AttackZone 2.5}
	{RecognizeTime 0.25}
	{InformRange 40}
}

{Chassis "foot"			  
	;  speed S (km/h) animation A (km/h) rotation (degree/s)
	;  animation speed = movement speed / A * animation scale 
	{Crawl           
		{Slow		4   5  100 }
		{Normal		5   5  200 }
		{Fast		7   5  200 }
	}                     
	{Swim                 
		{Slow		2   5  200 }
		{Normal		3   5  200 }
		{Fast		5   5  200 }
	}                     
	{Run                  
		{Sneak		5	2  	200 }   ; x 0.85
		{Spot 		6  	2  	200 }   ; x 0.5
		{Walk 		8   2 	200 }   ; x 0.5
		{Slow		8  	7	400 }   ; x 1
		{Normal	        15      7  	400 }   ; x 0.55
		{Fast	        25      7  	400 }   ; x 0.33
		{Bow   	        18.5    7  	400 }   ; x 0.55
	}

	{Strafe
		; 			m  m+v  km/h  speed	animation up 					animation down					; m+v = mask + value for strafe counter
		{Forth		3  2 0	6.5   3		"walk_spot_gun_up_1"		  "walk_spot_gun_down_1"}			; 6.5 km/h move 2 km/h animation 0.37 scale --> in Run
		{Forth		3  2 1	11.0  1 	"run_spot_gun_up" 			  "run_spot_gun_down"}    		  	
		{Forth		8  0 0	13.2  1.2	"run_spot_gun_up" 			  "run_spot_gun_down"}				
		{Left		4  0 0	10.5  1.22	"run_spot_back-strafe_gun_up" "run_spot_back-strafe_gun_down"}	
		{Right		8  0 0	13.0  1.1	"run_spot_left-strafe_gun_up" "run_spot_left-strafe_gun_down"}	
		{Back		8  0 0	10.5  1.22	"run_back_spot_gun_up" 		  "run_back_spot_gun_down"}			
	}
}

{volume "body"
	{thickness 2}
        {able clear {blast}}
}
{volume "head"
	{thickness 1.5}
}
{volume "foot1r"
	{thickness 2.5}
	{able {nolook 1}}
}
{volume "foot2r"
	{thickness 2.5}
	{able {nolook 1}}
}
{volume "foot1l"
	{thickness 2.5}
	{able {nolook 1}}
}
{volume "foot2l"
	{thickness 2.5}
	{able {nolook 1}}
}

{extension "human_fsm.ext"}

{mass 70}
{obstacleID "human"}
{PatherID	"human"}
{collider   "human"}

{simulation {able 1} {state 0}}
{simulatorId "human"}
;{simulatorId "particle_system"}

{able "crew" "fight" "minimap"}
{props "flesh" "nocover" "collectable" "spread_items"}
{targetClass 	"human"}
{targetSelector "human"}

;(include "shadow/human.inc")

{brain "human"
	{const "bomb/detect_boom" 		2}
	{const "bomb/danger_zone" 		7}
	{const "fight/distance"			1.5}
}

(define "accuracy_by_motion" ;  spreading depending on the speed of "body", "gun" volumes
	{AccuracyByMotion
        {MaxLinearSpeed %max_linear}               ;km/h
        {ByLinearSpeed %accuracy_by_linear}
        {MaxAngularSpeed %max_angular}             ;deg/s
        {ByAngularSpeed %accuracy_by_angular}
        {DisorderTime %disorder_time}              ;s
        {OrderTime %order_time}                    ;s
    }
)

{Weaponry
	{place "hand_right"
		{Rotate}
		{SequentialAim 0}
		{LinkBone "right_hand"}
		{LinkAnimation "on"}
		("accuracy_by_motion"
			max_linear(10.00) accuracy_by_linear(0.75)
			max_angular(15.00) accuracy_by_angular(0.80)
			disorder_time(0.50) order_time(0.50)
		)
	}
	{ManualAccuracy 1.5}
}

{extender "talk"
	{talker "human"}
}

{lodclass "human"}