From df9dae3e5f9355f28c803b4430d932cc7f0898f5 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 4 Sep 2011 07:07:20 +0000 Subject: [PATCH] Fix dedicated servers. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3897 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/com_mesh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/common/com_mesh.c b/engine/common/com_mesh.c index 49397a6db..ba8b1b213 100644 --- a/engine/common/com_mesh.c +++ b/engine/common/com_mesh.c @@ -5758,6 +5758,8 @@ galiasinfo_t *Mod_ParseIQMMeshModel(model_t *mod, char *buffer) gai[i].ofsbones = (char*)bones - (char*)&gai[i]; gai[i].groups = h->num_anims; gai[i].groupofs = (char*)fgroup - (char*)&gai[i]; + + offset = LittleLong(mesh[i].first_vertex); #ifndef SERVERONLY /*skins*/ @@ -5774,10 +5776,9 @@ galiasinfo_t *Mod_ParseIQMMeshModel(model_t *mod, char *buffer) R_BuildDefaultTexnums(&texnum[i], texnum[i].shader); if (texnum[i].shader->flags & SHADER_NOIMAGE) Con_Printf("Unable to load texture for shader \"%s\" for model \"%s\"\n", texnum[i].shader->name, loadmodel->name); + gai[i].ofs_st_array = (char*)(otcoords+offset) - (char*)&gai[i]; #endif - offset = LittleLong(mesh[i].first_vertex); - nt = LittleLong(mesh[i].num_triangles); tris = (struct iqmtriangle*)(buffer + LittleLong(h->ofs_triangles)); tris += LittleLong(mesh[i].first_triangle); @@ -5791,7 +5792,6 @@ galiasinfo_t *Mod_ParseIQMMeshModel(model_t *mod, char *buffer) *idx++ = LittleShort(tris[t].vertex[2]) - offset; } - gai[i].ofs_st_array = (char*)(otcoords+offset) - (char*)&gai[i]; /*verts*/ gai[i].shares_verts = i; gai[i].numverts = LittleLong(mesh[i].num_vertexes);