diff --git a/engine/gl/gl_heightmap.c b/engine/gl/gl_heightmap.c index b645e9a85..0dbe8ae3c 100644 --- a/engine/gl/gl_heightmap.c +++ b/engine/gl/gl_heightmap.c @@ -1496,8 +1496,8 @@ void Terr_RebuildMesh(hmsection_t *s, int x, int y) GL_SelectVBO(s->vbo.coord.gl.vbo); qglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, (sizeof(vecV_t)+sizeof(vec2_t)+sizeof(vec2_t)) * mesh->numvertexes, mesh->xyz_array); - if (mesh->colors4f_array) - qglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, (sizeof(vecV_t)+sizeof(vec2_t)+sizeof(vec2_t)) * mesh->numvertexes, sizeof(vec4_t)*mesh->numvertexes, mesh->colors4f_array); + if (mesh->colors4f_array[0]) + qglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, (sizeof(vecV_t)+sizeof(vec2_t)+sizeof(vec2_t)) * mesh->numvertexes, sizeof(vec4_t)*mesh->numvertexes, mesh->colors4f_array[0]); GL_SelectVBO(0); s->vbo.coord.gl.addr = 0; s->vbo.texcoord.gl.addr = (void*)((char*)mesh->st_array - (char*)mesh->xyz_array); diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 01a6c6407..83dbd09cc 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -1011,8 +1011,8 @@ void SV_FilterList_f (void) void SV_Unban_f (void) { qboolean all = false; - bannedips_t *nb = svs.bannedips; - bannedips_t *nbnext; + bannedips_t **link; + bannedips_t *nb; netadr_t unbanadr = {0}; netadr_t unbanmask = {0}; char adr[MAX_ADR_SIZE]; @@ -1031,22 +1031,22 @@ void SV_Unban_f (void) return; } - while (nb) + for (link = &svs.bannedips ; (nb = *link) ; ) { - nbnext = nb->next; if (all || (NET_CompareAdr(&nb->adr, &unbanadr) && NET_CompareAdr(&nb->adrmask, &unbanmask))) { if (!all) Con_Printf("unbanned %s\n", NET_AdrToStringMasked(adr, sizeof(adr), &nb->adr, &nb->adrmask)); - if (svs.bannedips == nb) - svs.bannedips = nbnext; + *link = nb->next; Z_Free(nb); if (!all) break; } - - nb = nbnext; + else + { + link = &(*link)->next; + } } }