mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Show correct current user in instance
if VRCX user is different to logged in user
This commit is contained in:
@@ -7479,9 +7479,17 @@ speechSynthesis.getVoices();
|
|||||||
if (this.isGameRunning &&
|
if (this.isGameRunning &&
|
||||||
this.lastLocation.location === L.tag) {
|
this.lastLocation.location === L.tag) {
|
||||||
var ref = API.cachedUsers.get(API.currentUser.id);
|
var ref = API.cachedUsers.get(API.currentUser.id);
|
||||||
users.push((typeof ref === 'undefined')
|
if (typeof ref === 'undefined') {
|
||||||
? API.currentUser
|
ref = API.currentUser;
|
||||||
: ref);
|
}
|
||||||
|
var playersInInstance = this.lastLocation.playerList;
|
||||||
|
for (var i = 0; i < playersInInstance.length; i++) {
|
||||||
|
var player = playersInInstance[i];
|
||||||
|
if (ref.displayName === player) {
|
||||||
|
users.push(ref);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
var friendsInInstance = this.lastLocation.friendList;
|
var friendsInInstance = this.lastLocation.friendList;
|
||||||
for (var i = 0; i < friendsInInstance.length; i++) {
|
for (var i = 0; i < friendsInInstance.length; i++) {
|
||||||
var addUser = true;
|
var addUser = true;
|
||||||
@@ -8033,9 +8041,17 @@ speechSynthesis.getVoices();
|
|||||||
instances[instance.id] = instance;
|
instances[instance.id] = instance;
|
||||||
}
|
}
|
||||||
var ref = API.cachedUsers.get(API.currentUser.id);
|
var ref = API.cachedUsers.get(API.currentUser.id);
|
||||||
instance.users.push((typeof ref === 'undefined')
|
if (typeof ref === 'undefined') {
|
||||||
? API.currentUser
|
ref = API.currentUser;
|
||||||
: ref);
|
}
|
||||||
|
var playerInInstance = this.lastLocation.playerList;
|
||||||
|
for (var i = 0; i < playerInInstance.length; i++) {
|
||||||
|
var player = playerInInstance[i];
|
||||||
|
if (ref.displayName === player) {
|
||||||
|
instance.users.push(ref);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
var friendsInInstance = this.lastLocation.friendList;
|
var friendsInInstance = this.lastLocation.friendList;
|
||||||
for (var i = 0; i < friendsInInstance.length; i++) {
|
for (var i = 0; i < friendsInInstance.length; i++) {
|
||||||
var addUser = true;
|
var addUser = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user