make sure modelattach.m is initialized to NULL
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3017 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+1
-1
@@ -230,7 +230,7 @@ struct md2 : vertmodel
|
||||
void rendershadow(int anim, int varseed, float speed, int basetime, const vec &o, float yaw, modelattach *a)
|
||||
{
|
||||
parts[0]->rendershadow(anim, varseed, speed, basetime, o, yaw);
|
||||
if(a) for(int i = 0; a[i].name; i++)
|
||||
if(a) for(int i = 0; a[i].tag; i++)
|
||||
{
|
||||
vertmodel *m = (vertmodel *)a[i].m;
|
||||
if(!m) continue;
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ struct md3 : vertmodel
|
||||
if(a) for(int i = 0; a[i].tag; i++)
|
||||
{
|
||||
vertmodel *m = (vertmodel *)a[i].m;
|
||||
if(!m || !a[i].name)
|
||||
if(!m)
|
||||
{
|
||||
if(a[i].pos) link(NULL, a[i].tag);
|
||||
continue;
|
||||
|
||||
+3
-3
@@ -32,9 +32,9 @@ struct modelattach
|
||||
vec *pos;
|
||||
model *m;
|
||||
|
||||
modelattach() : tag(NULL), name(NULL), pos(NULL) {}
|
||||
modelattach(const char *tag, const char *name) : tag(tag), name(name), pos(NULL) {}
|
||||
modelattach(const char *tag, vec *pos) : tag(tag), name(NULL), pos(pos) {}
|
||||
modelattach() : tag(NULL), name(NULL), pos(NULL), m(NULL) {}
|
||||
modelattach(const char *tag, const char *name) : tag(tag), name(name), pos(NULL), m(NULL) {}
|
||||
modelattach(const char *tag, vec *pos) : tag(tag), name(NULL), pos(pos), m(NULL) {}
|
||||
};
|
||||
|
||||
struct dynent;
|
||||
|
||||
@@ -356,7 +356,7 @@ void rendermodel(const char *mdl, int anim, int tex, float rad, const vec &o, fl
|
||||
|
||||
if(a) for(int i = 0; a[i].tag; i++)
|
||||
{
|
||||
a[i].m = a[i].name ? loadmodel(a[i].name) : NULL;
|
||||
if(a[i].name) a[i].m = loadmodel(a[i].name);
|
||||
//if(a[i].m && a[i].m->type()!=m->type()) a[i].m = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user