Author: cazfi
Date: Fri Dec 12 20:08:57 2014
New Revision: 27277

URL: http://svn.gna.org/viewcvs/freeciv?rev=27277&view=rev
Log:
Build tile data only when collecting sprites for a layer that depends on it.

See patch #5449

Modified:
    branches/S2_5/client/tilespec.c

Modified: branches/S2_5/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/tilespec.c?rev=27277&r1=27276&r2=27277&view=diff
==============================================================================
--- branches/S2_5/client/tilespec.c     (original)
+++ branches/S2_5/client/tilespec.c     Fri Dec 12 20:08:57 2014
@@ -4801,8 +4801,14 @@
     pterrain = tile_terrain(ptile);
 
     if (NULL != pterrain) {
-      build_tile_data(ptile, pterrain, tterrain_near, tspecial_near,
-                      troad_near);
+      if (layer == LAYER_TERRAIN1
+          || layer == LAYER_TERRAIN2
+          || layer == LAYER_TERRAIN3
+          || layer == LAYER_WATER
+          || layer == LAYER_ROADS) {
+        build_tile_data(ptile, pterrain, tterrain_near, tspecial_near,
+                        troad_near);
+      }
     } else {
       log_error("fill_sprite_array() tile (%d,%d) has no terrain!",
                 TILE_XY(ptile));


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to