Fixed some precompiler constant usage.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1237 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9b822244ee
commit
9a4e707fda
|
@ -6,7 +6,7 @@
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
#ifdef ZYMOTICMODELS
|
#if defined(ZYMOTICMODELS) || defined(MD5MODELS)
|
||||||
#define SKELETALMODELS
|
#define SKELETALMODELS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -97,11 +97,12 @@ typedef struct {
|
||||||
|
|
||||||
int nextsurf;
|
int nextsurf;
|
||||||
|
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
int numbones;
|
int numbones;
|
||||||
int ofsbones;
|
int ofsbones;
|
||||||
int numtransforms;
|
int numtransforms;
|
||||||
int ofstransforms;
|
int ofstransforms;
|
||||||
|
#endif
|
||||||
|
|
||||||
//these exist only in the root mesh.
|
//these exist only in the root mesh.
|
||||||
int numtagframes;
|
int numtagframes;
|
||||||
|
@ -174,9 +175,10 @@ typedef struct {
|
||||||
} galiascolourmapped_t;
|
} galiascolourmapped_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
static void R_LerpBones(float *plerp, float **pose, int poses, galiasbone_t *bones, int bonecount, float bonepose[MAX_BONES][12]);
|
static void R_LerpBones(float *plerp, float **pose, int poses, galiasbone_t *bones, int bonecount, float bonepose[MAX_BONES][12]);
|
||||||
static void R_TransformVerticies(float bonepose[MAX_BONES][12], galisskeletaltransforms_t *weights, int numweights, float *xyzout);
|
static void R_TransformVerticies(float bonepose[MAX_BONES][12], galisskeletaltransforms_t *weights, int numweights, float *xyzout);
|
||||||
|
#endif
|
||||||
|
|
||||||
void Mod_DoCRC(model_t *mod, char *buffer, int buffersize)
|
void Mod_DoCRC(model_t *mod, char *buffer, int buffersize)
|
||||||
{
|
{
|
||||||
|
@ -225,7 +227,7 @@ qboolean GLMod_Trace(model_t *model, int forcehullnum, int frame, vec3_t start,
|
||||||
float diststart, distend;
|
float diststart, distend;
|
||||||
|
|
||||||
float frac;
|
float frac;
|
||||||
float temp;
|
// float temp;
|
||||||
|
|
||||||
vec3_t impactpoint;
|
vec3_t impactpoint;
|
||||||
|
|
||||||
|
@ -238,6 +240,7 @@ qboolean GLMod_Trace(model_t *model, int forcehullnum, int frame, vec3_t start,
|
||||||
group = (galiasgroup_t*)((char*)mod + mod->groupofs);
|
group = (galiasgroup_t*)((char*)mod + mod->groupofs);
|
||||||
pose = (galiaspose_t*)((char*)&group[0] + group[0].poseofs);
|
pose = (galiaspose_t*)((char*)&group[0] + group[0].poseofs);
|
||||||
posedata = (float*)((char*)pose + pose->ofsverts);
|
posedata = (float*)((char*)pose + pose->ofsverts);
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
if (mod->numbones && !mod->sharesverts)
|
if (mod->numbones && !mod->sharesverts)
|
||||||
{
|
{
|
||||||
float bonepose[MAX_BONES][12];
|
float bonepose[MAX_BONES][12];
|
||||||
|
@ -251,6 +254,7 @@ qboolean GLMod_Trace(model_t *model, int forcehullnum, int frame, vec3_t start,
|
||||||
else
|
else
|
||||||
R_TransformVerticies((void*)posedata, (galisskeletaltransforms_t*)((char*)mod + mod->ofstransforms), mod->numtransforms, posedata);
|
R_TransformVerticies((void*)posedata, (galisskeletaltransforms_t*)((char*)mod + mod->ofstransforms), mod->numtransforms, posedata);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < mod->numindexes; i+=3)
|
for (i = 0; i < mod->numindexes; i+=3)
|
||||||
{
|
{
|
||||||
|
@ -279,10 +283,10 @@ qboolean GLMod_Trace(model_t *model, int forcehullnum, int frame, vec3_t start,
|
||||||
impactpoint[1] = start[1] + frac*(end[1] - start[1]);
|
impactpoint[1] = start[1] + frac*(end[1] - start[1]);
|
||||||
impactpoint[2] = start[2] + frac*(end[2] - start[2]);
|
impactpoint[2] = start[2] + frac*(end[2] - start[2]);
|
||||||
|
|
||||||
temp = DotProduct(impactpoint, normal)-planedist;
|
// temp = DotProduct(impactpoint, normal)-planedist;
|
||||||
|
|
||||||
CrossProduct(edge1, normal, edgenormal);
|
CrossProduct(edge1, normal, edgenormal);
|
||||||
temp = DotProduct(impactpoint, edgenormal)-DotProduct(p2, edgenormal);
|
// temp = DotProduct(impactpoint, edgenormal)-DotProduct(p2, edgenormal);
|
||||||
if (DotProduct(impactpoint, edgenormal) > DotProduct(p2, edgenormal))
|
if (DotProduct(impactpoint, edgenormal) > DotProduct(p2, edgenormal))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue