
$modelname "weapons\v_tablet.mdl"

$bodygroup "studio"
{
	studio "v_tablet_ref.smd"
}
$bodygroup "studio"
{
	studio "v_tablet_upgrade_cards.smd"
}
$bodygroup "studio"
{
	studio "v_tablet_model.smd"
}


$surfaceprop "default"

$contents "solid"

$illumposition 2.051 -4.783 -48.476

$opaque

$cdmaterials "models\weapons\v_models\tablet\"

$texturegroup "skinfamilies"
{
	{ "tablet_blank"      }
	{ "tablet_screen"     }
	{ "tablet_menuscreen" }
}

$attachment "screen_ul" "tablet" 3.7 0.15 2.7 rotate 0 0 0
$attachment "screen_ll" "tablet" 3.7 0.15 -2.6 rotate 0 0 0
$attachment "screen_lr" "tablet" -3.7 0.15 -2.6 rotate 0 0 0

$cbox 0 0 0 0 0 0

$bbox -10.35 -7.707 -100.919 19.915 11.808 3.967

$definebone "v_weapon.Bip01_R_Clavicle" "" -0.534759 10.349899 -5.830542 2.430408 -158.599863 155.957139 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_UpperArm" "v_weapon.Bip01_R_Clavicle" 5.773742 0 0.000001 -6.535269 -68.040398 67.674799 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Forearm" "v_weapon.Bip01_R_UpperArm" 11.576889 -0.000004 0 -0.000001 -31.193368 -0.000007 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Hand" "v_weapon.Bip01_R_Forearm" 10.29559 0.000009 0.000004 13.463651 11.287381 84.809326 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger0" "v_weapon.Bip01_R_Hand" 1.231172 0.348998 1.249108 -42.827677 20.51121 -93.221141 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger01" "v_weapon.Bip01_R_Finger0" 1.611106 0.000002 0.000002 2.377367 -17.035752 2.952449 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger02" "v_weapon.Bip01_R_Finger01" 1.188946 0.000004 0 -0.217047 -4.579589 -0.336215 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger1" "v_weapon.Bip01_R_Hand" 4.068602 0.143197 0.892416 6.078908 63.62548 9.179531 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger11" "v_weapon.Bip01_R_Finger1" 1.43346 0.000001 0.000001 -4.169189 83.83254 1.367935 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger12" "v_weapon.Bip01_R_Finger11" 1.019162 0.000002 0.000001 -1.147231 68.692026 2.580597 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger2" "v_weapon.Bip01_R_Hand" 3.939289 0.020629 -0.014987 5.55728 66.618551 12.195638 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger21" "v_weapon.Bip01_R_Finger2" 1.691288 0.000002 0.000001 -3.481696 87.537126 1.60903 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger22" "v_weapon.Bip01_R_Finger21" 1.039843 0 0 -0.028926 60.164398 -2.549323 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger3" "v_weapon.Bip01_R_Hand" 3.582012 0.056836 -0.735423 9.677423 65.213602 21.906128 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger31" "v_weapon.Bip01_R_Finger3" 1.583914 -0.000002 0 -4.208778 90.360651 2.689286 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger32" "v_weapon.Bip01_R_Finger31" 1.0067 -0.000001 -0.000001 7.803742 65.021831 1.209964 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger4" "v_weapon.Bip01_R_Hand" 3.12653 0.227897 -1.440077 6.291414 69.36663 26.145845 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger41" "v_weapon.Bip01_R_Finger4" 1.246396 0 0.000001 -2.132892 90.829099 2.676795 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_Finger42" "v_weapon.Bip01_R_Finger41" 0.682894 0.000003 0.000001 4.639248 66.086794 -2.04506 0 0 0 0 0 0
$definebone "tablet" "v_weapon.Bip01_R_Hand" 3.404242 5.811242 2.592096 -4.037126 87.253051 27.535495 0 0 0 0 0 0
$definebone "v_weapon.Bip01_R_ForeTwist" "v_weapon.Bip01_R_UpperArm" 11.576891 -0.000005 0 -0.000001 -31.193368 25.593962 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Clavicle" "" 1.764202 9.567228 -5.775309 7.274043 -49.962093 28.221493 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_UpperArm" "v_weapon.Bip01_L_Clavicle" 5.773742 -0.000001 0 27.76376 -13.026136 -50.369463 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Forearm" "v_weapon.Bip01_L_UpperArm" 11.576881 -0.00001 0.000005 -0.000001 -63.384887 -0.000002 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Hand" "v_weapon.Bip01_L_Forearm" 10.295586 0.00001 -0.000009 -8.458978 10.036213 -136.381831 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger0" "v_weapon.Bip01_L_Hand" 1.231168 0.348994 -1.249104 33.024303 19.620823 94.34289 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger01" "v_weapon.Bip01_L_Finger0" 1.611105 0.000002 0 0.000002 3.825015 -0.000001 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger02" "v_weapon.Bip01_L_Finger01" 1.188941 0.000002 -0.000002 0.037416 8.20058 -0.660163 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger1" "v_weapon.Bip01_L_Hand" 4.290793 0.112068 -0.897963 12.481081 21.570947 -0.35506 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger11" "v_weapon.Bip01_L_Finger1" 1.433458 0.000002 0.000002 0.100895 13.527077 -0.477903 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger12" "v_weapon.Bip01_L_Finger11" 1.019162 0 0.000004 -1.514502 7.825228 -0.849581 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger2" "v_weapon.Bip01_L_Hand" 4.264512 0.004029 0.013417 2.991298 23.85871 -5.295274 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger21" "v_weapon.Bip01_L_Finger2" 1.691286 0.000005 0 0.227979 14.829698 -0.689896 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger22" "v_weapon.Bip01_L_Finger21" 1.039841 -0.000002 0.000001 -1.622618 10.988129 -0.424158 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger3" "v_weapon.Bip01_L_Hand" 3.582013 0.056835 0.735427 1.662209 22.360655 -9.787836 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger31" "v_weapon.Bip01_L_Finger3" 1.583914 -0.000002 0 -0.512282 28.151363 -1.145225 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger32" "v_weapon.Bip01_L_Finger31" 1.006699 0.000004 0.000001 -1.137952 3.07815 0.53417 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger4" "v_weapon.Bip01_L_Hand" 3.12653 0.227898 1.440083 1.442994 29.714106 -12.811221 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger41" "v_weapon.Bip01_L_Finger4" 1.246394 0 0.000001 0.010083 5.107686 -0.468445 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_Finger42" "v_weapon.Bip01_L_Finger41" 0.682896 -0.000004 -0.000001 -2.482224 9.328493 -1.046847 0 0 0 0 0 0
$definebone "v_weapon.Bip01_L_ForeTwist" "v_weapon.Bip01_L_UpperArm" 11.576881 -0.00001 0.000005 0.000056 -63.384832 -49.159379 0 0 0 0 0 0
$definebone "upgrade_card_hires" "" 0 0 0 0 0 0 0 0 0 0 0 0
$definebone "upgrade_card_zone" "" -2 0 0 0 0 0 0 0 0 0 0 0
$definebone "upgrade_card_drone" "" -4 0 0 0 0 0 0 0 0 0 0 0

