mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-24 21:02:14 +00:00
CLIENT: Add FTE skel defs
SERVER: Add test IQM ledge-climb traversal
This commit is contained in:
parent
e3dcb2aa13
commit
11004c96b5
3 changed files with 688 additions and 629 deletions
|
@ -1179,10 +1179,28 @@ float(float modlindex, optional float useabstransforms) skel_create = #263; /* P
|
|||
Allocates a new uninitiaised skeletal object, with enough bone info to animate the given model.
|
||||
eg: self.skeletonobject = skel_create(self.modelindex); */
|
||||
|
||||
typedef struct {
|
||||
int sourcemodelindex; /*frame data will be imported from this model, bones must be compatible*/
|
||||
int reserved;
|
||||
int firstbone;
|
||||
int lastbone;
|
||||
float prescale; /*0 destroys existing data, 1 retains it*/
|
||||
float scale[4]; /*you'll need to do lerpfrac manually*/
|
||||
int animation[4];
|
||||
float animationtime[4];
|
||||
/*halflife models*/
|
||||
float subblend[2];
|
||||
float controllers[5];
|
||||
} skelblend_t;
|
||||
|
||||
float(float skel, entity ent, float modelindex, float retainfrac, float firstbone, float lastbone, optional float addfrac) skel_build = #264; /* Part of FTE_CSQC_SKELETONOBJECTS
|
||||
Animation data (according to the entity's frame info) is pulled from the specified model and blended into the specified skeletal object.
|
||||
If retainfrac is set to 0 on the first call and 1 on the others, you can blend multiple animations together according to the addfrac value. The final weight should be 1. Other values will result in scaling and/or other weirdness. You can use firstbone and lastbone to update only part of the skeletal object, to allow legs to animate separately from torso, use 0 for both arguments to specify all, as bones are 1-based. */
|
||||
|
||||
float(float skel, int numblends, skelblend_t *weights, int structsize) skel_build_ptr = #0:skel_build_ptr; /*
|
||||
Like skel_build, but slightly simpler. */
|
||||
|
||||
|
||||
float(float skel) skel_get_numbones = #265; /* Part of FTE_CSQC_SKELETONOBJECTS
|
||||
Retrives the number of bones in the model. The valid range is 1<=bone<=numbones. */
|
||||
|
||||
|
@ -1627,6 +1645,10 @@ void(entity e, string skinfilename, optional string skindata) setcustomskin = #3
|
|||
The texture is determined to be sufficient to hold the first named image, additional images can be named as extra tokens on the same line.
|
||||
Use a + at the end of the line to continue reading image tokens from the next line also, the named shader must use 'map $diffuse' to read the composed texture (compatible with the defaultskin shader). */
|
||||
|
||||
float(string skinfilename, optional string skindata) loadcustomskin = #377;
|
||||
void(entity e, float skinobj) applycustomskin = #378;
|
||||
void(float skinobj) releasecustomskin = #379;
|
||||
|
||||
__variant*(int size) memalloc = #384; /* Part of FTE_MEMALLOC
|
||||
Allocate an arbitary block of memory */
|
||||
|
||||
|
|
|
@ -509,10 +509,6 @@ float() zombie_predraw = {
|
|||
|
||||
// Due to QC's limit of 8-args per vararg func, split this up into
|
||||
// a few different sprintf calls.
|
||||
string skin_str = "";
|
||||
skin_str = sprintf("%sgeomset %d %d\n", skin_str, ZOMBIE_IQM_GEOMSET_BODY, )
|
||||
|
||||
|
||||
string skin_str = "";
|
||||
// Add in the geomset defs
|
||||
skin_str = sprintf("%sgeomset %d %d\n", skin_str, ZOMBIE_IQM_GEOMSET_BODY, 0);
|
||||
|
@ -522,7 +518,7 @@ float() zombie_predraw = {
|
|||
skin_str = sprintf("%sgeomset %d %d\n", skin_str, ZOMBIE_IQM_GEOMSET_LEG_L, self.limbs_state & ZOMBIE_LIMB_STATE_LEG_L == 0);
|
||||
skin_str = sprintf("%sgeomset %d %d\n", skin_str, ZOMBIE_IQM_GEOMSET_LEG_R, self.limbs_state & ZOMBIE_LIMB_STATE_LEG_R == 0);
|
||||
skin_str = sprintf("%sgeomset %d %d\n", skin_str, ZOMBIE_IQM_GEOMSET_ARM_R, self.limbs_state & ZOMBIE_LIMB_STATE_ARM_R == 0);
|
||||
// Add in the shader defs
|
||||
// Add in the per-mesh shader defs
|
||||
skin_str = sprintf("%sreplace ZombieBody %S\n", skin_str, shader_name);
|
||||
skin_str = sprintf("%sreplace ZombieHead %S\n", skin_str, shader_name);
|
||||
skin_str = sprintf("%sreplace ZombieArmL %S\n", skin_str, shader_name);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue