mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Reduce ServerEnvironment propagation (#9642)
ServerEnvironment is a huge class with many accessors. In various places it's not needed Remove it to reduce the ServerEnvironment view. Idea here is to reduce size of some of our objects to transport lightweight managers and permit easier testing Pathfinder is now tied to a generic map, not a ServerMap, it can be ported to client
This commit is contained in:
@@ -29,7 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
/* Forward declarations */
|
||||
/******************************************************************************/
|
||||
|
||||
class ServerEnvironment;
|
||||
class NodeDefManager;
|
||||
class Map;
|
||||
|
||||
/******************************************************************************/
|
||||
/* Typedefs and macros */
|
||||
@@ -54,10 +55,10 @@ typedef enum {
|
||||
/******************************************************************************/
|
||||
|
||||
/** c wrapper function to use from scriptapi */
|
||||
std::vector<v3s16> get_path(ServerEnvironment *env,
|
||||
v3s16 source,
|
||||
v3s16 destination,
|
||||
unsigned int searchdistance,
|
||||
unsigned int max_jump,
|
||||
unsigned int max_drop,
|
||||
PathAlgorithm algo);
|
||||
std::vector<v3s16> get_path(Map *map, const NodeDefManager *ndef,
|
||||
v3s16 source,
|
||||
v3s16 destination,
|
||||
unsigned int searchdistance,
|
||||
unsigned int max_jump,
|
||||
unsigned int max_drop,
|
||||
PathAlgorithm algo);
|
||||
|
Reference in New Issue
Block a user