@@ -3,6 +3,7 @@ let global_cy = undefined;
33let global_eh = undefined ;
44var NetworkUpdateTimeoutId = - 1 ;
55let NetworkCache = [ ] ;
6+ let lastSimulationId = 0
67
78let packetsNotFiltered = null ;
89let packetFilterState = {
@@ -1305,7 +1306,7 @@ const CheckSimulation = function (simulation_id)
13051306 url : '/check_simulation?simulation_id=' + simulation_id + '&network_guid=' + network_guid ,
13061307 data : '' ,
13071308 success : function ( data , textStatus , xhr ) {
1308-
1309+ lastSimulationId = data . simulation_id
13091310 // If we got 210 (processing) wait 2 sec and call themself again
13101311 if ( xhr . status === 210 )
13111312 {
@@ -1330,7 +1331,9 @@ const CheckSimulation = function (simulation_id)
13301331 } ,
13311332 error : function ( xhr ) {
13321333 console . log ( 'Cannot check simulation id = ' + simulation_id ) ;
1333- SetNetworkPlayerState ( - 1 ) ;
1334+ if ( lastSimulationId == simulation_id ) {
1335+ SetNetworkPlayerState ( - 1 ) ;
1336+ }
13341337 } ,
13351338 contentType : "application/json" ,
13361339 dataType : 'json'
@@ -1386,8 +1389,8 @@ const InsertWaitingTimeHelper = function(time_filter) {
13861389 data : '' ,
13871390 success : function ( data ) {
13881391 const queue_size = parseInt ( data . size ) ;
1389-
1390- if ( $ ( '#NetworkPlayerLabel ' ) . text ( ) . startsWith ( "Шаг:" ) ) {
1392+ if ( ! $ ( '#NetworkPlayer button:first' ) . prop ( 'disabled' ) ) {
1393+ console . log ( $ ( '#NetworkPlayer button:first ' ) . prop ( 'disabled' ) )
13911394 return ;
13921395 } else if ( queue_size <= 1 ) {
13931396 $ ( '#NetworkPlayerLabel' ) . text ( "Ожидание 10-15 сек." ) ;
0 commit comments