This is what I have done with this patch

Added editloc to change the description of the closest location
Added delloc to remove closest location
Added dumploc to place locs in memory into a .loc file (required for
editloc and delloc)
Added zdumploc to place locs in memory into a .loc.gz file (requred for
markloc, editloc and delloc)
Added loc.gz saving support to markloc, editloc and delloc (via
zdumploc)

Altered locs_load to use _Com_FOpenFile instead of Com_FOpenFile
Fixed potentual bug in locs_markloc
Fixed bug in Team_ParseSay that cause wierd behaviour if $ or % was last
charactor in line.

patch created from a development tree via diff -ur ../newtree ./
newtree and development tree were up-to-date at time of creating the
patch


Please let me know what you change so I may learn from it

Chris Ison (WildCode)
This commit is contained in:
Bill Currie 2000-12-19 19:47:15 +00:00
parent 5163916a4d
commit 0e268f9ca7
3 changed files with 148 additions and 13 deletions

View file

@ -45,6 +45,7 @@ location_t **locations = NULL;
int locations_alloced = 0;
int locations_count = 0;
int location_blocks = 0;
int locisgz = 0;
void locs_add (vec3_t location, char *name);
void locs_load (char *mapname);
@ -99,14 +100,23 @@ locs_load (char *mapname)
char *line, *t1, *t2;
vec3_t loc;
char tmp[PATH_MAX];
char foundname[MAX_OSPATH];
char *tmpfndnme;
int templength = 0;
snprintf (tmp, sizeof (tmp), "maps/%s.loc", mapname);
COM_FOpenFile (tmp, &file);
templength = _COM_FOpenFile (tmp, &file, foundname, 1);
if (!file) {
Con_Printf ("Couldn't load %s\n", tmp);
return;
}
#ifdef HAVE_ZLIB
tmpfndnme = foundname;
if (strncmp(tmpfndnme + strlen(foundname) - 3,".gz",3) == 0)
locisgz = 1;
else
locisgz = 0;
#endif
while ((line = Qgetline (file))) {
if (line[0] == '#')
continue;