- if(model->surfmesh.num_vertices > animatemodel_cache.max_vertices)
- {
- animatemodel_cache.max_vertices = model->surfmesh.num_vertices * 2;
- if(animatemodel_cache.buf_vertex3f) Mem_Free(animatemodel_cache.buf_vertex3f);
- if(animatemodel_cache.buf_svector3f) Mem_Free(animatemodel_cache.buf_svector3f);
- if(animatemodel_cache.buf_tvector3f) Mem_Free(animatemodel_cache.buf_tvector3f);
- if(animatemodel_cache.buf_normal3f) Mem_Free(animatemodel_cache.buf_normal3f);
- animatemodel_cache.buf_vertex3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache.max_vertices);
- animatemodel_cache.buf_svector3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache.max_vertices);
- animatemodel_cache.buf_tvector3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache.max_vertices);
- animatemodel_cache.buf_normal3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache.max_vertices);
- }
- animatemodel_cache.data_vertex3f = animatemodel_cache.buf_vertex3f;
- animatemodel_cache.data_svector3f = animatemodel_cache.buf_svector3f;
- animatemodel_cache.data_tvector3f = animatemodel_cache.buf_tvector3f;
- animatemodel_cache.data_normal3f = animatemodel_cache.buf_normal3f;
+ if(model->surfmesh.num_vertices > animatemodel_cache->max_vertices)
+ {
+ animatemodel_cache->max_vertices = model->surfmesh.num_vertices * 2;
+ if(animatemodel_cache->buf_vertex3f) Mem_Free(animatemodel_cache->buf_vertex3f);
+ if(animatemodel_cache->buf_svector3f) Mem_Free(animatemodel_cache->buf_svector3f);
+ if(animatemodel_cache->buf_tvector3f) Mem_Free(animatemodel_cache->buf_tvector3f);
+ if(animatemodel_cache->buf_normal3f) Mem_Free(animatemodel_cache->buf_normal3f);
+ animatemodel_cache->buf_vertex3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache->max_vertices);
+ animatemodel_cache->buf_svector3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache->max_vertices);
+ animatemodel_cache->buf_tvector3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache->max_vertices);
+ animatemodel_cache->buf_normal3f = (float *)Mem_Alloc(prog->progs_mempool, sizeof(float[3]) * animatemodel_cache->max_vertices);
+ }
+ animatemodel_cache->data_vertex3f = animatemodel_cache->buf_vertex3f;
+ animatemodel_cache->data_svector3f = animatemodel_cache->buf_svector3f;
+ animatemodel_cache->data_tvector3f = animatemodel_cache->buf_tvector3f;
+ animatemodel_cache->data_normal3f = animatemodel_cache->buf_normal3f;