mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
add an edictcount-ticker. do "localinfo edictticker 30" before map
load and it'll go every 30 seconds.
This commit is contained in:
parent
ed6dcc443d
commit
0f2b390348
1 changed files with 15 additions and 0 deletions
15
world.qc
15
world.qc
|
@ -166,6 +166,11 @@ void() main =
|
|||
precache_file2 ("maps/dm6.bsp");
|
||||
};
|
||||
|
||||
void () edictticker_think =
|
||||
{
|
||||
localcmd ("edictcount\n");
|
||||
self.nextthink = time + self.num_mines;
|
||||
};
|
||||
|
||||
entity lastspawn;
|
||||
|
||||
|
@ -184,6 +189,7 @@ World Types:
|
|||
void() worldspawn =
|
||||
{
|
||||
local string st; //WK
|
||||
local entity ticker;
|
||||
|
||||
lastspawn = world;
|
||||
InitBodyQue ();
|
||||
|
@ -232,6 +238,15 @@ void() worldspawn =
|
|||
triggered_cycle = FALSE;
|
||||
////////////////////
|
||||
|
||||
if (stof(infokey (world, "edictticker")))
|
||||
{
|
||||
ticker = spawn();
|
||||
ticker.classname = "edictcount";
|
||||
ticker.nextthink = time + 5;
|
||||
ticker.think = edictticker_think;
|
||||
ticker.num_mines = stof(infokey (world, "edictticker")); // I hate overloading, but I don't want to use a full thing just for this one stupid little hack.
|
||||
}
|
||||
|
||||
// We set up Chris' Teamplay Plus Mode here cos that's fun
|
||||
/*st = infokey(world, "chris");
|
||||
if (st == "on")
|
||||
|
|
Loading…
Reference in a new issue