Author: anonymissimus
Date: Sun Feb 27 00:03:03 2011
New Revision: 48654
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48654&view=rev
Log:
Instead of forcefully checking for terrain, introduced
[unstore_unit]ignore_passability= (def no) key as in [teleport]. Only in effect
if find_vacant=yes.
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=48654&r1=48653&r2=48654&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sun Feb 27 00:03:03 2011
@@ -2026,12 +2026,14 @@
(cfg.has_attribute("x") && cfg.has_attribute("y")) ?
cfg : vconfig(var));
if(loc.valid()) {
if (cfg["find_vacant"].to_bool()) {
+ const unit* pass_check = &u;
+ if (cfg["ignore_passability"].to_bool(false))
pass_check = 0;
loc = pathfind::find_vacant_tile(
- *resources::game_map,
- *resources::units,
- loc,
- pathfind::VACANT_ANY,
- &u);
+ *resources::game_map,
+ *resources::units,
+ loc,
+ pathfind::VACANT_ANY,
+ pass_check);
}
resources::units->erase(loc);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits