MCPcopy Create free account
hub / github.com/Segs/Segs / getEntityOriginIndex

Function getEntityOriginIndex

Projects/CoX/Common/GameData/GameDataStore.cpp:601–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601int getEntityOriginIndex(const GameDataStore &data, bool is_player, const QString &origin_name)
602{
603 const Parse_AllOrigins &origins_to_search(is_player ? data.m_player_origins : data.m_other_origins);
604
605 int idx = 0;
606 for(const Parse_Origin &orig : origins_to_search)
607 {
608 if(origin_name.compare(orig.Name,Qt::CaseInsensitive)==0)
609 return idx;
610 idx++;
611 }
612 qCDebug(logNpcSpawn) << "Failed to locate origin index for" << origin_name;
613 return -1;
614}
615int getEntityClassIndex(const GameDataStore &data, bool is_player, const QString &class_name)
616{
617 const Parse_AllCharClasses &classes_to_search(is_player ? data.m_player_classes : data.m_other_classes);

Callers 2

fillFromCharacterMethod · 0.85

Calls 1

compareMethod · 0.80

Tested by

no test coverage detected