Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
accuracy.qh
Go to the documentation of this file.
1#pragma once
2
4#include <common/stats.qh>
5
20
22
23REPLICATE_INIT(bool, cvar_cl_accuracy_data_share);
24REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive);
25
26.entity accuracy;
28
34
35
36// init/free
37void accuracy_init(entity e);
38void accuracy_free(entity e);
39
41
42// force a resend of a player's accuracy stats
44
45// update accuracy stats
46void accuracy_add(entity e, Weapon w, float fired, float hit, float real);
47
48// helper
49bool accuracy_isgooddamage(entity attacker, entity targ);
50bool accuracy_canbegooddamage(entity attacker);
float autocvar_sv_accuracy_data_share
Weapon Accuracy stats.
Definition accuracy.qh:21
void accuracy_add(entity e, Weapon w, float fired, float hit, float real)
update accuracy stats
Definition accuracy.qc:102
void accuracy_free(entity e)
Definition accuracy.qc:58
entity accuracy
Definition accuracy.qh:26
float accuracy_fired[REGISTRY_MAX(Weapons)]
Definition accuracy.qh:31
void accuracy_init(entity e)
init/free
Definition accuracy.qc:50
float accuracy_frags[REGISTRY_MAX(Weapons)]
Definition accuracy.qh:27
bool accuracy_isgooddamage(entity attacker, entity targ)
does this damage count towards accuracy stats?
Definition accuracy.qc:133
bool accuracy_canbegooddamage(entity attacker)
if damage were to occur, would accuracy_isgooddamage be able to return true?
Definition accuracy.qc:154
float accuracy_cnt_hit[REGISTRY_MAX(Weapons)]
Definition accuracy.qh:32
float accuracy_hit[REGISTRY_MAX(Weapons)]
Definition accuracy.qh:30
void accuracy_reset(entity e)
Definition accuracy.qc:63
void accuracy_resend(entity e)
force a resend of a player's accuracy stats
Definition accuracy.qc:80
float accuracy_cnt_fired[REGISTRY_MAX(Weapons)]
Definition accuracy.qh:33
float accuracy_real[REGISTRY_MAX(Weapons)]
Definition accuracy.qh:29
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:44
Weapons
Definition guide.qh:113
#define REPLICATE_INIT(type, name)
Definition replicate.qh:7
#define REGISTRY_MAX(id)
Definition registry.qh:17