]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minor optimization
authorMario <mario@smbclan.net>
Sat, 17 Jun 2017 23:16:42 +0000 (09:16 +1000)
committerMario <mario@smbclan.net>
Sat, 17 Jun 2017 23:16:42 +0000 (09:16 +1000)
qcsrc/common/vehicles/sv_vehicles.qc

index fb9e89131bcd26034bd1650c47b846666ba5c679..94f2f4f420650572564a59392ff08a77a621e06b 100644 (file)
@@ -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;