|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "accuracy.qh"#include <common/constants.qh>#include <common/net_linked.qh>#include <common/teams.qh>#include <common/util.qh>#include <common/weapons/_all.qh>#include <server/client.qh>#include <server/damage.qh>#include <server/mutators/_mod.qh>#include <server/player.qh>#include <server/world.qh>Go to the source code of this file.
Functions | |
| void | accuracy_add (entity this, Weapon w, float fired, float hit, float real) |
| update accuracy stats | |
| int | accuracy_byte (float n, float d) |
| bool | accuracy_canbegooddamage (entity attacker) |
| if damage were to occur, would accuracy_isgooddamage be able to return true? | |
| void | accuracy_free (entity e) |
| void | accuracy_init (entity e) |
| init/free | |
| bool | accuracy_isgooddamage (entity attacker, entity targ) |
| does this damage count towards accuracy stats? | |
| void | accuracy_resend (entity e) |
| force a resend of a player's accuracy stats | |
| void | accuracy_reset (entity e) |
| bool | accuracy_send (entity this, entity to, int sf) |
| REPLICATE (cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive") | |
| REPLICATE (cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share") | |
Variables | |
| float | fired_time |
update accuracy stats
Definition at line 102 of file accuracy.qc.
References accuracy_byte(), BIT, CS(), entity(), FOREACH_CLIENT, IS_INDEPENDENT_PLAYER, IS_SPEC, Weapon::m_id, STAT, time, and WEP_FIRST.
Referenced by Fire_AddDamage(), fireBullet_falloff(), FireRailgunBullet(), PlayerDamage(), RadiusDamageForSource(), W_Arc_Beam_Think(), W_Fireball_Explode(), W_OverkillRocketPropelledChainsaw_Explode(), W_OverkillRocketPropelledChainsaw_Think(), W_RocketMinsta_Explosion(), W_SetupShot_Dir_ProjectileSize_Range(), and W_Shotgun_Melee_Think().
Definition at line 17 of file accuracy.qc.
References rint().
Referenced by accuracy_add(), and accuracy_send().
if damage were to occur, would accuracy_isgooddamage be able to return true?
used to check if potential damage (for accuracy_fired) is good
Definition at line 154 of file accuracy.qc.
References entity(), IS_CLIENT, and warmup_stage.
Referenced by W_RocketMinsta_Explosion(), and W_SetupShot_Dir_ProjectileSize_Range().
Definition at line 58 of file accuracy.qc.
References CS(), and entity().
Referenced by ClientState_detach().
init/free
Definition at line 50 of file accuracy.qc.
References accuracy, accuracy_send(), CS(), entity(), Net_LinkEntity(), and new_pure.
Referenced by ClientState_attach().
does this damage count towards accuracy stats?
e.g. ignore team damage, damage to dead players, damage to map entities
Definition at line 133 of file accuracy.qc.
References entity(), game_stopped, IS_CLIENT, IS_DEAD, MUT_ACCADD_INVALID, MUT_ACCADD_VALID, MUTATOR_CALLHOOK, SAME_TEAM, time, and warmup_stage.
Referenced by Fire_AddDamage(), fireBullet_falloff(), PlayerDamage(), RadiusDamageForSource(), W_Arc_Beam_Think(), W_Fireball_Explode(), W_OverkillRocketPropelledChainsaw_Think(), and W_Shotgun_Melee_Think().
force a resend of a player's accuracy stats
Definition at line 80 of file accuracy.qc.
References CS(), and entity().
Referenced by PutObserverInServer(), PutPlayerInServer(), and SpectateSet().
Definition at line 63 of file accuracy.qc.
References CS(), entity(), REGISTRY_MAX, and Weapons.
Referenced by reset_map().
Definition at line 26 of file accuracy.qc.
References accuracy_byte(), autocvar_sv_accuracy_data_share, CS(), CS_CVAR, entity(), IS_SPEC, MSG_ENTITY, owner, WEP_FIRST, WEP_LAST, WriteByte(), and WriteHeader.
Referenced by accuracy_init().
| REPLICATE | ( | cvar_cl_accuracy_data_receive | , |
| bool | , | ||
| "cl_accuracy_data_receive" | ) |
| REPLICATE | ( | cvar_cl_accuracy_data_share | , |
| bool | , | ||
| "cl_accuracy_data_share" | ) |
| float fired_time |
Definition at line 86 of file accuracy.qc.