mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Fix player join/leave suppression when switching worlds
This commit is contained in:
+11
-7
@@ -6632,6 +6632,11 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
var ref = API.cachedUsers.get(id);
|
var ref = API.cachedUsers.get(id);
|
||||||
var isVIP = API.cachedFavoritesByObjectId.has(id);
|
var isVIP = API.cachedFavoritesByObjectId.has(id);
|
||||||
|
var location = '';
|
||||||
|
var $location_at = '';
|
||||||
|
if (typeof ref !== 'undefined') {
|
||||||
|
var {location, $location_at} = ref;
|
||||||
|
}
|
||||||
if (typeof stateInput === 'undefined' || ctx.state === stateInput) {
|
if (typeof stateInput === 'undefined' || ctx.state === stateInput) {
|
||||||
// this is should be: undefined -> user
|
// this is should be: undefined -> user
|
||||||
if (ctx.ref !== ref) {
|
if (ctx.ref !== ref) {
|
||||||
@@ -6724,7 +6729,6 @@ speechSynthesis.getVoices();
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.updateFriendInProgress.set(id, Date.now());
|
this.updateFriendInProgress.set(id, Date.now());
|
||||||
var {location, $location_at} = ref;
|
|
||||||
// wait 2minutes then check if user came back online
|
// wait 2minutes then check if user came back online
|
||||||
workerTimers.setTimeout(() => {
|
workerTimers.setTimeout(() => {
|
||||||
this.updateFriendInProgress.delete(id);
|
this.updateFriendInProgress.delete(id);
|
||||||
@@ -6738,7 +6742,6 @@ speechSynthesis.getVoices();
|
|||||||
);
|
);
|
||||||
}, 110000);
|
}, 110000);
|
||||||
} else {
|
} else {
|
||||||
var {location, $location_at} = ref;
|
|
||||||
this.updateFriendDelayedCheck(
|
this.updateFriendDelayedCheck(
|
||||||
id,
|
id,
|
||||||
ctx,
|
ctx,
|
||||||
@@ -8105,16 +8108,17 @@ speechSynthesis.getVoices();
|
|||||||
switch (gameLog.type) {
|
switch (gameLog.type) {
|
||||||
case 'location-destination':
|
case 'location-destination':
|
||||||
if (this.isGameRunning) {
|
if (this.isGameRunning) {
|
||||||
|
// needs to be added before OnPlayerLeft entries from LocationReset
|
||||||
|
this.addGameLog({
|
||||||
|
created_at: gameLog.dt,
|
||||||
|
type: 'LocationDestination',
|
||||||
|
location: gameLog.location
|
||||||
|
});
|
||||||
this.lastLocationReset();
|
this.lastLocationReset();
|
||||||
this.lastLocation.location = 'traveling';
|
this.lastLocation.location = 'traveling';
|
||||||
this.lastLocationDestination = gameLog.location;
|
this.lastLocationDestination = gameLog.location;
|
||||||
this.lastLocationDestinationTime = Date.parse(gameLog.dt);
|
this.lastLocationDestinationTime = Date.parse(gameLog.dt);
|
||||||
this.updateCurrentUserLocation();
|
this.updateCurrentUserLocation();
|
||||||
var entry = {
|
|
||||||
created_at: gameLog.dt,
|
|
||||||
type: 'LocationDestination',
|
|
||||||
location: gameLog.location
|
|
||||||
};
|
|
||||||
this.clearNowPlaying();
|
this.clearNowPlaying();
|
||||||
this.updateCurrentInstanceWorld();
|
this.updateCurrentInstanceWorld();
|
||||||
this.applyUserDialogLocation();
|
this.applyUserDialogLocation();
|
||||||
|
|||||||
Reference in New Issue
Block a user