MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / AddMapLocation

Method AddMapLocation

ogsr_engine/xrGame/map_manager.cpp:111–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 m_locations->registry().init(id); // actor's id
110}
111CMapLocation* CMapManager::AddMapLocation(const shared_str& spot_type, u16 id)
112{
113 FindLocationBySpotID key(spot_type, id);
114 Locations_it it = std::find_if(Locations().begin(), Locations().end(), key);
115 if (it == Locations().end())
116 {
117 CMapLocation* l = xr_new<CMapLocation>(*key.spot_id, key.object_id);
118 Locations().emplace_back(key.spot_id, key.object_id).location = l;
119 if (g_actor)
120 Actor()->callback(GameObject::eMapLocationAdded)(*spot_type, id);
121 return l;
122 }
123 else
124 (*it).location->AddRef();
125
126 return (*it).location;
127}
128
129CMapLocation* CMapManager::AddRelationLocation(CInventoryOwner* pInvOwner)
130{

Callers 10

map_add_object_spotFunction · 0.80
map_add_object_spot_serFunction · 0.80
net_SpawnMethod · 0.80
HitSectorMethod · 0.80
GiveGameTaskToActorMethod · 0.80
SetTaskStateMethod · 0.80
UpdateCLMethod · 0.80
AddRemoveMapSpotMethod · 0.80
net_SpawnMethod · 0.80
updateMethod · 0.80

Calls 6

find_ifClass · 0.85
ActorFunction · 0.85
AddRefMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
callbackMethod · 0.45

Tested by

no test coverage detected