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

Go to the source code of this file.

Classes

class  SpawnNade

Functions

void nade_spawn_boom (entity this)
bool nade_spawn_DestroyDamage (entity this, entity attacker)
void nade_spawn_SetSpawnHealth (entity player)

Variables

bool autocvar_g_nades_spawn = true
const int PROJECTILE_NADE_SPAWN = 79

Function Documentation

◆ nade_spawn_boom()

void nade_spawn_boom ( entity this)

Definition at line 4 of file spawn.qc.

5{
6 entity player = this.realowner;
7 entity spawnloc = new(nade_spawn_loc);
8 setorigin(spawnloc, this.origin);
9 setsize(spawnloc, player.mins, player.maxs);
10 set_movetype(spawnloc, MOVETYPE_NONE);
11 spawnloc.solid = SOLID_NOT;
12 spawnloc.drawonlytoclient = player;
13 spawnloc.effects = EF_STARDUST;
14 spawnloc.cnt = autocvar_g_nades_spawn_count;
15
16 if(player.nade_spawnloc)
17 delete(player.nade_spawnloc);
18
19 player.nade_spawnloc = spawnloc;
20}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const float EF_STARDUST
const float SOLID_NOT
vector origin
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
const int MOVETYPE_NONE
Definition movetypes.qh:129
int autocvar_g_nades_spawn_count
Definition sv_nades.qh:9
entity realowner

References autocvar_g_nades_spawn_count, EF_STARDUST, entity(), MOVETYPE_NONE, origin, realowner, set_movetype(), and SOLID_NOT.

Referenced by nade_boom().

◆ nade_spawn_DestroyDamage()

bool nade_spawn_DestroyDamage ( entity this,
entity attacker )

Definition at line 28 of file spawn.qc.

29{
30 if(autocvar_g_nades_spawn_destroy_damage > 0 && STAT(NADE_BONUS_TYPE, this) == NADE_TYPE_SPAWN.m_id)
31 Damage(this.realowner, attacker, attacker, autocvar_g_nades_spawn_destroy_damage, DEATH_TOUCHEXPLODE.m_id, DMG_NOWEP, this.realowner.origin, '0 0 0');
32 return false;
33}
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition damage.qc:503
#define DMG_NOWEP
Definition damage.qh:104
#define STAT(...)
Definition stats.qh:82
float autocvar_g_nades_spawn_destroy_damage
Definition sv_nades.qh:11

References autocvar_g_nades_spawn_destroy_damage, Damage(), DMG_NOWEP, entity(), realowner, and STAT.

Referenced by nade_damage().

◆ nade_spawn_SetSpawnHealth()

void nade_spawn_SetSpawnHealth ( entity player)

Definition at line 22 of file spawn.qc.

23{
26}
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float autocvar_g_nades_spawn_health_respawn
Definition sv_nades.qh:10

References autocvar_g_nades_spawn_health_respawn, entity(), and SetResource().

Referenced by MUTATOR_HOOKFUNCTION().

Variable Documentation

◆ autocvar_g_nades_spawn

bool autocvar_g_nades_spawn = true

Definition at line 6 of file spawn.qh.

Referenced by nades_CheckTypes().

◆ PROJECTILE_NADE_SPAWN

const int PROJECTILE_NADE_SPAWN = 79

Definition at line 13 of file spawn.qh.

Referenced by REGISTER_NADE().