]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/tracing.qc
Merge branch 'master' into DefaultUser/func_button_relay
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / tracing.qc
index 0216a76234c2a6e1ab60bbe1dc8e7a37cdaa235f..570d976db1d664505d01f6484fdaab7db7fa518d 100644 (file)
@@ -138,7 +138,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect
                ent.punchangle_x = recoil * -1;
 
        if (snd != SND_Null) {
-               sound (ent, chan, snd, (W_DualWielding(ent) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
+               sound(ent, chan, snd, (W_DualWielding(ent) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
                W_PlayStrengthSound(ent);
        }
 
@@ -336,8 +336,7 @@ void fireBullet_trace_callback(vector start, vector hit, vector end)
        fireBullet_last_hit = NULL;
 }
 
-int autocvar_eff;
-void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effects)
+void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effect)
 {
        vector  end;
 
@@ -345,18 +344,7 @@ void fireBullet(entity this, .entity weaponentity, vector start, vector dir, flo
        end = start + dir * max_shot_distance;
 
        fireBullet_last_hit = NULL;
-
-       if (autocvar_eff == 1) {
-               tracer_effects = EFFECT_RIFLE;
-       } else if (autocvar_eff == 2) {
-               tracer_effects = EFFECT_RIFLE_WEAK;
-       } else if (autocvar_eff == 3) {
-               tracer_effects = EFFECT_BULLET;
-       } else if (autocvar_eff == 4) {
-               tracer_effects = EFFECT_BULLET_WEAK;
-       }
-
-       fireBullet_trace_callback_eff = tracer_effects;
+       fireBullet_trace_callback_eff = tracer_effect;
 
        float solid_penetration_left = 1;
        float total_damage = 0;