From: havoc Date: Mon, 12 Mar 2007 02:33:27 +0000 (+0000) Subject: added support for locs/something.loc naming in loc file loading code, for proquake... X-Git-Tag: xonotic-v0.1.0preview~3461 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=1124b289d8ed69d458447b6ff48a1b4ff3cf6a9a added support for locs/something.loc naming in loc file loading code, for proquake filename compatibility git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6955 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index c70b63ed..66029ab8 100644 --- a/cl_main.c +++ b/cl_main.c @@ -1968,14 +1968,22 @@ void CL_Locs_Reload_f(void) Con_Printf("No level loaded!\n"); return; } - FS_StripExtension(cl.worldmodel->name, locfilename, sizeof(locfilename)); - strlcat(locfilename, ".loc", sizeof(locfilename)); CL_Locs_Clear_f(); + // try maps/something.loc first (LordHavoc: where I think they should be) + FS_StripExtension(cl.worldmodel->name, locfilename, sizeof(locfilename)); + strlcat(locfilename, ".loc", sizeof(locfilename)); filedata = (char *)FS_LoadFile(locfilename, cls.levelmempool, false, &filesize); if (!filedata) - return; + { + // try proquake name as well (LordHavoc: I hate path mangling) + FS_StripExtension(va("locs/%s", FS_FileWithoutPath(cl.worldmodel->name)), locfilename, sizeof(locfilename)); + strlcat(locfilename, ".loc", sizeof(locfilename)); + filedata = (char *)FS_LoadFile(locfilename, cls.levelmempool, false, &filesize); + if (!filedata) + return; + } text = filedata; textend = filedata + filesize; for (linenumber = 1;text < textend;linenumber++) diff --git a/todo b/todo index a7c87869..e0426580 100644 --- a/todo +++ b/todo @@ -130,7 +130,6 @@ 0 change hmap2: qbsp should do tjunc fixing on leaky maps 0 change revelation: change the wabbit kill message to " was hunting wabbit but shot " " instead" 0 change zmodel: include the example script in the build zips, not just in the files directory -0 feature darkplaces client: add .loc file support and say macros 0 feature darkplaces client: add .mvd demo support 0 feature darkplaces client: add .qwd demo support 0 feature darkplaces client: add DP_GFX_EFFECTINFO_TXT to extensions and document it, the feature has been in for a long time, also update wiki.quakesrc.org accordingly @@ -1212,6 +1211,7 @@ d dpzoo.map: rain d dpzoo.map: skybox d dpzoo.map: snow d dpzoo.map: transparent glass bmodels (DP_ENT_ALPHA) +d feature darkplaces client: add .loc file support and say macros d feature darkplaces client: add BX_WAL_SUPPORT to extensions and document it, the feature has been in for a long time, also update wiki.quakesrc.org accordingly d feature darkplaces client: add a sv_fixedframeratesingleplayer cvar (default off), to allow fixed framerate singleplayer mods, mainly useful for physics (Urre) d feature darkplaces client: add showbrand cvar which would show gfx/brand.tga in the left/right top/bottom corner (depending on value of scr_showbrand) all the time, this would be useful for screenshots (Spirit_of_85)