Forced cost function to return a value >= 1.
This commit is contained in:
parent
fd19056bb5
commit
dbd845c5e6
1 changed files with 1 additions and 1 deletions
|
@ -1378,7 +1378,7 @@ double lua_calculator::cost(const map_location &loc, double so_far) const
|
|||
|
||||
double cost = lua_tonumber(L, -1);
|
||||
lua_pop(L, 2);
|
||||
return cost;
|
||||
return !(cost >= 1.) ? 1. : cost;
|
||||
}
|
||||
|
||||
lua_calculator::~lua_calculator()
|
||||
|
|
Loading…
Add table
Reference in a new issue