]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qh
Merge branch 'master' into martin-t/msnt
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qh
index 24ea41c645bb124cfd735b35dd7ba8f33c295283..9570e8c561aaac732a39ba63ae1a5d51fdbf68e9 100644 (file)
@@ -1,7 +1,6 @@
-#ifndef WEAPONS_ALL_H
-#define WEAPONS_ALL_H
+#pragma once
 
-#include <common/command/all.qh>
+#include <common/command/_mod.qh>
 #include <common/stats.qh>
 #include "config.qh"
 
@@ -19,7 +18,7 @@ WepSet ReadWepSet();
 
 #include "weapon.qh"
 
-#ifndef MENUQC
+#ifdef GAMEQC
 #include "calculations.qh"
 #include <common/models/all.qh>
 #endif
@@ -312,7 +311,7 @@ STATIC_INIT(register_weapons_done)
         else
                inaccessible = strcat(inaccessible, "\n", it.netname);
     });
-    if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s\n", inaccessible);
+    if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
     #ifdef CSQC
     FOREACH(Weapons, true, it.wr_init(it));
     #endif
@@ -323,14 +322,14 @@ STATIC_INIT(register_weapons_done)
     weaponorder_byid = strzone(substring(weaponorder_byid, 1, -1));
 }
 
-#ifndef MENUQC
+#ifdef GAMEQC
 
 .entity weaponchild;
 .entity exteriorweaponentity;
-vector weaponentity_glowmod(Weapon wep, int c)
+vector weaponentity_glowmod(Weapon wep, entity actor, int c)
 {
     vector g;
-    if (!(g = wep.wr_glow(wep))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+    if (!(g = wep.wr_glow(wep, actor))) g = colormapPaletteColor(c & 0x0F, true) * 2;
     return g;
 }
 
@@ -360,5 +359,3 @@ ENUMCLASS_END(WFRAME)
 vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
 void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
 #endif
-
-#endif