Attachment Sync: Fehlerbehebung bei Join
This commit is contained in:
@@ -242,6 +242,11 @@ export default function attachmentManager(game: IGame) {
|
||||
function InitAttachmentsOnJoin() {
|
||||
game.players.forEach(_player => {
|
||||
let player = mp.players.at(_player.remoteId);
|
||||
|
||||
if (!player) {
|
||||
return;
|
||||
}
|
||||
|
||||
let e = game.attachments.get(_player);
|
||||
if (e == null) {
|
||||
let __attachments = [];
|
||||
@@ -259,6 +264,11 @@ export default function attachmentManager(game: IGame) {
|
||||
|
||||
game.vehicles.forEach(_veh => {
|
||||
let vehicle = mp.vehicles.at(_veh.remoteId);
|
||||
|
||||
if (!vehicle) {
|
||||
return;
|
||||
}
|
||||
|
||||
let e = game.attachments.get(_veh);
|
||||
if (e == null) {
|
||||
let __attachments = [];
|
||||
|
||||
Reference in New Issue
Block a user