| 2205 | { |
| 2206 | NetworkRemoteObjectInfo& info = _remoteObjects[i]; |
| 2207 | if (info.id == id) |
| 2208 | { |
| 2209 | return &info; |
| 2210 | } |
| 2211 | } |
| 2212 | return nullptr; |
| 2213 | } |
| 2214 | |
| 2215 | NetworkObject* 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 | |
| 2241 | void NetworkClient::DeleteObject(NetworkId& id) |
| 2242 | { |
| 2243 | if (id.IsNull()) |