Blender animation problem

Hey! I wanted to apply an animation to a model in blender, but the weapon isn’t moving with the arms:
http://s1110.photobucket.com/albums/h447/RagingBlast1/?action=view&current=Unbenannt-4.png
I tried parenting already, but it didn’t work…

any help would be appreciated.

Have you tried connecting the gun via bones?

Yes, I tried connecting the g36c’s main bone to the right hand, but I got the same error.

Did you re-do the weight painting to the bone?

Well, I want to replace the model of a g36c CS:S skin, and it happens with the default model too (not ingame, in blender) so I don’t think it’s a weight painting problem

Are you trying to animate the bare skeleton imported straight from the smd?

I’m not animating it, I want to recompile it using existing animations

Is the weapon moving at all? Is it moving but as if it was facing 90 degrees to the left/right, while the hands move and face forward?

Yep, the weapon is moving, the charging handle/bolt is moving, etc…

You could create a bone at 0 0 0, parent everything that’s turned 90 degrees to it, pose it 90 degrees the other way and keyframe that at frame 0 in the animations. I think this is more of an MDLDecompiler problem than a Blender problem.

That would fix frame 0…the rest is still rotated

Could you post a screenshot of the armature expanded in the outline window, and of the dopesheet of one of the bad anims? Like this:

The bone “z” is the rotation fixing bone in my picture. Changing z’s pose in that one keyframe (selected in yellow) will offset/rotate the weapon wherever I want for the whole animation.

Oh god, I’m such an idiot. xD
All I had to do was check the box that says “Do not fix rotations on animations” when decompiling.
Thanks for your help though!