Author: cazfi Date: Mon Aug 8 22:11:40 2016 New Revision: 33517 URL: http://svn.gna.org/viewcvs/freeciv?rev=33517&view=rev Log: Made extra to get drawn if drawing option matching any of its causes is enabled, or there's no drawing option associated with it at all.
See bug #24238 Modified: branches/S2_6/client/tilespec.c Modified: branches/S2_6/client/tilespec.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/tilespec.c?rev=33517&r1=33516&r2=33517&view=diff ============================================================================== --- branches/S2_6/client/tilespec.c (original) +++ branches/S2_6/client/tilespec.c Mon Aug 8 22:11:40 2016 @@ -5123,39 +5123,47 @@ ****************************************************************************/ static bool is_extra_drawing_enabled(struct extra_type *pextra) { + bool no_disable = TRUE; /* Draw if matches no cause */ + if (is_extra_caused_by(pextra, EC_IRRIGATION)) { - if (!gui_options.draw_irrigation) { - return FALSE; - } + if (gui_options.draw_irrigation) { + return TRUE; + } + no_disable = FALSE; } if (is_extra_caused_by(pextra, EC_POLLUTION) || is_extra_caused_by(pextra, EC_FALLOUT)) { - if (!gui_options.draw_pollution) { - return FALSE; - } + if (gui_options.draw_pollution) { + return TRUE; + } + no_disable = FALSE; } if (is_extra_caused_by(pextra, EC_MINE)) { - if (!gui_options.draw_mines) { - return FALSE; - } + if (gui_options.draw_mines) { + return TRUE; + } + no_disable = FALSE; } if (is_extra_caused_by(pextra, EC_HUT)) { - if (!gui_options.draw_huts) { - return FALSE; - } + if (gui_options.draw_huts) { + return TRUE; + } + no_disable = FALSE; } if (is_extra_caused_by(pextra, EC_BASE)) { - if (!gui_options.draw_fortress_airbase) { - return FALSE; - } + if (gui_options.draw_fortress_airbase) { + return TRUE; + } + no_disable = FALSE; } if (is_extra_caused_by(pextra, EC_ROAD)) { - if (!gui_options.draw_roads_rails) { - return FALSE; - } - } - - return TRUE; + if (gui_options.draw_roads_rails) { + return TRUE; + } + no_disable = FALSE; + } + + return no_disable; } /**************************************************************************** _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits