I have made a little tool which "cleans" the .QC generated by the mdldecompiler app, basically the model decompiler adds information and some qc commands which are generated when the model is compiled and are for some not necesary to be defined in your qc or even should not be there in the first place and cause problems when compiling.
This tool is probably more useful to beginners than people with experience on writing QC and compiling models or if like me you're lazy and when you decompile many models you want the QC to be cleaned in one click

I know when I started I had tons of problems compiling, most came from the Qc which has a lot of useless data and I hope this may be useful to some.
Download the tool:
http://www.mediafire.com/?05mab59dy9xdsw4
In before reactions "this could be a virus!" here's the source code (VB.net, C# users gonna hate :/)
http://www.mediafire.com/?rpocon2va24d2qy
How to use: paste the decompiled QC code into the textbox, select/deselect the checkboxes for commands that you want removed and extra cleaning and clic "clean the crap!" button.
Note that one of the other things that the mdldecompiler does is generate an idle.smd, this is totally useless when you compile, the idle sequence (which is basically one reference pose keyframe) is generated from the reference model (specified in the $model line), by default the "$sequence (idle)" is checked and will replace the idle file by your reference model file, so you can delete the idle.smd file generated by mdldecompiler.
Very much the same goes for "$collisionmodel" checkbox, the physical model is generated from the referenced model so you can aswell delete the "phymodel.smd".
Instead "Qc Cleaner" tool sets the collision model to be generated from the reference model and the collision mass, damping etc settings to be automatically calculated with the "$automass" command.
Some example of QC cleaned with the app with default checkbox settings:
Decompiled and generated by mdldecompiler:
Code:
$cd "C:\tf2_models\flipflops\decomp"
$modelname "player/items/scout/flipflops.mdl"
$model "body" "flipflops.dmx.smd"
$cdmaterials "models\player\items\scout\"
$cdmaterials ""
$hboxset "default"
$hbox 0 "bip_knee_R" 0.000 -2.425 -4.187 20.775 1.179 2.472
$hbox 0 "bip_foot_R" -2.141 -0.848 -1.451 1.572 6.759 4.407
$hbox 0 "bip_toe_R" -2.571 -6.670 -1.229 2.292 5.065 1.376
$hbox 0 "bip_knee_L" 0.000 -1.179 -4.187 20.775 2.425 2.472
$hbox 0 "bip_foot_L" -1.572 -6.759 -4.407 2.141 0.848 1.451
$hbox 0 "bip_toe_L" -2.292 -5.065 -1.376 2.571 6.670 1.229
// Model uses material "models/player/items/scout/flipflops.vmt"
$surfaceprop "cloth"
$illumposition -3.020 0.000 11.188
$sequence idle "idle" fps 30.00
Cleaned with "Qc Cleaner":
Code:
$modelname "player/items/scout/flipflops.mdl"
$model "body" "flipflops.dmx.smd"
$cdmaterials "models\player\items\scout\"
$surfaceprop "cloth"
$sequence idle "flipflops.dmx.smd" fps 30
Decompiled and generated by mdldecompiler:
Code:
$cd "C:\tf2_models\c_flamethrower\decomp"
$modelname "weapons/c_models/c_flamethrower/c_flamethrower.mdl"
$model "w_flamethrower" "c_flamethrower_reference.dmx.smd"
$lod 9
{
replacemodel "c_flamethrower_reference.dmx" "lod1_c_flamethrower_reference.dmx"
}
$lod 14
{
replacemodel "c_flamethrower_reference.dmx" "lod2_c_flamethrower_reference.dmx"
}
$lod 20
{
replacemodel "c_flamethrower_reference.dmx" "lod3_c_flamethrower_reference.dmx"
}
$lod 25
{
replacemodel "c_flamethrower_reference.dmx" "lod4_c_flamethrower_reference.dmx"
}
$cdmaterials "models\weapons\c_items\"
$cdmaterials "models\effects\pyro\"
$cdmaterials ""
$texturegroup skinfamilies
{
{"models/weapons/c_items/c_flamethrower.vmt"
"models/effects/pyro/pilotlight.vmt"
}
{"c_flamethrower_blue.vmt"
"models/effects/pyro/pilotlight.vmt"
}
}
$hboxset "default"
$hbox 0 "weapon_bone" -9.428 -17.595 -15.792 8.475 8.078 72.991
$hbox 0 "weapon_bone_1" -0.054 -3.035 -7.678 1.333 1.690 0.844
$hbox 0 "weapon_bone_L" -6.571 -4.849 -13.977 0.000 7.814 14.199
// Model uses material "models/weapons/c_items/c_flamethrower.vmt"
// Model uses material "models/effects/pyro/pilotlight.vmt"
// Model uses material "c_flamethrower_blue.vmt"
$attachment "muzzle" "weapon_bone" 0.64 2.35 58.05 rotate -81.92 -90.00 90.00
$surfaceprop "metal"
$illumposition 28.599 -0.477 -4.758
$sequence idle "idle" fps 30.00
$collisionmodel "phymodel.smd" {
$mass 1.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}
Cleaned with "Qc Cleaner":
Code:
$modelname "weapons/c_models/c_flamethrower/c_flamethrower.mdl"
$model "w_flamethrower" "c_flamethrower_reference.dmx.smd"
$lod 9
{
replacemodel "c_flamethrower_reference.dmx" "lod1_c_flamethrower_reference.dmx"
}
$lod 14
{
replacemodel "c_flamethrower_reference.dmx" "lod2_c_flamethrower_reference.dmx"
}
$lod 20
{
replacemodel "c_flamethrower_reference.dmx" "lod3_c_flamethrower_reference.dmx"
}
$lod 25
{
replacemodel "c_flamethrower_reference.dmx" "lod4_c_flamethrower_reference.dmx"
}
$cdmaterials "models\weapons\c_items\"
$cdmaterials "models\effects\pyro\"
$texturegroup skinfamilies
{
{"models/weapons/c_items/c_flamethrower.vmt"
"models/effects/pyro/pilotlight.vmt"
}
{"c_flamethrower_blue.vmt"
"models/effects/pyro/pilotlight.vmt"
}
}
$attachment "muzzle" "weapon_bone" 0.64 2.35 58.05 rotate -81.92 -90.00 90.00
$surfaceprop "metal"
$sequence idle "c_flamethrower_reference.dmx.smd" fps 30
$collisionmodel "c_flamethrower_reference.dmx.smd" {$automass}
Btw, there is still some trivial things which could be "cleaned" or written with less code but that's very specific I'll leave it up to the user, so far it should save you some time maybe, mostly help beginners to avoid Qc errors.