PROBLEM 1: Half of the current AGR playerbase insist on using clients such as EZQuake, Fuhquake etc. These clients cannot use iqms, so completely replacing the existing (SSQC) player.mdl is not an option.
SOLUTION TO PROBLEM 1: Use CSQC's deltalisten to intercept SSQC's player.mdl, and substitute a CSQC player.iqm. CSQC clients see the new iqm, and EZQuakers are unaffected. This is the current situation. I still have the regular quake.mdl, animating normally in SSQC. I've exported captn bubs's player.blender file as an IQM, and using a *.framegroups file, managed to get the iqm to replicate all of the SSQC mdl's movements. IIUC, the SSQC sends self.frame information to the CSQC (deltalisten'ed) entity every .. er.. frame ('tick'?), and the CSQC translates this information into poses in the iqm, as specified in the frameworks file. All works great except:
PROBLEM 2: I want to implement skeletal animation, and animate the IQM using it's 'embedded' animations (ie rather than use a framegroups file) (Apparently framegroups files are only necessary if there's a problem with the exporting). Anyway, I made a new version of the iqm which has all the quake animations as seperate 'actions'. My idea was to send the .frame information from SSQC to CSQC as a STAT (before I realised that the .frame information gets sent anyway) :
Code: Select all
//CSQC
float latest_frame = getstatf(STAT_FRAME); // get the frame from SSQC
self.frame = WhatAnimIsThat(latest_frame);// translate it to what the new animation
Code: Select all
// receives the current .frame, and returns which (iqm) animation to run
float (float the_frame) WhatAnimIsThat =
{
switch(the_frame)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5: return frameforname(self.modelindex,"axrun"); // this is a NEW animation embedded in the new iqm
case 6:
case 7:
case 8:
case 9:
case 10:
case 11: return frameforname(self.modelindex,"rockrun"); // this is a NEW animation embedded in the NEW iqm
// etc
.
.
If this were a pure CSQC entity, IIUC, the way to run an iqm animation is:
self.frame1time += frametime;
However, deltalistened entities (such as the player.iqm in this case) receive self.frame information every tick(packet?), which is overrides/interferes my attempt to control the .frame info entirely within CSQC
SO WHAT'S THE QUESTION?
The question is: Does anyone have any tips, hints, or suggestions as to how to synchronise the animations of a (SSQC) player.mdl with a (CSQC + deltalisten) *.iqm substitute?