]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon.qh
Clean out self from wr_checkammo1 & wr_checkammo2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon.qh
index b529d109d4ccf7861ea9ee569a5844d45bce1ec4..c76a88399daff322c5b789dbc81f6b26c7cd03ca 100644 (file)
@@ -1,7 +1,11 @@
 #ifndef WEAPON_H
 #define WEAPON_H
-#include "../items/item/pickup.qh"
-#include "../stats.qh"
+#include <common/items/item/pickup.qh>
+#include <common/stats.qh>
+
+#ifdef SVQC
+#include <common/effects/qc/all.qh>
+#endif
 
 const int MAX_WEAPONSLOTS = 2;
 .entity weaponentities[MAX_WEAPONSLOTS];
@@ -85,17 +89,17 @@ CLASS(Weapon, Object)
     /** (SERVER) logic to run every frame */
     METHOD(Weapon, wr_think, void(Weapon this, entity actor, .entity weaponentity, int fire)) {}
     /** (SERVER) checks ammo for weapon primary */
-    METHOD(Weapon, wr_checkammo1, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_checkammo1, bool(Weapon this, entity actor)) {return false;}
     /** (SERVER) checks ammo for weapon second */
-    METHOD(Weapon, wr_checkammo2, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_checkammo2, bool(Weapon this, entity actor)) {return false;}
     /** (SERVER) runs bot aiming code for this weapon */
     METHOD(Weapon, wr_aim, void(Weapon this)) {}
     /** (BOTH)   precaches models/sounds used by this weapon, also sets up weapon properties */
     METHOD(Weapon, wr_init, void(Weapon this)) {}
     /** (SERVER) notification number for suicide message (may inspect w_deathtype for details) */
-    METHOD(Weapon, wr_suicidemessage, int(Weapon this)) {return 0;}
+    METHOD(Weapon, wr_suicidemessage, entity(Weapon this)) {return NULL;}
     /** (SERVER) notification number for kill message (may inspect w_deathtype for details) */
-    METHOD(Weapon, wr_killmessage, int(Weapon this)) {return 0;}
+    METHOD(Weapon, wr_killmessage, entity(Weapon this)) {return NULL;}
     /** (SERVER) handles reloading for weapon */
     METHOD(Weapon, wr_reload, void(Weapon this, entity actor, .entity weaponentity)) {}
     /** (SERVER) clears fields that the weapon may use */
@@ -126,7 +130,7 @@ CLASS(Weapon, Object)
        }
 ENDCLASS(Weapon)
 
-#include "../items/all.qh"
+#include <common/items/all.qh>
 CLASS(WeaponPickup, Pickup)
     ATTRIB(WeaponPickup, m_weapon, Weapon, NULL)
     ATTRIB(WeaponPickup, m_name, string, string_null)