MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / FindDataMapInfo

Method FindDataMapInfo

core/HalfLife2.cpp:503–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503bool CHalfLife2::FindDataMapInfo(datamap_t *pMap, const char *offset, sm_datatable_info_t *pDataTable)
504{
505 DataTableMap::Insert i = m_Maps.findForAdd(pMap);
506 if (!i.found())
507 m_Maps.add(i, pMap, new DataMapCache());
508
509 DataMapCache *cache = i->value;
510 DataMapCacheInfo temp;
511
512 if (!cache->retrieve(offset, &temp))
513 {
514 bool found = UTIL_FindDataMapInfo(pMap, offset, &temp.info);
515 temp.name = offset;
516
517 cache->insert(offset, temp);
518
519 if (found)
520 {
521 *pDataTable = temp.info;
522 }
523
524 return found;
525 }
526
527 *pDataTable = temp.info;
528 return pDataTable->prop != nullptr;
529}
530
531void CHalfLife2::SetEdictStateChanged(edict_t *pEdict, unsigned short offset)
532{

Callers 12

FindInDataMapMethod · 0.95
RemoveEntityFunction · 0.80
FindDataMapOffsFunction · 0.80
FindDataMapInfoFunction · 0.80
SetEntPropStringFunction · 0.80
GetEntityFlagsFunction · 0.80
SetEntityFlagsFunction · 0.80
CollisionRulesChangedFunction · 0.80
vhelpers.cppFile · 0.80
SlapPlayerFunction · 0.80
SetEntityCollisionGroupFunction · 0.80

Calls 5

UTIL_FindDataMapInfoFunction · 0.85
findForAddMethod · 0.45
addMethod · 0.45
retrieveMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected