|
@@ -129,6 +129,7 @@ export class MoveService implements OnModuleInit {
|
|
|
private breakPointInfo: any;
|
|
|
|
|
|
private cameraInfos = [];
|
|
|
+ public sendingFrameForJoystick = false;
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
|
async onModuleInit() {
|
|
@@ -777,7 +778,13 @@ export class MoveService implements OnModuleInit {
|
|
|
// }
|
|
|
|
|
|
async joystick(actionRequest) {
|
|
|
- try {
|
|
|
+ //try {
|
|
|
+
|
|
|
+
|
|
|
+ if(this.sendingFrameForJoystick){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
const userId = actionRequest['user_id'];
|
|
|
const traceId = actionRequest['trace_id'];
|
|
|
const dir_action = actionRequest['dir_action'];
|
|
@@ -1023,16 +1030,18 @@ export class MoveService implements OnModuleInit {
|
|
|
if(this.cameraInfos.length == 0){
|
|
|
this.reply.moveOver = true;
|
|
|
}
|
|
|
+ this.sendingFrameForJoystick = true;
|
|
|
} else {
|
|
|
console.log('joystick自由--->不合并');
|
|
|
}
|
|
|
return this.reply;
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- console.log('MoveService', error);
|
|
|
- debugger;
|
|
|
- return null;
|
|
|
- }
|
|
|
+ // }
|
|
|
+ // catch (error) {
|
|
|
+ // console.log('MoveService', error);
|
|
|
+ // debugger;
|
|
|
+ // return null;
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
//沿着最合适的neighBreakPointId走
|
|
@@ -1102,6 +1111,7 @@ export class MoveService implements OnModuleInit {
|
|
|
if(this.cameraInfos.length == 0){
|
|
|
this.reply.moveOver = true;
|
|
|
}
|
|
|
+ this.sendingFrameForJoystick = true;
|
|
|
}
|
|
|
return this.reply;
|
|
|
}
|
|
@@ -1212,13 +1222,9 @@ export class MoveService implements OnModuleInit {
|
|
|
debugger;
|
|
|
}
|
|
|
this.reply.moveStart = true;
|
|
|
+ this.sendingFrameForJoystick = true;
|
|
|
}
|
|
|
return this.reply;
|
|
|
- // user.camera.position = JSON.parse(
|
|
|
- // JSON.stringify(lastFrame.camera_position),
|
|
|
- // );
|
|
|
- // user.camera.angle.yaw = lastFrame.camera_angle.yaw;
|
|
|
- // return replys;
|
|
|
}
|
|
|
}
|
|
|
|