Untie view model frames from player frames

Discuss programming in the QuakeC language.
Post Reply
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Untie view model frames from player frames

Post by JasonX »

Something that really bothered me when modding weapons is that i'm always forced to create a new view weapon with the same amount of frames as of the player animation. Is there a way of untying those? Also, is there a faster way of creating new animation frames for view models instead of just copying/pasting tons of function/frame calls?
c0burn
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England
Contact:

Re: Untie view model frames from player frames

Post by c0burn »

You don't have to tie them together, or use frame macros at all.

When I make a scratch mod I just use a new PlayerThink() that sets an appropriate frame for the player, then also updates his weapon frame separately based upon some variable or other.
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Re: Untie view model frames from player frames

Post by JasonX »

Like a global frame variable for each item?
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: Untie view model frames from player frames

Post by Dr. Shadowborg »

You probably should go with a state based variable system.

For some ideas on how to do this, you can look at the hybrid system I used in my old hellsmash mod, the source for which you can find here:

https://drive.google.com/open?id=1_YmWn ... w5HaGgjbiv

Look around in drsdefs.qc, player.qc, and probably client.qc for weapon animation stuff.

Glancing around in that source code brings back memories, and is...well...kinda embarassing. :oops: There's still some good stuff in there waiting to be dusted off and polished up though.

I was planning on doing an updated / enhanced version of this for inclusion in my new Frikbot X enhancements / GPL QC Codebase, but real-life and hardware upgrades somehow ate up 1 1/2 years, so I haven't gotten around to it yet.

My Quake2QC project will however, require it due to the absurd amount of animations models have in that game.

Guess I should probably put tackling FBX 11 first and get that released... So many things I had planned to do, then forgot about due to lack of time. :cry:
Post Reply