Author: anonymissimus
Date: Mon Oct 10 19:12:11 2011
New Revision: 51436

URL: http://svn.gna.org/viewcvs/wesnoth?rev=51436&view=rev
Log:
Reintroduce (again) (deprecated) support for [teleport]ignore_passability=,
check_passability= is ignored if present.

I changed that key in r48676 (shame on me...).

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=51436&r1=51435&r2=51436&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Mon Oct 10 19:12:11 2011
@@ -758,7 +758,14 @@
        if (dst == u->get_location() || !resources::game_map->on_board(dst)) 
return;
 
        const unit* pass_check = NULL;
-       if (cfg["check_passability"].to_bool(true))
+       //@deprecated ignore_passability 1.9.10
+       const config::attribute_value& ignore_passability = 
cfg["ignore_passability"];
+       if (!ignore_passability.blank()) {
+               WRN_NG << "[teleport]ignore_passability= is deprecated, use 
check_passability=\n";
+                       if (!ignore_passability.to_bool(false))
+                               pass_check = &*u;
+       }
+       else if (cfg["check_passability"].to_bool(true))
                pass_check = &*u;
        const map_location vacant_dst = find_vacant_tile(*resources::game_map, 
*resources::units, dst, pathfind::VACANT_ANY, pass_check);
        if (!resources::game_map->on_board(vacant_dst)) return;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to