X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fmlrs.qc;h=bce27118a2ce34dc9ba605aa47d1adf78ea416c2;hb=c13fdf2b49eff1d26abc73d42e33636162a9b527;hp=c1302548d83fec358ac20bad5d9acd335e099049;hpb=b3e6c1e50968511dd530f208775d5d941a769791;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/turret/mlrs.qc b/qcsrc/common/turrets/turret/mlrs.qc index c1302548d..bce27118a 100644 --- a/qcsrc/common/turrets/turret/mlrs.qc +++ b/qcsrc/common/turrets/turret/mlrs.qc @@ -1,7 +1,7 @@ #ifndef TURRET_MLRS_H #define TURRET_MLRS_H -#include "mlrs_weapon.qc" +#include "mlrs_weapon.qh" CLASS(MLRSTurret, Turret) /* spawnflags */ ATTRIB(MLRSTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER); @@ -20,20 +20,18 @@ REGISTER_TURRET(MLRS, NEW(MLRSTurret)); #ifdef IMPLEMENTATION -#include "mlrs_weapon.qc" - #ifdef SVQC -spawnfunc(turret_mlrs) { if (!turret_initialize(TUR_MLRS)) remove(self); } +spawnfunc(turret_mlrs) { if (!turret_initialize(this, TUR_MLRS)) remove(this); } METHOD(MLRSTurret, tr_think, void(MLRSTurret thistur, entity it)) { // 0 = full, 6 = empty - self.tur_head.frame = bound(0, 6 - floor(0.1 + self.ammo / self.shot_dmg), 6); - if(self.tur_head.frame < 0) + it.tur_head.frame = bound(0, 6 - floor(0.1 + it.ammo / it.shot_dmg), 6); + if(it.tur_head.frame < 0) { - LOG_TRACE("ammo:",ftos(self.ammo),"\n"); - LOG_TRACE("shot_dmg:",ftos(self.shot_dmg),"\n"); + LOG_TRACE("ammo:",ftos(it.ammo),"\n"); + LOG_TRACE("shot_dmg:",ftos(it.shot_dmg),"\n"); } } METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it))