From: Rudolf Polzer Date: Tue, 27 Dec 2011 18:45:22 +0000 (+0100) Subject: -onlyents: keep gridsize as stored in the bsp X-Git-Tag: xonotic-v0.6.0~34 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2f85cccd8c5819dece9f33a06a4076ba081cd7bd;p=xonotic%2Fnetradiant.git -onlyents: keep gridsize as stored in the bsp --- diff --git a/tools/quake3/q3map2/bsp.c b/tools/quake3/q3map2/bsp.c index 4ccf97e2..4f4c7172 100644 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@ -626,7 +626,7 @@ void OnlyEnts( void ) { char out[ 1024 ]; - char save_cmdline[1024], save_version[1024]; + char save_cmdline[1024], save_version[1024], save_gridsize[1024]; const char *p; /* note it */ @@ -642,6 +642,9 @@ void OnlyEnts( void ) p = ValueForKey(&entities[0], "_q3map2_version"); strncpy(save_version, p, sizeof(save_version)); save_version[sizeof(save_version)-1] = 0; + p = ValueForKey(&entities[0], "gridsize"); + strncpy(save_gridsize, p, sizeof(save_gridsize)); + save_gridsize[sizeof(save_gridsize)-1] = 0; numEntities = 0; @@ -654,6 +657,8 @@ void OnlyEnts( void ) SetKeyValue(&entities[0], "_q3map2_cmdline", save_cmdline); if(*save_version) SetKeyValue(&entities[0], "_q3map2_version", save_version); + if(*save_gridsize) + SetKeyValue(&entities[0], "gridsize", save_gridsize); numBSPEntities = numEntities; UnparseEntities();