]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/accuracy.qh
Merge branch 'master' into LegendaryGuard/cyber
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / accuracy.qh
index 2bcaadbce7c0c4f2e71cb501a3215c935069526d..285da07276d2ce540c0354f1016c00421e1538c0 100644 (file)
@@ -3,6 +3,23 @@
 #include <common/weapons/_all.qh>
 #include <common/stats.qh>
 
+/**
+ * Weapon Accuracy stats
+ *
+ * These stats are sent to all the clients to be displayed on the scoreboard
+ * and also to Xonstats.
+ *
+ * Note that weapon damage is counted differently from player damage:
+ *  - it isn't limited by target's health in case you kill them
+ *  - it ignores handicap, shield, strength and similar powerups / buffs
+ *  - it doesn't count more than a single full hit if you hit multiple targets
+ *    with a single shot in order to never assign more than 100% accuracy per hit
+ *  - obviously damage caused by fall, lava, trigger_hurt and telefrags isn't
+ *    counted as weapon damage in any way
+ */
+
+float autocvar_sv_accuracy_data_share = 1;
+
 .bool cvar_cl_accuracy_data_share;
 REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share");
 .bool cvar_cl_accuracy_data_receive;
@@ -22,6 +39,8 @@ REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
 void accuracy_init(entity e);
 void accuracy_free(entity e);
 
+void accuracy_reset(entity e);
+
 // force a resend of a player's accuracy stats
 void accuracy_resend(entity e);