+#include <common/weapons/all.qh>
+
+CLASS(Turret, Object)
+ ATTRIB(Turret, m_id, int, 0)
+
+ /** short name */
+ ATTRIB(Turret, netname, string, string_null)
+ /** human readable name */
+ ATTRIB(Turret, turret_name, string, _("Turret"))
+ /** currently a copy of the model */
+ ATTRIB(Turret, mdl, string, string_null)
+ /** full name of model */
+ ATTRIB(Turret, model, string, string_null)
+ /** full name of tur_head model */
+ ATTRIB(Turret, head_model, string, string_null)
+
+ ATTRIB(Turret, spawnflags, int, 0)
+ /** turret hitbox size */
+ ATTRIB(Turret, mins, vector, '-0 -0 -0')
+ /** turret hitbox size */
+ ATTRIB(Turret, maxs, vector, '0 0 0')
+
+ METHOD(Turret, display, void(Turret this, void(string name, string icon) returns)) {
+ returns(this.turret_name, string_null);
+ }
+ /** (BOTH) setup turret data */
+ METHOD(Turret, tr_setup, void(Turret this, entity it)) {
+
+ }
+ /** (SERVER) logic to run every frame */
+ METHOD(Turret, tr_think, void(Turret this, entity it)) {
+
+ }
+ /** (SERVER) called when turret dies */
+ METHOD(Turret, tr_death, void(Turret this, entity it)) {
+
+ }
+ /** (BOTH) precaches models/sounds used by this turret */
+ METHOD(Turret, tr_precache, void(Turret this)) {
+
+ }
+ ATTRIB(Turret, m_weapon, Weapon, WEP_Null)
+#ifdef SVQC
+ /** (SERVER) called when turret attacks */
+ METHOD(Turret, tr_attack, void(Turret this, entity it)) {
+ Weapon w = this.m_weapon;
+ .entity weaponentity = weaponentities[0];
+ w.wr_think(w, self, weaponentity, 1);
+ }
+#endif
+ /** (ALL) */
+ METHOD(Turret, tr_config, void(Turret this)) {
+ // TODO
+ }
+ENDCLASS(Turret)