mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Use instance player list for onPlayerJoining
This commit is contained in:
+6
-13
@@ -3669,7 +3669,7 @@ speechSynthesis.getVoices();
|
|||||||
var notyFeed = [];
|
var notyFeed = [];
|
||||||
notyFeed = notyFeed.concat(feeds.gameLog.noty, feeds.feedTable.noty, feeds.notificationTable.noty, feeds.friendLogTable.noty, feeds.playerModerationTable.noty);
|
notyFeed = notyFeed.concat(feeds.gameLog.noty, feeds.feedTable.noty, feeds.notificationTable.noty, feeds.friendLogTable.noty, feeds.playerModerationTable.noty);
|
||||||
// OnPlayerJoining
|
// OnPlayerJoining
|
||||||
var locationBias = Date.now() - 15000; //15 seconds
|
var locationBias = Date.now() - 30000; //30 seconds
|
||||||
if ((this.isGameRunning) && (this.lastLocation.date < locationBias) &&
|
if ((this.isGameRunning) && (this.lastLocation.date < locationBias) &&
|
||||||
((this.sharedFeedFilters.wrist.OnPlayerJoining === 'Friends') || (this.sharedFeedFilters.wrist.OnPlayerJoining === 'VIP') ||
|
((this.sharedFeedFilters.wrist.OnPlayerJoining === 'Friends') || (this.sharedFeedFilters.wrist.OnPlayerJoining === 'VIP') ||
|
||||||
(this.sharedFeedFilters.noty.OnPlayerJoining === 'Friends') || (this.sharedFeedFilters.noty.OnPlayerJoining === 'VIP'))) {
|
(this.sharedFeedFilters.noty.OnPlayerJoining === 'Friends') || (this.sharedFeedFilters.noty.OnPlayerJoining === 'VIP'))) {
|
||||||
@@ -3683,20 +3683,13 @@ speechSynthesis.getVoices();
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var joining = true;
|
var joining = true;
|
||||||
var gameLogTable = this.gameLogTable.data;
|
var playersInInstance = this.lastLocation.playerList;
|
||||||
for (var k = gameLogTable.length - 1; k > -1; k--) {
|
for (var i = 0; i < playersInInstance.length; i++) {
|
||||||
var gameLogItem = gameLogTable[k];
|
var player = playersInInstance[i];
|
||||||
if (gameLogItem.type === 'Notification') {
|
if (player === ctx.displayName) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ((gameLogItem.type === 'OnPlayerJoined') && (gameLogItem.data === ctx.displayName)) {
|
|
||||||
joining = false;
|
joining = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((gameLogItem.type === 'Location') ||
|
|
||||||
(gameLogItem.type === 'OnPlayerLeft') && (gameLogItem.data === ctx.displayName)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (joining) {
|
if (joining) {
|
||||||
var onPlayerJoining = {
|
var onPlayerJoining = {
|
||||||
@@ -3712,8 +3705,8 @@ speechSynthesis.getVoices();
|
|||||||
((this.sharedFeedFilters.noty.OnPlayerJoining === 'VIP') && (ctx.isFavorite))) {
|
((this.sharedFeedFilters.noty.OnPlayerJoining === 'VIP') && (ctx.isFavorite))) {
|
||||||
notyFeed.push(onPlayerJoining);
|
notyFeed.push(onPlayerJoining);
|
||||||
}
|
}
|
||||||
joiningMap[ctx.displayName] = ctx.created_at;
|
|
||||||
}
|
}
|
||||||
|
joiningMap[ctx.displayName] = ctx.created_at;
|
||||||
}
|
}
|
||||||
if (ctx.created_at < bias) {
|
if (ctx.created_at < bias) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user