mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Remove invisible check
This commit is contained in:
+18
-29
@@ -8317,28 +8317,24 @@ speechSynthesis.getVoices();
|
|||||||
workerTimers.setTimeout(() => this.photonLobbyWatcher(), 500);
|
workerTimers.setTimeout(() => this.photonLobbyWatcher(), 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.photonBotCheck = function () {
|
$app.methods.photonBotCheck = function (dtNow) {
|
||||||
var photonBots = [];
|
var photonBots = [];
|
||||||
this.photonLobbyCurrent.forEach((ref, id) => {
|
this.photonLobbyCurrent.forEach((ref, id) => {
|
||||||
if (this.photonLobbyJointime.has(id)) {
|
if (this.photonLobbyJointime.has(id)) {
|
||||||
// dtNow, var {joinTime, hasInstantiated, isInvisible, avatarEyeHeight}
|
var {joinTime, hasInstantiated, avatarEyeHeight} =
|
||||||
var {isInvisible, avatarEyeHeight} =
|
|
||||||
this.photonLobbyJointime.get(id);
|
this.photonLobbyJointime.get(id);
|
||||||
}
|
}
|
||||||
var text = '';
|
var text = '';
|
||||||
if (isInvisible) {
|
if (avatarEyeHeight < 0) {
|
||||||
text = 'User has joined invisible';
|
|
||||||
} else if (avatarEyeHeight < 0) {
|
|
||||||
text = 'Photon bot has joined, invalid avatarEyeHeight';
|
text = 'Photon bot has joined, invalid avatarEyeHeight';
|
||||||
|
} else if (
|
||||||
|
joinTime &&
|
||||||
|
joinTime + 11000 < dtNow &&
|
||||||
|
!hasInstantiated
|
||||||
|
) {
|
||||||
|
text =
|
||||||
|
'Potential photon bot has joined, failed to instantiate after 10 seconds';
|
||||||
}
|
}
|
||||||
// else if (
|
|
||||||
// joinTime &&
|
|
||||||
// joinTime + 10000 < dtNow &&
|
|
||||||
// !hasInstantiated
|
|
||||||
// ) {
|
|
||||||
// text =
|
|
||||||
// 'Photon bot has joined, failed to instantiate after 10 seconds';
|
|
||||||
// }
|
|
||||||
if (text && id !== this.photonLobbyCurrentUser) {
|
if (text && id !== this.photonLobbyCurrentUser) {
|
||||||
if (!this.photonLobbyBots.includes(id)) {
|
if (!this.photonLobbyBots.includes(id)) {
|
||||||
this.addEntryPhotonEvent({
|
this.addEntryPhotonEvent({
|
||||||
@@ -8585,7 +8581,6 @@ speechSynthesis.getVoices();
|
|||||||
this.photonLobbyJointime.set(data.Parameters[254], {
|
this.photonLobbyJointime.set(data.Parameters[254], {
|
||||||
joinTime: Date.parse(gameLogDate),
|
joinTime: Date.parse(gameLogDate),
|
||||||
hasInstantiated,
|
hasInstantiated,
|
||||||
isInvisible: data.Parameters[249].isInvisible,
|
|
||||||
inVRMode: data.Parameters[249].inVRMode,
|
inVRMode: data.Parameters[249].inVRMode,
|
||||||
avatarEyeHeight: data.Parameters[249].avatarEyeHeight
|
avatarEyeHeight: data.Parameters[249].avatarEyeHeight
|
||||||
});
|
});
|
||||||
@@ -8909,10 +8904,7 @@ speechSynthesis.getVoices();
|
|||||||
platforms.push(unityPackage.platform);
|
platforms.push(unityPackage.platform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.isInvisible) {
|
if (data.avatarEyeHeight < 0) {
|
||||||
text = 'User has joined invisible';
|
|
||||||
this.photonLobbyBots.unshift(photonId);
|
|
||||||
} else if (data.avatarEyeHeight < 0) {
|
|
||||||
text = 'Photon bot has joined, invalid avatarEyeHeight';
|
text = 'Photon bot has joined, invalid avatarEyeHeight';
|
||||||
this.photonLobbyBots.unshift(photonId);
|
this.photonLobbyBots.unshift(photonId);
|
||||||
} else if (data.user.last_platform === 'android' && !data.inVRMode) {
|
} else if (data.user.last_platform === 'android' && !data.inVRMode) {
|
||||||
@@ -8952,14 +8944,13 @@ speechSynthesis.getVoices();
|
|||||||
var time = timeToText(Date.now() - lobbyJointime.joinTime);
|
var time = timeToText(Date.now() - lobbyJointime.joinTime);
|
||||||
text = `Photon bot has left ${time}`;
|
text = `Photon bot has left ${time}`;
|
||||||
}
|
}
|
||||||
|
} else if (
|
||||||
|
typeof lobbyJointime !== 'undefined' &&
|
||||||
|
!lobbyJointime.hasInstantiated
|
||||||
|
) {
|
||||||
|
var time = timeToText(Date.now() - lobbyJointime.joinTime);
|
||||||
|
text = `Bot/Player left without instantiating ${time}`;
|
||||||
}
|
}
|
||||||
// else if (
|
|
||||||
// typeof lobbyJointime !== 'undefined' &&
|
|
||||||
// !lobbyJointime.hasInstantiated
|
|
||||||
// ) {
|
|
||||||
// var time = timeToText(Date.now() - lobbyJointime.joinTime);
|
|
||||||
// text = `Bot/Player left without instantiating ${time}`;
|
|
||||||
// }
|
|
||||||
if (text) {
|
if (text) {
|
||||||
this.addEntryPhotonEvent({
|
this.addEntryPhotonEvent({
|
||||||
photonId,
|
photonId,
|
||||||
@@ -9054,8 +9045,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.photonUserJoin = function (photonId, ref, gameLogDate) {
|
$app.methods.photonUserJoin = function (photonId, ref, gameLogDate) {
|
||||||
if (
|
if (
|
||||||
typeof ref === 'undefined' ||
|
photonId !== this.photonLobbyCurrentUser &&
|
||||||
ref.id === API.currentUser.id ||
|
|
||||||
!this.photonEventOverlayJoinLeave
|
!this.photonEventOverlayJoinLeave
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
@@ -18800,7 +18790,6 @@ speechSynthesis.getVoices();
|
|||||||
this.photonLobbyJointime.set(id, {
|
this.photonLobbyJointime.set(id, {
|
||||||
joinTime: Date.parse(dateTime),
|
joinTime: Date.parse(dateTime),
|
||||||
hasInstantiated: false,
|
hasInstantiated: false,
|
||||||
isInvisible: user.isInvisible,
|
|
||||||
inVRMode: user.inVRMode,
|
inVRMode: user.inVRMode,
|
||||||
avatarEyeHeight: user.avatarEyeHeight
|
avatarEyeHeight: user.avatarEyeHeight
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user