Author: anonymissimus
Date: Sat Feb 26 23:24:12 2011
New Revision: 48653
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48653&view=rev
Log:
Made [unstore_unit]find_vacant=yes check for terrain passability too, not only
for being empty.
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=48653&r1=48652&r2=48653&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sat Feb 26 23:24:12 2011
@@ -2026,7 +2026,12 @@
(cfg.has_attribute("x") && cfg.has_attribute("y")) ?
cfg : vconfig(var));
if(loc.valid()) {
if (cfg["find_vacant"].to_bool()) {
- loc =
pathfind::find_vacant_tile(*resources::game_map, *resources::units,loc);
+ loc = pathfind::find_vacant_tile(
+ *resources::game_map,
+ *resources::units,
+ loc,
+ pathfind::VACANT_ANY,
+ &u);
}
resources::units->erase(loc);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits