Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_spawner.qc File Reference
Include dependency graph for sv_spawner.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void spawner_use (entity this, entity actor, entity trigger)
 spawnfunc (monster_spawner)

Function Documentation

◆ spawner_use()

void spawner_use ( entity this,
entity actor,
entity trigger )

Definition at line 6 of file sv_spawner.qc.

7{
8 int moncount = 0;
9 IL_EACH(g_monsters, it.realowner == this, ++moncount);
10
11 if (moncount >= this.count)
12 return;
13
14 entity e = spawn();
15 e.noalign = this.noalign;
16 e.angles = this.angles;
17 e.monster_skill = this.monster_skill;
18 e.skin = this.skin;
19 e = spawnmonster(e, this.spawnmob, MON_Null, this, this, this.origin, false, true, this.monster_moveflags);
20}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float count
Definition powerups.qc:22
float skin
vector origin
#define spawn
ent angles
Definition ent_cs.qc:121
#define IL_EACH(this, cond, body)
bool noalign
Definition items.qh:37
int monster_moveflags
int monster_skill
IntrusiveList g_monsters
entity spawnmonster(entity e, string monster, Monster monster_id, entity spawnedby, entity own, vector orig, bool respwn, bool removeifinvalid, int moveflag)
Definition sv_spawn.qc:12
string spawnmob
Definition sv_spawner.qh:3

References angles, count, entity(), g_monsters, IL_EACH, monster_moveflags, monster_skill, noalign, origin, skin, spawn, spawnmob, and spawnmonster().

Referenced by spawnfunc().

◆ spawnfunc()

spawnfunc ( monster_spawner )

Definition at line 22 of file sv_spawner.qc.

23{
24 if (!autocvar_g_monsters || !this.spawnmob || this.spawnmob == "")
25 {
26 delete(this);
27 return;
28 }
29
30 this.use = spawner_use;
31}
#define use
float autocvar_g_monsters
Definition sv_monsters.qh:5
void spawner_use(entity this, entity actor, entity trigger)
Definition sv_spawner.qc:6

References autocvar_g_monsters, spawner_use(), spawnmob, and use.