From 95819865504f652174feaaab76788734482c05ca Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 18 Jun 2017 09:16:42 +1000 Subject: [PATCH] Minor optimization --- qcsrc/common/vehicles/sv_vehicles.qc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index fb9e89131..94f2f4f42 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -419,25 +419,25 @@ void vehicles_reset_colors(entity this) // Find all ents attacked to main model and setup effects, colormod etc. FOREACH_ENTITY_ENT(tag_entity, this, { - if(it != this.vehicle_shieldent) - { - it.effects = eff; - it.colormod = cmod; - it.colormap = cmap; - it.alpha = 1; - } + if(it == this.vehicle_shieldent) + continue; + + it.effects = eff; + it.colormod = cmod; + it.colormap = cmap; + it.alpha = 1; }); // Also check head tags FOREACH_ENTITY_ENT(tag_entity, this.tur_head, { - if(it != this.vehicle_shieldent) - { - it.effects = eff; - it.colormod = cmod; - it.colormap = cmap; - it.alpha = 1; - } + if(it == this.vehicle_shieldent) + continue; + + it.effects = eff; + it.colormod = cmod; + it.colormap = cmap; + it.alpha = 1; }); this.vehicle_hudmodel.effects = this.effects = eff; // | EF_LOWPRECISION; -- 2.39.2