maestro refacto to grrom, getpositions actions transfered to Observer, changed to frustum, with subscription
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
|
||||
export class ArenaAgentLoader {
|
||||
|
||||
constructor(arenaCnx, storage, debug = false) {
|
||||
constructor(arenaCnx, arenaStorage, debug = false) {
|
||||
this.cnx = arenaCnx
|
||||
this.storage = storage
|
||||
this.arenaStorage = arenaStorage
|
||||
this.debug = debug
|
||||
}
|
||||
|
||||
@@ -45,11 +45,11 @@ export class ArenaAgentLoader {
|
||||
|
||||
async #listAgentIds(expectedIds = null) {
|
||||
if(Array.isArray(expectedIds) && expectedIds.length) return([...expectedIds])
|
||||
return(await this.cnx.redisSmembers(this.storage.agentsIndexKey))
|
||||
return(await this.cnx.redisSmembers(this.arenaStorage.agentsIndexKey))
|
||||
}
|
||||
|
||||
async #loadAgentFromHash(agentId) {
|
||||
const key = this.storage.agentHashKey.replace(/\[UID\]/g, agentId)
|
||||
const key = this.arenaStorage.agentHashKey.replace(/\[UID\]/g, agentId)
|
||||
const positionRaw = await this.cnx.redisHget(key, 'position')
|
||||
const vectorRaw = await this.cnx.redisHget(key, 'vector')
|
||||
let position = this.#parseHashField(positionRaw)
|
||||
|
||||
Reference in New Issue
Block a user