32 return !(cost >= 1.) ? 1. :
cost;
bool luaW_pcall(lua_State *L, int nArgs, int nRets, bool allow_wml_error)
Calls a Lua function stored below its nArgs arguments at the top of the stack.
double cost(const map_location &loc, const double so_far) const
#define lua_tonumber(L, i)
lua_pathfind_cost_calculator(lua_State *L_, int i)
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
Encapsulates the map of the game.
Cost function object relying on a Lua function.
LUA_API void lua_pushvalue(lua_State *L, int idx)
LUA_API void lua_pushinteger(lua_State *L, lua_Integer n)
This module contains various pathfinding functions and utilities.