Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
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::~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, CONTENT_TYPE_CACHE_MAX, MapBlock::contents, countObjects(), MapBlock::do_not_cache_contents, MapNode::getContent(), Map::getNode(), MapBlock::getNodeNoCheck(), MapBlock::getPosRelative(), ServerEnvironment::getServerMap(), MapBlock::isOrphan(), 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 StaticObjectList::getActiveSize(), Map::getBlockNoCreateNoEx(), MapBlock::getPos(), MapBlock::m_static_objects, and StaticObjectList::size().

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: