mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 15:21:51 +00:00
- instead of bitching when gamedir is empty, run sv_gamedir automatically
- add support for automatic per-map configs. set the mapcfg localinfo to either 1 or on and "mapcfg/canyon1.cfg" will be exec'd when that map is loaded. put mapcfg to a different string to use that dir instead.
This commit is contained in:
parent
b03ce10389
commit
c27d98b058
1 changed files with 21 additions and 2 deletions
23
world.qc
23
world.qc
|
@ -186,6 +186,19 @@ void() worldspawn =
|
|||
lastspawn = world;
|
||||
InitBodyQue ();
|
||||
|
||||
st = infokey(world, "mapcfg");
|
||||
if (!(st == "0" || st == "off" || st == ""))
|
||||
{
|
||||
if (st == "1" || st == "on")
|
||||
st = "mapcfg";
|
||||
|
||||
localcmd("exec \"");
|
||||
localcmd(st);
|
||||
localcmd("/");
|
||||
localcmd(infokey(world, "map")); // FIXME: this is safe chaining, right?
|
||||
localcmd(".cfg\"\n");
|
||||
}
|
||||
|
||||
// custom map attributes
|
||||
#ifndef QUAKE_WORLD
|
||||
if (self.model == "maps/e1m8.bsp")
|
||||
|
@ -195,8 +208,14 @@ void() worldspawn =
|
|||
#endif
|
||||
|
||||
#ifdef QUAKE_WORLD
|
||||
if (infokey(world, "*gamedir") != "fortress")
|
||||
objerror("QW TF must be run with a gamedir of \"fortress\".\n");
|
||||
st = infokey(world, "*gamedir");
|
||||
if (st != "fortress")
|
||||
{
|
||||
if (st == "")
|
||||
localcmd("sv_gamedir fortress\n");
|
||||
else
|
||||
objerror("QW TF must be run with a gamedir of \"fortress\".\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
//- OfteN globals -//
|
||||
|
|
Loading…
Reference in a new issue