MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DeleteObject

Method DeleteObject

engine/Poseidon/Network/NetworkClientActions.cpp:2207–2240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2205 {
2206 NetworkRemoteObjectInfo& info = _remoteObjects[i];
2207 if (info.id == id)
2208 {
2209 return &info;
2210 }
2211 }
2212 return nullptr;
2213}
2214
2215NetworkObject* NetworkClient::GetObject(NetworkId& id)
2216{
2217 if (id.creator == 0)
2218 {
2219 return nullptr;
2220 }
2221 else if (id.creator == 1)
2222 {
2223 return GLandscape->FindObject(id.id);
2224 }
2225 else
2226 {
2227 NetworkRemoteObjectInfo* infoR = GetRemoteObjectInfo(id);
2228 if (infoR)
2229 {
2230 return infoR->object;
2231 }
2232 NetworkLocalObjectInfo* infoL = GetLocalObjectInfo(id);
2233 if (infoL)
2234 {
2235 return infoL->object;
2236 }
2237 return nullptr;
2238 }
2239}
2240
2241void NetworkClient::DeleteObject(NetworkId& id)
2242{
2243 if (id.IsNull())

Callers

nothing calls this directly

Calls 4

DiagLogFFunction · 0.85
IsNullMethod · 0.45
SizeMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected