4 #include "mlrs_weapon.qc"
6 CLASS(MLRSTurret, Turret)
7 /* spawnflags */ ATTRIB(MLRSTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER);
8 /* mins */ ATTRIB(MLRSTurret, mins, vector, '-32 -32 0');
9 /* maxs */ ATTRIB(MLRSTurret, maxs, vector, '32 32 64');
10 /* modelname */ ATTRIB(MLRSTurret, mdl, string, "base.md3");
11 /* model */ ATTRIB_STRZONE(MLRSTurret, model, string, strcat("models/turrets/", this.mdl));
12 /* head_model */ ATTRIB_STRZONE(MLRSTurret, head_model, string, strcat("models/turrets/", "mlrs.md3"));
13 /* netname */ ATTRIB(MLRSTurret, netname, string, "mlrs");
14 /* fullname */ ATTRIB(MLRSTurret, turret_name, string, _("MLRS Turret"));
15 ATTRIB(MLRSTurret, m_weapon, Weapon, WEP_TUR_MLRS);
17 REGISTER_TURRET(MLRS, NEW(MLRSTurret));
23 #include "mlrs_weapon.qc"
27 spawnfunc(turret_mlrs) { if (!turret_initialize(TUR_MLRS)) remove(self); }
29 METHOD(MLRSTurret, tr_think, void(MLRSTurret thistur, entity it))
32 // 0 = full, 6 = empty
33 self.tur_head.frame = bound(0, 6 - floor(0.1 + self.ammo / self.shot_dmg), 6);
34 if(self.tur_head.frame < 0)
36 LOG_TRACE("ammo:",ftos(self.ammo),"\n");
37 LOG_TRACE("shot_dmg:",ftos(self.shot_dmg),"\n");
40 METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it))
42 it.ammo_flags = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE;
43 it.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
45 it.damage_flags |= TFL_DMG_HEADSHAKE;
46 it.shoot_flags |= TFL_SHOOT_VOLLYALWAYS;
47 it.volly_counter = it.shot_volly;