]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/wepent.qh
Add a networked entity to hold weapon state
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / wepent.qh
diff --git a/qcsrc/common/wepent.qh b/qcsrc/common/wepent.qh
new file mode 100644 (file)
index 0000000..7729601
--- /dev/null
@@ -0,0 +1,28 @@
+#pragma once
+
+REGISTER_NET_LINKED(ENT_CLIENT_WEPENT)
+REGISTER_NET_TEMP(CLIENT_WEPENT)
+
+#ifdef SVQC
+
+       bool wepent_send(entity this, entity to, int sf);
+
+       void wepent_update(entity this);
+
+       void wepent_link(entity wep);
+
+       .int m_forceupdate;
+
+       .Weapon m_switchweapon;
+       .Weapon m_weapon;
+       .Weapon m_switchingweapon;
+
+#endif
+
+#ifdef CSQC
+       .int m_wepent_slot;
+
+       .Weapon activeweapon;
+       .Weapon switchingweapon;
+       .Weapon switchweapon;
+#endif