mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 14:52:26 +00:00
Forced cost function to return a value >= 1.
This commit is contained in:
parent
fd19056bb5
commit
dbd845c5e6
@ -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…
x
Reference in New Issue
Block a user