URL:
<http://gna.org/bugs/?15296>
Summary: lua: wesnoth.find_path called with viewing_side=0
(or other invalid side) doesn't ignore shroud/fog
Project: Battle for Wesnoth
Submitted by: anonymissimus
Submitted on: Sonntag 07.02.2010 um 00:16
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.7.10
Operating System: Linux
_______________________________________________________
Details:
(Turning shroud/fog off with :shroud and :fog makes it find the path.)
[side]
side=1
#...
shroud=yes
fog=yes
[/side]
[side]
side=2
controller=ai
no_leader=yes
[/side]
#...
[event]
name=turn 2
[unit]
type=Troll
x,y=3,3
side=1
id=Testtroll
max_moves=1
[/unit]
[lua]
code=<<
local Troll=wesnoth.get_units({x=3, y=3})[1]
local path, cost=wesnoth.find_path(Troll, 1, 1,
{viewing_side=0} )
--wesnoth.message(cost)
--viewing_side=0: no path (bad); =1: no path
(ok); =2 path found (ok)
if cost<5 then
wesnoth.message("path found")
end
>>
[/lua]
[/event]
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?15296>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs