intsurface;// index into array held inside the model definition of pointers to the actual surface data loaded in - used by both client and game
floatgenBarycentricJ;// point 0 barycentric coors
floatgenBarycentricI;// point 1 barycentric coors - point 2 is 1 - point0 - point1
intgenPolySurfaceIndex;// used to point back to the original surface and poly if this is a generated surface
intgenLod;// used to determine original lod of original surface and poly hit location
surfaceInfo_t():
offFlags(0),
surface(0),
genBarycentricJ(0),
genBarycentricI(0),
genPolySurfaceIndex(0),
genLod(0)
{}
};
#define MDXABONEDEF // used in the mdxformat.h file to stop redefinitions of the bone struct.
// we save the whole structure here.
structboneInfo_t
{
intboneNumber;// what bone are we overriding?
mdxaBone_tmatrix;// details of bone angle overrides - some are pre-done on the server, some in ghoul2
intflags;// flags for override
intstartFrame;// start frame for animation
intendFrame;// end frame for animation NOTE anim actually ends on endFrame+1
intstartTime;// time we started this animation
intpauseTime;// time we paused this animation - 0 if not paused
floatanimSpeed;// speed at which this anim runs. 1.0f means full speed of animation incoming - ie if anim is 20hrtz, we run at 20hrts. If 5hrts, we run at 5 hrts
floatblendFrame;// frame PLUS LERP value to blend from
intblendLerpFrame;// frame to lerp the blend frame with.
intblendTime;// Duration time for blending - used to calc amount each frame of new anim is blended with last frame of the last anim
intblendStart;// Time when blending starts - not necessarily the same as startTime since we might start half way through an anim
intboneBlendTime;// time for duration of bone angle blend with normal animation
intboneBlendStart;// time bone angle blend with normal animation began
intlastTime;// this does not go across the network
mdxaBone_tnewMatrix;// This is the lerped matrix that Ghoul2 uses on the client side - does not go across the network
//we save from top to boltUsed here. Don't bother saving the position, it gets rebuilt every frame anyway
structboltInfo_t{
intboneNumber;// bone number bolt attaches to
intsurfaceNumber;// surface number bolt attaches to
intsurfaceType;// if we attach to a surface, this tells us if it is an original surface or a generated one - doesn't go across the network
intboltUsed;// nor does this
mdxaBone_tposition;// this does not go across the network
boltInfo_t():
boneNumber(-1),
surfaceNumber(-1),
surfaceType(0),
boltUsed(0)
{}
};
#ifdef _SOF2
typedefenum
{
PGORE_NONE,
PGORE_ARMOR,
PGORE_BULLETSMALL,
PGORE_BULLETMED,
PGORE_BULLETBIG,
PGORE_HEGRENADE,
PGORE_COUNT
}goreEnum_t;
structgoreEnumShader_t
{
goreEnum_tshaderEnum;
charshaderName[MAX_QPATH];
};
structSSkinGoreData
{
vec3_tangles;
vec3_tposition;
intcurrentTime;
intentNum;
vec3_trayDirection;// in world space
vec3_thitLocation;// in world space
vec3_tscale;
floatSSize;// size of splotch in the S texture direction in world units
floatTSize;// size of splotch in the T texture direction in world units
floattheta;// angle to rotate the splotch
// qhandle_t shader; // handle to shader for gore, this better be rendered after the shader of the underlying surface
// this shader should also have "clamp" mode, not tiled.
goreEnum_tshaderEnum;// enum that'll get switched over to the shader's actual handle
};
#endif // _SOF2
#define MAX_GHOUL_COUNT_BITS 8 // bits required to send across the MAX_G2_MODELS inside of the networking - this is the only restriction on ghoul models possible per entity