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

Go to the source code of this file.

Functions

void Violence_GibSplash (entity source, float type, float amount, entity attacker)
void Violence_GibSplash_At (vector org, vector dir, float type, float amount, entity gibowner, entity attacker)

Variables

int autocvar_cl_gentle_gibs
float autocvar_cl_gibs_avelocity_scale = 1
float autocvar_cl_gibs_damageforcescale = 3.5
float autocvar_cl_gibs_lifetime = 14
int autocvar_cl_gibs_maxcount = 100
bool autocvar_cl_gibs_sloppy = 1
float autocvar_cl_gibs_ticrate = 0.1
float autocvar_cl_gibs_velocity_random = 1
float autocvar_cl_gibs_velocity_scale = 1
float autocvar_cl_gibs_velocity_up
bool autocvar_cl_nogibs
bool autocvar_cl_particlegibs
float autocvar_cl_particles_quality
int autocvar_ekg

Function Documentation

◆ Violence_GibSplash()

void Violence_GibSplash ( entity source,
float type,
float amount,
entity attacker )

Definition at line 53 of file gibs.qc.

54{
55 Violence_GibSplash_At(source.origin + source.view_ofs, source.velocity, type, amount, source, attacker);
56}
void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker)
Definition gibs.qc:23

References entity(), and Violence_GibSplash_At().

Referenced by Monster_Damage(), and PlayerCorpseDamage().

◆ Violence_GibSplash_At()

void Violence_GibSplash_At ( vector org,
vector dir,
float type,
float amount,
entity gibowner,
entity attacker )

Definition at line 23 of file gibs.qc.

24{
25 if(g_cts) // no gibs in CTS
26 return;
27
28 entity e = new_pure(gibsplash);
29 e.cnt = amount;
30 e.state = type; // should stay smaller than 15
31 if(!sound_allowed(MSG_BROADCAST, gibowner) || !sound_allowed(MSG_BROADCAST, attacker))
32 e.state |= 0x40; // "silence" bit
33 e.state |= 8 * gibowner.species; // gib type, ranges from 0 to 15
34
35 // if this is a copied dead body, send the num of its player instead
36 // TODO: remove this field, read from model txt files
37 if(gibowner.classname == "body")
38 e.team = etof(gibowner.enemy);
39 else
40 e.team = etof(gibowner);
41
42 // origin is just data to be sent
43 //setorigin(e, org);
44 e.origin = org;
45 e.velocity = dir;
46
47 e.oldorigin_x = compressShortVector(e.velocity);
48
50 delete(e);
51}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float compressShortVector(vector vec)
Definition util.qc:521
#define g_cts
Definition cts.qh:36
bool Violence_GibSplash_SendEntity(entity this, entity to, int sf)
Definition gibs.qc:9
float MSG_BROADCAST
Definition menudefs.qc:55
#define etof(e)
Definition misc.qh:25
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
vector org
Definition self.qh:92
int dir
Definition impulse.qc:89
bool sound_allowed(int to, entity e)
Definition all.qc:9
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:50

References compressShortVector(), dir, entity(), etof, FOREACH_CLIENT, g_cts, IS_REAL_CLIENT, MSG_BROADCAST, new_pure, org, sound_allowed(), vector, and Violence_GibSplash_SendEntity().

Referenced by Monster_Damage(), Monster_Dead_Damage(), PlayerCorpseDamage(), PlayerDamage(), and Violence_GibSplash().

Variable Documentation

◆ autocvar_cl_gentle_gibs

int autocvar_cl_gentle_gibs

Definition at line 8 of file gibs.qh.

Referenced by NET_HANDLE().

◆ autocvar_cl_gibs_avelocity_scale

float autocvar_cl_gibs_avelocity_scale = 1

Definition at line 16 of file gibs.qh.

Referenced by TossGib().

◆ autocvar_cl_gibs_damageforcescale

float autocvar_cl_gibs_damageforcescale = 3.5

Definition at line 9 of file gibs.qh.

Referenced by TossGib().

◆ autocvar_cl_gibs_lifetime

float autocvar_cl_gibs_lifetime = 14

Definition at line 10 of file gibs.qh.

Referenced by TossGib(), and turret_gibtoss().

◆ autocvar_cl_gibs_maxcount

int autocvar_cl_gibs_maxcount = 100

Definition at line 11 of file gibs.qh.

Referenced by TossGib().

◆ autocvar_cl_gibs_sloppy

bool autocvar_cl_gibs_sloppy = 1

Definition at line 12 of file gibs.qh.

Referenced by Gib_Draw(), RaptorCBShellfragDraw(), and turret_gib_draw().

◆ autocvar_cl_gibs_ticrate

float autocvar_cl_gibs_ticrate = 0.1

Definition at line 13 of file gibs.qh.

Referenced by Gib_Draw(), RaptorCBShellfragDraw(), and turret_gib_draw().

◆ autocvar_cl_gibs_velocity_random

float autocvar_cl_gibs_velocity_random = 1

Definition at line 14 of file gibs.qh.

Referenced by TossGib().

◆ autocvar_cl_gibs_velocity_scale

float autocvar_cl_gibs_velocity_scale = 1

Definition at line 15 of file gibs.qh.

Referenced by TossGib().

◆ autocvar_cl_gibs_velocity_up

float autocvar_cl_gibs_velocity_up

Definition at line 17 of file gibs.qh.

Referenced by TossGib().

◆ autocvar_cl_nogibs

bool autocvar_cl_nogibs

Definition at line 18 of file gibs.qh.

Referenced by NET_HANDLE(), and turret_die().

◆ autocvar_cl_particlegibs

bool autocvar_cl_particlegibs

Definition at line 19 of file gibs.qh.

Referenced by NET_HANDLE().

◆ autocvar_cl_particles_quality

float autocvar_cl_particles_quality

Definition at line 20 of file gibs.qh.

Referenced by new_te_bloodshower().

◆ autocvar_ekg

int autocvar_ekg

Definition at line 4 of file gibs.qh.

Referenced by NET_HANDLE(), and PlayerDamage().