]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/turrets/turret/mlrs.qc
Sort most common includes alphabetically
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / mlrs.qc
1 #include "mlrs.qh"
2
3 #ifdef SVQC
4
5 spawnfunc(turret_mlrs) { if (!turret_initialize(this, TUR_MLRS)) delete(this); }
6
7 METHOD(MLRSTurret, tr_think, void(MLRSTurret thistur, entity it))
8 {
9     // 0 = full, 6 = empty
10     it.tur_head.frame = bound(0, 6 - floor(0.1 + it.ammo / it.shot_dmg), 6);
11     if(it.tur_head.frame < 0)
12     {
13         LOG_TRACE("ammo:",ftos(it.ammo));
14         LOG_TRACE("shot_dmg:",ftos(it.shot_dmg));
15     }
16 }
17 METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it))
18 {
19     it.ammo_flags = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE;
20     it.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
21
22     it.damage_flags |= TFL_DMG_HEADSHAKE;
23     it.shoot_flags  |= TFL_SHOOT_VOLLYALWAYS;
24     it.volly_counter = it.shot_volly;
25 }
26
27 #endif // SVQC