]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/common.qc
update translation names and coverage for Chinese
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / common.qc
index 2539b7d3bc1613544ae7db3b07e2e7529153d6ca..a00eb120ee8d9fa213e8e8fea68f4241220642bb 100644 (file)
@@ -1,20 +1,21 @@
 #include "common.qh"
 
-#include <server/command/common.qh>
-#include <common/weapons/_all.qh>
-#include <common/stats.qh>
-#include <server/damage.qh>
-#include <server/items/items.qh>
-#include <server/mutators/_mod.qh>
 #include <common/constants.qh>
-#include <common/net_linked.qh>
 #include <common/deathtypes/all.qh>
+#include <common/items/_mod.qh>
+#include <common/net_linked.qh>
 #include <common/notifications/all.qh>
 #include <common/state.qh>
+#include <common/stats.qh>
 #include <common/util.qh>
 #include <common/weapons/_all.qh>
 #include <common/wepent.qh>
-#include <common/items/_mod.qh>
+#include <server/command/common.qh>
+#include <server/damage.qh>
+#include <server/hook.qh>
+#include <server/items/items.qh>
+#include <server/mutators/_mod.qh>
+#include <server/weapons/csqcprojectile.qh>
 
 bool W_DualWielding(entity player)
 {
@@ -42,16 +43,7 @@ void W_GiveWeapon(entity e, int wep)
 
 void W_PlayStrengthSound(entity player)
 {
-       entity store = IS_PLAYER(player) ? PS(player) : player; // because non-player entities can fire, but can they have items? TODO
-
-       if((player.items & ITEM_Strength.m_itemid)
-               && ((time > store.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam
-               || (time > store.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)))
-               {
-                       sound(player, CH_TRIGGER, SND_STRENGTH_FIRE, VOL_BASE, ATTEN_NORM);
-                       store.prevstrengthsound = time;
-               }
-               store.prevstrengthsoundattempt = time;
+       MUTATOR_CALLHOOK(W_PlayStrengthSound, player);
 }
 
 float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)