From 41fa068b7298ae81cacba9a7bb7fb93ce01308e8 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 20 Jul 2012 01:55:42 +0000 Subject: [PATCH] aaaaand fix the dedicated server. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4083 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_heightmap.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/engine/gl/gl_heightmap.c b/engine/gl/gl_heightmap.c index ef78c105e..94c18c398 100644 --- a/engine/gl/gl_heightmap.c +++ b/engine/gl/gl_heightmap.c @@ -199,9 +199,9 @@ static char *Terr_DiskSectionName(heightmap_t *hm, int sx, int sy) static hmsection_t *Terr_LoadSection(heightmap_t *hm, hmsection_t *s, int sx, int sy) { dsection_t *ds = NULL; - dsmesh_t *dm; int i; #ifndef SERVERONLY + dsmesh_t *dm; unsigned char *lm; #endif @@ -290,6 +290,7 @@ static hmsection_t *Terr_LoadSection(heightmap_t *hm, hmsection_t *s, int sx, in s->maxh = ds->maxh; s->waterheight = ds->waterheight; +#ifndef SERVERONLY s->numents = ds->numents; s->maxents = s->numents; s->ents = malloc(sizeof(*s->ents) * s->maxents); @@ -317,33 +318,12 @@ static hmsection_t *Terr_LoadSection(heightmap_t *hm, hmsection_t *s, int sx, in s->ents[i].shaderRGBAf[2] = 1; s->ents[i].shaderRGBAf[3] = 1; } - +#endif FS_FreeFile(ds); } else { - if (s->lightmap >= 0) - { - int j; - lm = lightmap[s->lightmap]->lightmaps; - lm += (s->lmx * HMLMSTRIDE + s->lmy) * lightmap_bytes; - for (i = 0; i < SECTTEXSIZE; i++) - { - for (j = 0; j < SECTTEXSIZE; j++, lm+=4) - { - lm[0] = 0; - lm[1] = 0; - lm[2] = 0; - lm[3] = 255; - } - lm += (HMLMSTRIDE - SECTTEXSIZE)*lightmap_bytes; - } - lightmap[s->lightmap]->modified = true; - lightmap[s->lightmap]->rectchange.l = 0; - lightmap[s->lightmap]->rectchange.t = 0; - lightmap[s->lightmap]->rectchange.w = HMLMSTRIDE; - lightmap[s->lightmap]->rectchange.h = HMLMSTRIDE; - } + s->flags |= TSF_RELIGHT; #if 0//def DEBUG void *f;