|
@@ -1335,13 +1335,8 @@ export class MoveService implements OnModuleInit {
|
|
|
}
|
|
|
|
|
|
complementFrame(userId) {
|
|
|
- if (this.cameraInfos == null) {
|
|
|
- console.log('handlejoysticktesttest:complementFrame-1 结束'+new Date().getTime())
|
|
|
- this.cameraInfos = [];
|
|
|
- return null;
|
|
|
- }
|
|
|
- else if (this.cameraInfos.length > 0) {
|
|
|
- console.log('handlejoysticktesttest:complementFrame-2 继续'+new Date().getTime())
|
|
|
+ if (this.cameraInfos.length > 0) {
|
|
|
+ //console.log('handlejoysticktesttest:complementFrame-2 继续'+new Date().getTime())
|
|
|
const user = this.users[userId];
|
|
|
const cameraInfo = this.cameraInfos.shift();
|
|
|
this.reply.traceIds = [];
|
|
@@ -1380,9 +1375,13 @@ export class MoveService implements OnModuleInit {
|
|
|
return this.reply;
|
|
|
}
|
|
|
else if (this.cameraInfos.length == 0){
|
|
|
- console.log('handlejoysticktesttest:complementFrame-3 停止'+new Date().getTime())
|
|
|
- this.cameraInfos = null;
|
|
|
- return this.stopJoystick(userId)
|
|
|
+ //console.log('handlejoysticktesttest:complementFrame-3 停止'+new Date().getTime())
|
|
|
+ if(this.reply['newUserStates'][0].renderInfo.isMoving == 1){
|
|
|
+ return this.stopJoystick(userId)
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|