Minetest  5.4.0
ABMHandler Class Reference
+ Collaboration diagram for ABMHandler:

Public Member Functions

 ABMHandler (std::vector< ABMWithState > &abms, float dtime_s, ServerEnvironment *env, bool use_timers)
 
 ~ABMHandler ()
 
u32 countObjects (MapBlock *block, ServerMap *map, u32 &wider)
 
void apply (MapBlock *block, int &blocks_scanned, int &abms_run, int &blocks_cached)
 

Private Attributes

ServerEnvironmentm_env
 
std::vector< std::vector< ActiveABM > * > m_aabms
 

Constructor & Destructor Documentation

◆ ABMHandler()

ABMHandler::ABMHandler ( std::vector< ABMWithState > &  abms,
float  dtime_s,
ServerEnvironment env,
bool  use_timers 
)
inline

◆ ~ABMHandler()

ABMHandler::~ABMHandler ( )
inline

References m_aabms.

Member Function Documentation

◆ apply()

void ABMHandler::apply ( MapBlock block,
int &  blocks_scanned,
int &  abms_run,
int &  blocks_cached 
)
inline

References CONTAINS, MapBlock::contents, MapBlock::contents_cached, countObjects(), MapBlock::do_not_cache_contents, MapNode::getContent(), Map::getNode(), MapBlock::getNodeUnsafe(), MapBlock::getPosRelative(), ServerEnvironment::getServerMap(), MapBlock::isDummy(), MapBlock::isValidPosition(), m_aabms, Environment::m_added_objects, m_env, MAP_BLOCKSIZE, myrand(), and p().

Referenced by ServerEnvironment::step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ countObjects()

u32 ABMHandler::countObjects ( MapBlock block,
ServerMap map,
u32 &  wider 
)
inline

References Map::getBlockNoCreateNoEx(), MapBlock::getPos(), StaticObjectList::m_active, MapBlock::m_static_objects, and StaticObjectList::m_stored.

Referenced by apply().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_aabms

std::vector<std::vector<ActiveABM> *> ABMHandler::m_aabms
private

Referenced by ABMHandler(), ~ABMHandler(), and apply().

◆ m_env

ServerEnvironment* ABMHandler::m_env
private

Referenced by apply().


The documentation for this class was generated from the following file: