gemercheung 3 роки тому
батько
коміт
3a726c6a5e
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      src/scene/scene.service.ts

+ 2 - 1
src/scene/scene.service.ts

@@ -609,6 +609,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
           //const lastReply = JSON.stringify(joystickRes);
           //this.moveService.updateUser(userId, breakPointId, lastReply);
         }
+        // 共用_JoyStickingTimeout
         clearTimeout(this._JoyStickingTimeout);
         this._JoyStickingTimeout = setTimeout(() => {
           // const complementFrame = this.moveService.complementFrame(
@@ -700,9 +701,9 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
                 if (complementFrame) {
                   pushJoyStickSteam(complementFrame);
                 } else {
+                  this.moveService.stopJoystick(this.user_id);
                   this.onJoysticking.next(false);
                   this.resumeStream();
-                  this.joystickFrameCnt = -1;
                 }
               }, 200);
             } else {