Commit c3ac2898 authored by nanahira's avatar nanahira

fix

parent 98f72b0c
...@@ -2902,7 +2902,7 @@ if settings.modules.mycard.enabled ...@@ -2902,7 +2902,7 @@ if settings.modules.mycard.enabled
if settings.modules.heartbeat_detection.enabled if settings.modules.heartbeat_detection.enabled
setInterval ()-> setInterval ()->
for room in ROOM_all when room and room.started and (room.hostinfo.time_limit == 0 or !room.turn or room.turn <= 0) and !room.windbot for room in ROOM_all when room and room.started and (room.hostinfo.time_limit == 0 or !room.turn or room.turn <= 0) and !room.windbot
for player in room.players when !room.changing_side or player.selected_preduel for player in room.get_playing_player() when player and (!room.changing_side or player.selected_preduel)
CLIENT_heartbeat_register(player, true) CLIENT_heartbeat_register(player, true)
return return
, settings.modules.heartbeat_detection.interval , settings.modules.heartbeat_detection.interval
......
...@@ -3681,10 +3681,10 @@ ...@@ -3681,10 +3681,10 @@
for (m = 0, len2 = ROOM_all.length; m < len2; m++) { for (m = 0, len2 = ROOM_all.length; m < len2; m++) {
room = ROOM_all[m]; room = ROOM_all[m];
if (room && room.started && (room.hostinfo.time_limit === 0 || !room.turn || room.turn <= 0) && !room.windbot) { if (room && room.started && (room.hostinfo.time_limit === 0 || !room.turn || room.turn <= 0) && !room.windbot) {
ref2 = room.players; ref2 = room.get_playing_player();
for (n = 0, len3 = ref2.length; n < len3; n++) { for (n = 0, len3 = ref2.length; n < len3; n++) {
player = ref2[n]; player = ref2[n];
if (!room.changing_side || player.selected_preduel) { if (player && (!room.changing_side || player.selected_preduel)) {
CLIENT_heartbeat_register(player, true); CLIENT_heartbeat_register(player, true);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment