|
@@ -25,7 +25,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
private rotateService: RotateService,
|
|
|
private moveService: MoveService,
|
|
|
private getRouterService: GetRouterService, // @InjectQueue('rotate') private rotateQueue: Queue, // @InjectQueue('walking') private walkingQueue: Queue,
|
|
|
- ) { }
|
|
|
+ ) {}
|
|
|
@Client(grpcClientOptions) private readonly client: ClientGrpc;
|
|
|
|
|
|
public _frameInteval: NodeJS.Timeout;
|
|
@@ -337,14 +337,16 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
|
|
|
async walking(req) {
|
|
|
try {
|
|
|
- if (this.clickQueueSub) {
|
|
|
- this.clickQueueSub.unsubscribe();
|
|
|
- this.clickQueueSub = null;
|
|
|
- }
|
|
|
- this.clickQueue.next(req);
|
|
|
- console.log('walking', this.clickQueueSub, JSON.stringify(req));
|
|
|
+ // if (this.clickQueueSub) {
|
|
|
+ // this.clickQueueSub.unsubscribe();
|
|
|
+ // this.clickQueueSub = null;
|
|
|
+ // }
|
|
|
+ // this.clickQueue.next(req);
|
|
|
+ // console.log('walking', this.clickQueueSub, JSON.stringify(req));
|
|
|
// if (!this.clickQueueSub) {
|
|
|
- this.clickQueueSub = this.clickQueue.subscribe(async (request) => {
|
|
|
+ // this.clickQueueSub = this.clickQueue.subscribe(async (request) => {
|
|
|
+
|
|
|
+ if (!this.onMoving.getValue()) {
|
|
|
const start = performance.now();
|
|
|
const user = this.moveService.users[this.user_id];
|
|
|
console.log('进入1 - searchRoad');
|
|
@@ -361,7 +363,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
return;
|
|
|
}
|
|
|
// debugger;
|
|
|
- const walkingRes = await this.moveService.move(path, request);
|
|
|
+ const walkingRes = await this.moveService.move(path, req);
|
|
|
|
|
|
// console.log('walking', walkingRes);
|
|
|
// debugger;
|
|
@@ -422,7 +424,8 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
this.resumeStream();
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
+ // });
|
|
|
// }
|
|
|
} catch (error) {
|
|
|
this.logger.error('walking', error);
|
|
@@ -768,7 +771,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
|
|
|
delete redisData.mediaSrc;
|
|
|
this.logger.log(
|
|
|
`user:${this.user_id}:first render stream` +
|
|
|
- JSON.stringify({ path: clipPath, meta: redisData }),
|
|
|
+ JSON.stringify({ path: clipPath, meta: redisData }),
|
|
|
);
|
|
|
const status = await this.pushFirstRender(
|
|
|
clipPath,
|