$bonemerge "v_weapon.Bip01_R_Clavicle"
$bonemerge "v_weapon.Bip01_R_UpperArm"
$bonemerge "v_weapon.Bip01_R_Forearm"
$bonemerge "v_weapon.Bip01_R_Hand"
$bonemerge "v_weapon.Bip01_R_Finger0"
$bonemerge "v_weapon.Bip01_R_Finger01"
$bonemerge "v_weapon.Bip01_R_Finger02"
$bonemerge "v_weapon.Bip01_R_Finger1"
$bonemerge "v_weapon.Bip01_R_Finger11"
$bonemerge "v_weapon.Bip01_R_Finger12"
$bonemerge "v_weapon.Bip01_R_Finger2"
$bonemerge "v_weapon.Bip01_R_Finger21"
$bonemerge "v_weapon.Bip01_R_Finger22"
$bonemerge "v_weapon.Bip01_R_Finger3"
$bonemerge "v_weapon.Bip01_R_Finger31"
$bonemerge "v_weapon.Bip01_R_Finger32"
$bonemerge "v_weapon.Bip01_R_Finger4"
$bonemerge "v_weapon.Bip01_R_Finger41"
$bonemerge "v_weapon.Bip01_R_Finger42"
$bonemerge "v_weapon.Bip01_R_ForeTwist"
$bonemerge "v_weapon.Bip01_L_Clavicle"
$bonemerge "v_weapon.Bip01_L_UpperArm"
$bonemerge "v_weapon.Bip01_L_Forearm"
$bonemerge "v_weapon.Bip01_L_Hand"
$bonemerge "v_weapon.Bip01_L_Finger0"
$bonemerge "v_weapon.Bip01_L_Finger01"
$bonemerge "v_weapon.Bip01_L_Finger02"
$bonemerge "v_weapon.Bip01_L_Finger1"
$bonemerge "v_weapon.Bip01_L_Finger11"
$bonemerge "v_weapon.Bip01_L_Finger12"
$bonemerge "v_weapon.Bip01_L_Finger2"
$bonemerge "v_weapon.Bip01_L_Finger21"
$bonemerge "v_weapon.Bip01_L_Finger22"
$bonemerge "v_weapon.Bip01_L_Finger3"
$bonemerge "v_weapon.Bip01_L_Finger31"
$bonemerge "v_weapon.Bip01_L_Finger32"
$bonemerge "v_weapon.Bip01_L_Finger4"
$bonemerge "v_weapon.Bip01_L_Finger41"
$bonemerge "v_weapon.Bip01_L_Finger42"
$bonemerge "v_weapon.Bip01_L_ForeTwist"


