From: Mario Date: Sat, 17 Jun 2017 23:16:42 +0000 (+1000) Subject: Minor optimization X-Git-Tag: xonotic-v0.8.5~2728 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=95819865504f652174feaaab76788734482c05ca;p=xonotic%2Fxonotic-data.pk3dir.git Minor optimization --- 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;