mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
add Space::getRegion(id)
This commit is contained in:
parent
89b8ce2b01
commit
b96a4ed4be
2 changed files with 5 additions and 0 deletions
|
@ -127,6 +127,10 @@ const Owner Space::getOwner(int32_t proxyID) const {
|
||||||
return Owner();
|
return Owner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t Space::getRegion(int32_t proxyID) const {
|
||||||
|
return _IDAllocator.checkIndex(proxyID) ? _proxies[proxyID].region : Region::INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
void Space::clear() {
|
void Space::clear() {
|
||||||
std::unique_lock<std::mutex> lock(_proxiesMutex);
|
std::unique_lock<std::mutex> lock(_proxiesMutex);
|
||||||
_IDAllocator.clear();
|
_IDAllocator.clear();
|
||||||
|
|
|
@ -49,6 +49,7 @@ public:
|
||||||
uint32_t copyProxyValues(Proxy* proxies, uint32_t numDestProxies) const;
|
uint32_t copyProxyValues(Proxy* proxies, uint32_t numDestProxies) const;
|
||||||
|
|
||||||
const Owner getOwner(int32_t proxyID) const;
|
const Owner getOwner(int32_t proxyID) const;
|
||||||
|
uint8_t getRegion(int32_t proxyID) const;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue