]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/sv_turrets.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / sv_turrets.qc
index a06fbcbb96392c24fdc53b5b07573a4c48167318..1502be25114f1ddfb5bf90192c796d9f37d2febb 100644 (file)
@@ -455,14 +455,15 @@ void turret_projectile_damage(entity this, entity inflictor, entity attacker, fl
        this.health     -= damage;
        //this.realowner = attacker; // Dont change realowner, it does not make much sense for turrets
        if(this.health <= 0)
-               WITH(entity, self, this, W_PrepareExplosionByDamage(this.owner, turret_projectile_explode));
+               WITHSELF(this, W_PrepareExplosionByDamage(this.owner, turret_projectile_explode));
 }
 
-entity turret_projectile(string _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim)
+entity turret_projectile(Sound _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim)
 {SELFPARAM();
+    TC(Sound, _snd);
        entity proj;
 
-       _sound (self, CH_WEAPON_A, _snd, VOL_BASE, ATTEN_NORM);
+       sound (self, CH_WEAPON_A, _snd, VOL_BASE, ATTEN_NORM);
        proj                             = spawn ();
        setorigin(proj, self.tur_shotorg);
        setsize(proj, '-0.5 -0.5 -0.5' * _size, '0.5 0.5 0.5' * _size);
@@ -1206,11 +1207,11 @@ void turrets_manager_think()
 
        if (autocvar_g_turrets_reloadcvars == 1)
        {
-               FOREACH_ENTITY(IS_TURRET(it), LAMBDA(
+               FOREACH_ENTITY(IS_TURRET(it), {
                        load_unit_settings(it, true);
                        Turret tur = get_turretinfo(it.m_id);
                        tur.tr_think(tur, it);
-               ));
+               });
                cvar_set("g_turrets_reloadcvars", "0");
        }
 }