// The 32 below is a guess until further is known about the format.
$animblocksize 32 nostall

$bonesaveframe "v_weapon.Bip01_R_Clavicle" position
$bonesaveframe "v_weapon.Bip01_L_Clavicle" position
$bonesaveframe "upgrade_card_hires" position
$bonesaveframe "upgrade_card_zone" position
$bonesaveframe "upgrade_card_drone" position

$sectionframes 30 54

$poseparameter "closer" 0 1 loop 0

$animation "a_idle_zero" "v_tablet_anims\a_idle_zero.smd" {
	fps 30
}

$sequence "deploy" {
	"v_tablet_anims\deploy.smd"
	activity "ACT_VM_DRAW" 1
	{ event 5004 0 "Survival.TabletDraw" }
	{ event 5004 1 "Weapon.WeaponMove3" }
	fadein 0.2
	fadeout 0.2
	blendlayer "s_closer" 0 0 1 0 poseparameter closer
	snap
	fps 30
}

$sequence "s_closer" {
	"v_tablet_anims\s_closer.smd"
	delta
	// This subtract option added by Crowbar to prevent jigglebone problems when delta sequences are recompiled.
	subtract "s_closer" 0
	fadein 0.2
	fadeout 0.2
	hidden
	fps 30
	loop
}

$sequence "idle" {
	"v_tablet_anims\idle.smd"
	activity "ACT_VM_IDLE" 1
	fadein 0.2
	fadeout 0.2
	blendlayer "s_closer" 0 0 1 0 poseparameter closer
	snap
	fps 30
	loop
}

$sequence "upgrade_highres" {
	"v_tablet_anims\upgrade_highres.smd"
	activity "ACT_VM_RECOIL1" 1
	{ event 5004 1 "Weapon.WeaponMove1" }
	{ event 5004 18 "Survival.TabletUpgradeSuccess" }
	{ event 5004 47 "Weapon.WeaponMove3" }
	fadein 0.1
	fadeout 0.1
	fps 30
}

$sequence "upgrade_drone" {
	"v_tablet_anims\upgrade_drone.smd"
	activity "ACT_VM_RECOIL2" 1
	{ event 5004 1 "Weapon.WeaponMove1" }
	{ event 5004 18 "Survival.TabletUpgradeSuccess" }
	{ event 5004 47 "Weapon.WeaponMove3" }
	fadein 0.1
	fadeout 0.1
	fps 30
}

$sequence "upgrade_zone" {
	"v_tablet_anims\upgrade_zone.smd"
	activity "ACT_VM_RECOIL3" 1
	{ event 5004 1 "Weapon.WeaponMove1" }
	{ event 5004 18 "Survival.TabletUpgradeSuccess" }
	{ event 5004 47 "Weapon.WeaponMove3" }
	fadein 0.1
	fadeout 0.1
	fps 30
}

$KeyValues
{
	qc_path 
	{
		"value" "models\weapons\v_models\tablet\v_tablet.qc"
	}
}
